Transition book metadata center from dynamic dialog to routed view (#146)
Co-authored-by: adityachandelgit <>
This commit is contained in:
co-authored by
adityachandelgit
parent
b0d1493e59
commit
6fa394e1ed
-19
@@ -70,13 +70,6 @@
|
||||
<p-button *ngIf="userData.permissions.canDownload" label="Download" icon="pi pi-download" severity="info" outlined (onClick)="download(metadata.bookId)"></p-button>
|
||||
<p-splitbutton *ngIf="userData.permissions.canEmailBook" label="Quick Send" icon="pi pi-send" [model]="items" (onClick)="quickSend(metadata.bookId)" outlined
|
||||
severity="info"/>
|
||||
<!--<p-button
|
||||
outlined
|
||||
[label]="metadata.allFieldsLocked ? 'Unlock Metadata' : 'Lock Metadata'"
|
||||
[icon]="metadata.allFieldsLocked ? 'pi pi-lock' : 'pi pi-lock-open'"
|
||||
[severity]="metadata.allFieldsLocked ? 'danger' : 'success'"
|
||||
(onClick)="toggleMetadataLock(metadata)">
|
||||
</p-button>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -87,18 +80,6 @@
|
||||
|
||||
<div *ngIf="metadata$ | async as metadata" class="book-description space-y-4 overflow-y-auto flex-1">
|
||||
<p class="pt-2 px-2" [innerHTML]="metadata.description || 'No description available.'"></p>
|
||||
<!--<div class="pt-6">
|
||||
<p-editor [(ngModel)]="metadata.description" [style]="{ height: '350px' }" [readonly]="true">
|
||||
<ng-template #header>
|
||||
</ng-template>
|
||||
</p-editor>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-x-4 mt-auto">
|
||||
<p-divider></p-divider>
|
||||
<div class="flex gap-x-4 justify-end">
|
||||
<p-button label="Close" icon="pi pi-times" severity="secondary" (onClick)="closeDialog()"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+19
@@ -23,3 +23,22 @@
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none; /* for IE 10+ */
|
||||
}
|
||||
|
||||
.dashboard-scroller-infinite {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
scroll-snap-type: x mandatory;
|
||||
padding: 0.25rem;
|
||||
gap: 1.25rem;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dashboard-scroller-card {
|
||||
height: 165px;
|
||||
width: 101px;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: 101px;
|
||||
}
|
||||
|
||||
-24
@@ -72,10 +72,6 @@ export class MetadataViewerComponent implements OnInit {
|
||||
this.bookService.readBook(bookId);
|
||||
}
|
||||
|
||||
closeDialog(): void {
|
||||
this.metadataCenterService.closeDialog(true);
|
||||
}
|
||||
|
||||
getAuthorNames(authors: string[]): string {
|
||||
return authors.join(', ');
|
||||
}
|
||||
@@ -120,24 +116,4 @@ export class MetadataViewerComponent implements OnInit {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/*toggleMetadataLock(metadata: BookMetadata): void {
|
||||
const lockAction = metadata.allFieldsLocked ? 'UNLOCK' : 'LOCK';
|
||||
this.bookService.toggleAllLock(new Set([metadata.bookId]), lockAction).subscribe({
|
||||
next: () => {
|
||||
this.messageService.add({
|
||||
severity: 'success',
|
||||
summary: `Metadata ${lockAction === 'LOCK' ? 'Locked' : 'Unlocked'}`,
|
||||
detail: `Book metadata has been ${lockAction === 'LOCK' ? 'locked' : 'unlocked'} successfully.`,
|
||||
});
|
||||
},
|
||||
error: () => {
|
||||
this.messageService.add({
|
||||
severity: 'error',
|
||||
summary: `Failed to ${lockAction === 'LOCK' ? 'Lock' : 'Unlock'}`,
|
||||
detail: `An error occurred while ${lockAction === 'LOCK' ? 'locking' : 'unlocking'} the metadata.`,
|
||||
});
|
||||
}
|
||||
});
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user