Commit c4c17cae authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

faet: add notification creation and last update date

parent 1ab2ae3c
......@@ -64,4 +64,26 @@
>
<mat-error #errors></mat-error>
</mat-form-field>
<mat-form-field *ngIf="getFormControl(formDefinition.creation) as fd"
>
<input [formControl]="fd"
matInput
[solidifyValidation]="errors"
[placeholder]="'preservationSpace.notifications.form.creation' | translate"
[required]="formValidationHelper.hasRequiredField(fd)"
>
<mat-error #errors></mat-error>
</mat-form-field>
<mat-form-field *ngIf="getFormControl(formDefinition.lastUpdate) as fd"
>
<input [formControl]="fd"
matInput
[solidifyValidation]="errors"
[placeholder]="'preservationSpace.notifications.form.lastUpdate' | translate"
[required]="formValidationHelper.hasRequiredField(fd)"
>
<mat-error #errors></mat-error>
</mat-form-field>
</form>
......@@ -18,12 +18,14 @@ import {NotificationStatusEnumHelper} from "@shared/enums/notification-status.en
import {NotificationTypeEnumHelper} from "@shared/enums/notification-type.enum";
import {RoutesEnum} from "@shared/enums/routes.enum";
import {BaseFormDefinition} from "@shared/models/base-form-definition.model";
import {BreakpointService} from "@shared/services/breakpoint.service";
import {SecurityService} from "@shared/services/security.service";
import {sharedOrgUnitActionNameSpace} from "@shared/stores/organizational-unit/shared-organizational-unit.action";
import {SharedOrganizationalUnitState} from "@shared/stores/organizational-unit/shared-organizational-unit.state";
import {sharedPersonActionNameSpace} from "@shared/stores/person/shared-person.action";
import {SharedPersonState} from "@shared/stores/person/shared-person.state";
import {
DateUtil,
EnumUtil,
PropertyName,
ResourceNameSpace,
......@@ -61,7 +63,8 @@ export class PreservationSpaceNotificationFormPresentational extends SharedAbstr
constructor(protected readonly _changeDetectorRef: ChangeDetectorRef,
protected readonly _elementRef: ElementRef,
private readonly _fb: FormBuilder,
public readonly securityService: SecurityService) {
public readonly securityService: SecurityService,
public readonly breakpointService: BreakpointService) {
super(_changeDetectorRef, _elementRef);
}
......@@ -71,7 +74,8 @@ export class PreservationSpaceNotificationFormPresentational extends SharedAbstr
[this.formDefinition.notificationStatus]: [notificationDlcm.notificationStatus, [Validators.required, SolidifyValidator]],
[this.formDefinition.emitterId]: [notificationDlcm.emitter["person"]?.resId, [Validators.required, SolidifyValidator]],
[this.formDefinition.message]: [notificationDlcm.message, [Validators.required, SolidifyValidator]],
[this.formDefinition.creation]: [notificationDlcm.creation.when, [Validators.required, SolidifyValidator]],
[this.formDefinition.creation]: [DateUtil.convertDateToDateTimeString(new Date(notificationDlcm.creation.when)), [Validators.required, SolidifyValidator]],
[this.formDefinition.lastUpdate]: [DateUtil.convertDateToDateTimeString(new Date(notificationDlcm.lastUpdate.when)), [Validators.required, SolidifyValidator]],
[this.formDefinition.notifiedOrgUnitId]: [notificationDlcm.notifiedOrgUnit?.resId, [Validators.required, SolidifyValidator]],
});
}
......@@ -83,6 +87,7 @@ export class PreservationSpaceNotificationFormPresentational extends SharedAbstr
[this.formDefinition.emitterId]: ["", [Validators.required, SolidifyValidator]],
[this.formDefinition.message]: ["", [Validators.required, SolidifyValidator]],
[this.formDefinition.creation]: ["", [Validators.required, SolidifyValidator]],
[this.formDefinition.lastUpdate]: ["", [Validators.required, SolidifyValidator]],
[this.formDefinition.notifiedOrgUnitId]: ["", [Validators.required, SolidifyValidator]],
});
}
......@@ -106,5 +111,6 @@ class FormComponentFormDefinition extends BaseFormDefinition {
@PropertyName() emitterId: string;
@PropertyName() message: string;
@PropertyName() creation: string;
@PropertyName() lastUpdate: string;
@PropertyName() notifiedOrgUnitId: string;
}
......@@ -149,6 +149,15 @@ export class PreservationSpaceNotificationListRoutable extends SharedAbstractLis
isFilterable: false,
isSortable: false,
},
{
field: "creation.when" as any,
header: TRANSLATE("preservationSpace.notifications.table.header.creation.when"),
type: FieldTypeEnum.datetime,
order: OrderEnum.none,
isFilterable: false,
isSortable: false,
width: "145px",
},
];
const orgUnitId = MemoizedUtil.selectSnapshot(this._store, PreservationSpaceNotificationState, state => state.orgUnitId);
......
......@@ -1245,8 +1245,8 @@
"goToAip": "Go to Aip",
"goToDeposit": "Go to deposits",
"goToEdit": "Edit",
"goToReceivedRequestNotification": "See received request",
"goToSentRequestNotification": "See request sent",
"goToReceivedRequestNotification": "See received requests",
"goToSentRequestNotification": "See sent requests",
"history": "History",
"info": "Informations",
"move": "Move",
......@@ -1809,6 +1809,10 @@
"notification": {
"aip": {
"action": {
"check": {
"fail": "Impossible to do a check",
"success": "The AIP's check will be executed"
},
"deepChecksum": {
"fail": "Impossible to do a deep checksum",
"success": "The AIP's deep checksums will be checked"
......@@ -1824,10 +1828,6 @@
"simpleChecksum": {
"fail": "Impossible to do a simple checkum",
"success": "The AIP's simple checksums will be checked"
},
"check": {
"fail": "Impossible to do a check",
"success": "The AIP's check will be executed"
}
},
"file": {
......@@ -1850,8 +1850,8 @@
}
},
"folder": {
"deleteFail": "Unable to delete folder",
"deleteWithSuccess": "Deletion of the folder being processed",
"deleteFail": "Unable to delete the folder",
"deleteWithSuccess": "The folder has been deleted",
"downloadWithSuccess": "Folder downloaded"
}
},
......@@ -1882,8 +1882,8 @@
"file": {
"visualizer": {
"file": {
"notsupported": "The file you try to open is not supported",
"toobig": "The file you try to open as a size not supported"
"notsupported": "The format of the file you are trying to view is not supported",
"toobig": "The file is too large to be viewed"
}
}
},
......@@ -2339,7 +2339,7 @@
"report": {
"detail": {
"errorMessage": {
"title": "Error message : {{resID}}"
"title": "Error message : {{resId}}"
},
"jobStatusEnum": {
"error": "Error",
......@@ -2353,7 +2353,7 @@
"status": "Status"
}
},
"title": "Report detail : {{resID}}"
"title": "Report detail : {{resId}}"
},
"table": {
"header": {
......@@ -2478,7 +2478,9 @@
"refresh": "Refresh"
},
"form": {
"creation": "Creation date",
"emitter": "Emitter",
"lastUpdate": "Last update date",
"message": "Message",
"notificationStatus": "Status",
"notificationType": "Type",
......@@ -2512,6 +2514,9 @@
},
"table": {
"header": {
"creation": {
"when": "Creation date"
},
"emitter": "Emitter",
"notificationStatus": "Status",
"notificationType": "Type",
......
......@@ -1809,6 +1809,10 @@
"notification": {
"aip": {
"action": {
"check": {
"fail": "Impossible to do a check",
"success": "The AIP's check will be executed"
},
"deepChecksum": {
"fail": "Impossible to do a deep checksum",
"success": "The AIP's deep checksums will be checked"
......@@ -1824,10 +1828,6 @@
"simpleChecksum": {
"fail": "Impossible to do a simple checkum",
"success": "The AIP's simple checksums will be checked"
},
"check": {
"fail": "Impossible to do a check",
"success": "The AIP's check will be executed"
}
},
"file": {
......@@ -2478,7 +2478,9 @@
"refresh": "Refresh"
},
"form": {
"creation": "Creation date",
"emitter": "Emitter",
"lastUpdate": "Last update date",
"message": "Message",
"notificationStatus": "Status",
"notificationType": "Type",
......@@ -2512,6 +2514,9 @@
},
"table": {
"header": {
"creation": {
"when": "Creation date"
},
"emitter": "Emitter",
"notificationStatus": "Status",
"notificationType": "Type",
......
......@@ -1809,6 +1809,10 @@
"notification": {
"aip": {
"action": {
"check": {
"fail": "Impossible de faire une verification",
"success": "La verification de l'AIP vas être exécutée"
},
"deepChecksum": {
"fail": "Impossible de faire un checksum profond",
"success": "Les checksums profond de l'AIP vont être vérifiés"
......@@ -1824,10 +1828,6 @@
"simpleChecksum": {
"fail": "Impossible de faire un simple checksums",
"success": "Les checksums simple de l'AIP vont être vérifiés"
},
"check": {
"fail": "Impossible de faire une verification",
"success": "La verification de l'AIP vas être exécutée"
}
},
"file": {
......@@ -2478,7 +2478,9 @@
"refresh": "Rafraichir"
},
"form": {
"creation": "Date de création",
"emitter": "Émetteur",
"lastUpdate": "Dernière mise à jour",
"message": "Message",
"notificationStatus": "Status",
"notificationType": "Type",
......@@ -2512,6 +2514,9 @@
},
"table": {
"header": {
"creation": {
"when": "Date de création"
},
"emitter": "Emetteur",
"notificationStatus": "Status",
"notificationType": "Type",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment