mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-11 10:46:52 +00:00

* Releases updated version of datahub-web client UI code * Fix typo in yarn lock * Change yarn lock to match yarn registry directories * Previous commit missed some paths * Even more changes to yarnlock missing in previous commit * Include codegen file for typings * Add files to get parity for datahub-web and current OS datahub-midtier * Add in typo fix from previous commit - change to proper license * Implement proper OS fix for person entity picture url * Workarounds for open source DH issues * Fixes institutional memory api and removes unopensourced tabs for datasets * Fixes search dataset deprecation and user search issue as a result of changes * Remove internal only options in the avatar menu
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import Component from '@glimmer/component';
|
|
import { ChangeLog } from '@datahub/shared/modules/change-log';
|
|
|
|
// Styling class name for template
|
|
export const baseModalClass = 'view-change-log';
|
|
|
|
interface IViewChangeLogModalArgs {
|
|
// External handler method for handling the closing of the modal
|
|
onCloseModal: () => void;
|
|
|
|
// The changeLog being viewed
|
|
changeLog: ChangeLog;
|
|
}
|
|
|
|
/**
|
|
* Presentational Component that displays details of a ChangeLog
|
|
*/
|
|
export default class ViewChangeLogModal extends Component<IViewChangeLogModalArgs> {
|
|
/**
|
|
* CSS Styling name for easier access in template
|
|
*/
|
|
baseModalClass = baseModalClass;
|
|
|
|
/**
|
|
* Getter to check if the Change log was used to send notification or not
|
|
*/
|
|
get notificationText(): string {
|
|
return this.args.changeLog.sendEmail ? 'Sent' : 'Not Sent';
|
|
}
|
|
|
|
/**
|
|
* Formats the recipients into Displayable text required for the `Audience section of the Modal`
|
|
*/
|
|
get audienceText(): string {
|
|
const recipients = this.args.changeLog.recipients;
|
|
return `${recipients?.length || 0} recipients`;
|
|
}
|
|
}
|