diff --git a/libs/shared/src/i18n/en.json b/libs/shared/src/i18n/en.json index fd18d84f8f..deef2d5599 100644 --- a/libs/shared/src/i18n/en.json +++ b/libs/shared/src/i18n/en.json @@ -905,7 +905,8 @@ "originalValue": "Old value", "person": "User", "time": "Time", - "variable": "Field" + "variable": "Field", + "incrementalId": "Incremental Id" }, "download": "Download history", "empty": "No activity detected", diff --git a/libs/shared/src/i18n/fr.json b/libs/shared/src/i18n/fr.json index 93d69072ae..11da84fda5 100644 --- a/libs/shared/src/i18n/fr.json +++ b/libs/shared/src/i18n/fr.json @@ -916,7 +916,8 @@ "originalValue": "Nouvelle valeur", "person": "Utilisateur", "time": "Heure", - "variable": "Champ" + "variable": "Champ", + "incrementalId": "Incrémental Id" }, "download": "Télécharger l'historique", "empty": "Aucune activité détectée", diff --git a/libs/shared/src/lib/components/record-history/graphql/queries.ts b/libs/shared/src/lib/components/record-history/graphql/queries.ts index 3ff21785c9..ffd3eac131 100644 --- a/libs/shared/src/lib/components/record-history/graphql/queries.ts +++ b/libs/shared/src/lib/components/record-history/graphql/queries.ts @@ -24,6 +24,7 @@ export const GET_RECORD_HISTORY_BY_ID = gql` recordHistory(id: $id, lang: $lang) { createdAt createdBy + incrementalId changes { type field diff --git a/libs/shared/src/lib/components/record-history/record-history.component.html b/libs/shared/src/lib/components/record-history/record-history.component.html index 79e3f10e26..f636162a03 100644 --- a/libs/shared/src/lib/components/record-history/record-history.component.html +++ b/libs/shared/src/lib/components/record-history/record-history.component.html @@ -107,7 +107,7 @@
| + {{ 'components.history.columns.incrementalId' | translate }} + | ++ {{ element.incrementalId }} + | +
{{ 'components.history.columns.variable' | translate }}
diff --git a/libs/shared/src/lib/components/record-history/record-history.component.ts b/libs/shared/src/lib/components/record-history/record-history.component.ts
index 7111eab7e4..d0d3a619f5 100644
--- a/libs/shared/src/lib/components/record-history/record-history.component.ts
+++ b/libs/shared/src/lib/components/record-history/record-history.component.ts
@@ -101,6 +101,7 @@ export class RecordHistoryComponent
public sortedFields: any[] = [];
/** Table columns */
public displayedColumnsHistory: string[] = [
+ 'incrementalId',
'variable',
'date',
'time',
@@ -328,6 +329,7 @@ export class RecordHistoryComponent
type: change.type,
createdAt: filterHistoryElement.createdAt,
createdBy: filterHistoryElement.createdBy,
+ incrementalId: filterHistoryElement.incrementalId,
});
}
diff --git a/libs/shared/src/lib/models/records-history.model.ts b/libs/shared/src/lib/models/records-history.model.ts
index 61eb6ea931..10763d16c5 100644
--- a/libs/shared/src/lib/models/records-history.model.ts
+++ b/libs/shared/src/lib/models/records-history.model.ts
@@ -19,6 +19,7 @@ export type RecordHistory = {
createdBy: string;
changes: Change[];
version?: Version;
+ incrementalId?: string;
}[];
/** Get record history query response interface */
diff --git a/libs/ui/src/lib/cron-editor/cron-editor.component.spec.ts b/libs/ui/src/lib/cron-editor/cron-editor.component.spec.ts
index 5d5b0b210c..22e15f5e7d 100644
--- a/libs/ui/src/lib/cron-editor/cron-editor.component.spec.ts
+++ b/libs/ui/src/lib/cron-editor/cron-editor.component.spec.ts
@@ -1,6 +1,10 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CronEditorComponent } from './cron-editor.component';
+import { TranslateTestingModule } from 'ngx-translate-testing';
+import { TabsModule } from '../tabs/tabs.module';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { ReactiveFormsModule } from '@angular/forms';
describe('CronEditorComponent', () => {
let component: CronEditorComponent;
@@ -9,6 +13,30 @@ describe('CronEditorComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [CronEditorComponent],
+ imports: [
+ ReactiveFormsModule,
+ BrowserAnimationsModule,
+ TabsModule,
+ TranslateTestingModule.withTranslations('en', {
+ common: {
+ cronEditor: {
+ minutely: 'Minutely',
+ every: {
+ femenine: 'Every',
+ masculine: 'Every',
+ },
+ minutes: 'Minute(s)',
+ atTime: 'At',
+ hourly: 'hourly',
+ hours: 'Hour(s)',
+ daily: 'Daily',
+ days: 'Day(s)',
+ weekDay: 'WeekDay',
+ weekly: 'Weekly',
+ },
+ },
+ }),
+ ],
}).compileComponents();
fixture = TestBed.createComponent(CronEditorComponent);
diff --git a/libs/ui/src/lib/cron-editor/time-picker/time-picker.component.spec.ts b/libs/ui/src/lib/cron-editor/time-picker/time-picker.component.spec.ts
index 81d73e9092..7a9f3b7f15 100644
--- a/libs/ui/src/lib/cron-editor/time-picker/time-picker.component.spec.ts
+++ b/libs/ui/src/lib/cron-editor/time-picker/time-picker.component.spec.ts
@@ -1,14 +1,50 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TimePickerComponent } from './time-picker.component';
+import {
+ ControlContainer,
+ FormControl,
+ FormGroup,
+ FormGroupDirective,
+ ReactiveFormsModule,
+} from '@angular/forms';
+import { TranslateTestingModule } from 'ngx-translate-testing';
+import { SelectMenuModule } from '../../select-menu/select-menu.module';
describe('TimePickerComponent', () => {
let component: TimePickerComponent;
let fixture: ComponentFixture |
|---|