Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: SKFP-1323 debugging #4149

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/views/FileEntity/Imaging/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ interface OwnProps {
}

const Imaging = ({ file, loading }: OwnProps) => {
console.log(file);
const imagingData: Partial<IImagingData> &
Pick<IFileEntity, 'imaging_sequence_types' | 'imaging_techniques' | 'flywheel_url'> = {
...file?.imaging,
Expand Down
14 changes: 14 additions & 0 deletions src/views/FileEntity/Title/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const FileEntityTitle: React.FC<OwnProps> = ({ file, loading }) => {
const gen3 = useFenceAuthentification(FENCE_NAMES.gen3);
const hasFamily = file?.participants?.hits?.edges?.some((e) => e.node.families_id);

console.log('====Debug==== + The File: ', file);
const hasAccess = file
? userHasAccessToFile(
file,
Expand All @@ -40,6 +41,8 @@ const FileEntityTitle: React.FC<OwnProps> = ({ file, loading }) => {
)
: false;

console.log('====Debug==== + Has access: ', hasAccess);

const generateSqonForFile = (): any =>
generateQuery({
newFilters: [
Expand All @@ -56,10 +59,19 @@ const FileEntityTitle: React.FC<OwnProps> = ({ file, loading }) => {
};

const renderTag = () => {
console.log(
'====Debug==== + Render Icon + is Controlled: ',
file?.controlled_access.toLowerCase() === FileAccessType.CONTROLLED.toLowerCase(),
);
console.log(
'====Debug==== + Render Icon + starts with cavatica ga4gh url: ',
file?.access_urls?.startsWith('drs://cavatica-ga4gh-api.sbgenomics.com/'),
);
if (
file?.controlled_access.toLowerCase() === FileAccessType.CONTROLLED.toLowerCase() &&
file?.access_urls?.startsWith('drs://cavatica-ga4gh-api.sbgenomics.com/')
) {
console.log('====Debug==== + Render Icon of Warning');
return (
<Popover
placement="bottom"
Expand All @@ -78,6 +90,7 @@ const FileEntityTitle: React.FC<OwnProps> = ({ file, loading }) => {
</Popover>
);
} else if (hasAccess) {
console.log('====Debug==== + Render Icon of Access');
return (
<Popover
placement="bottom"
Expand All @@ -89,6 +102,7 @@ const FileEntityTitle: React.FC<OwnProps> = ({ file, loading }) => {
</Popover>
);
} else {
console.log('====Debug==== + Render Icon of No Access');
return (
<Popover
overlayClassName={styles.popOverContent}
Expand Down
Loading