diff --git a/eform-client/cypress/e2e/plugins/backend-configuration-pn/BackendConfigurationProperties.page.ts b/eform-client/cypress/e2e/plugins/backend-configuration-pn/BackendConfigurationProperties.page.ts index cae7740e9..2c5782082 100644 --- a/eform-client/cypress/e2e/plugins/backend-configuration-pn/BackendConfigurationProperties.page.ts +++ b/eform-client/cypress/e2e/plugins/backend-configuration-pn/BackendConfigurationProperties.page.ts @@ -16,6 +16,7 @@ class BackendConfigurationPropertiesPage extends PageWithNavbarPage { this.backendConfigurationPnPropertiesButton().then(($ele) => { if (!$ele.is(':visible')) { this.backendConfigurationPnButton().click(); + } }); this.backendConfigurationPnPropertiesButton().click(); @@ -227,6 +228,10 @@ class BackendConfigurationPropertiesPage extends PageWithNavbarPage { cy.get('app-properties-table .mat-mdc-row').then(rows => { const rowNum = rows.length; cy.log(rowNum.toString()); + if (rowNum === 0) { + cy.log('No properties to delete.'); + return; + } for (let i = rowNum; i > 0; i--) { cy.intercept('POST', '**/api/backend-configuration-pn/properties/index').as('getProperties'); @@ -269,15 +274,41 @@ export class PropertyRowObject { editPropertyBtn: () => Cypress.Chainable>; deleteBtn: () => Cypress.Chainable>; + getRow(rowNum: number) { - const row = () => cy.get('.mat-mdc-row').eq(rowNum - 1); + const row = () => cy.get('.mat-mdc-row').should('exist').eq(rowNum - 1); this.row = row(); - this.viewAreasBtn = () => row().find('[id^=showPropertyAreasBtn]').should('be.visible').should('be.enabled'); - this.editPropertyBtn = () => row().find('[id^=editPropertyBtn]').should('be.visible').should('be.enabled'); - this.deleteBtn = () => row().find('[id^=deletePropertyBtn]').should('be.visible').should('be.enabled'); + + row() + .should('exist') + .then($r => { + if ($r.length === 0) { + cy.log(`No row found at index ${rowNum} — skipping action menu click.`); + return; + } + + const $actionCell = $r.find('[id^="action-items"]').filter(':visible').first(); + + if ($actionCell.length > 0) { + cy.wrap($actionCell) + .find('#actionMenu', { timeout: 500 }) + .filter(':visible') + .first() + .should('be.visible') + .click({ force: true }); + } else { + cy.log(`Row ${rowNum} has no [id^="action-items"], skipping click.`); + return; + } + }); + + this.viewAreasBtn = () => cy.get('[id^=showPropertyAreasBtn]').should('be.visible').should('be.enabled'); + this.editPropertyBtn = () => cy.get('[id^=editPropertyBtn]').should('be.visible').should('be.enabled'); + this.deleteBtn = () => cy.get('[id^=deletePropertyBtn]').should('be.visible').should('be.enabled'); return this; } + // find first row with text getRowByPropertyName(propertyName: string) { const row = () => cy.get('.mat-mdc-row') @@ -285,12 +316,37 @@ export class PropertyRowObject { .parent() // met-mdc-cell .parent(); // mat-mdc-row this.row = row(); - this.viewAreasBtn = () => row().find('[id^=showPropertyAreasBtn]').should('be.visible').should('be.enabled'); - this.editPropertyBtn = () => row().find('[id^=editPropertyBtn]').should('be.visible').should('be.enabled'); - this.deleteBtn = () => row().find('[id^=deletePropertyBtn]').should('be.visible').should('be.enabled'); + + + row() + .should('exist') + .then($r => { + if ($r.length === 0) { + cy.log(`No row found for property name: ${propertyName}`); + return; + } + + const $actionCell = $r.find('[id^="action-items"]'); + + if ($actionCell.length > 0) { + cy.wrap($actionCell) + .find('#actionMenu', { timeout: 500 }) + .filter(':visible') + .should('be.visible') + .click({ force: true }); + } else { + cy.log(`No action-items found in row for: ${propertyName}, skipping menu click.`); + return; + } + }); + + this.viewAreasBtn = () => cy.get('[id^=showPropertyAreasBtn]').should('be.visible').should('be.enabled'); + this.editPropertyBtn = () => cy.get('[id^=editPropertyBtn]').should('be.visible').should('be.enabled'); + this.deleteBtn = () => cy.get('[id^=deletePropertyBtn]').should('be.visible').should('be.enabled'); return this; } + goToAreas() { this.viewAreasBtn().click(); backendConfigurationPropertiesPage.configurePropertyAreasBtn().should('be.visible'); diff --git a/eform-client/cypress/e2e/plugins/backend-configuration-pn/BackendConfigurationPropertyWorkers.page.ts b/eform-client/cypress/e2e/plugins/backend-configuration-pn/BackendConfigurationPropertyWorkers.page.ts index c500cd8b0..8a3635ec7 100644 --- a/eform-client/cypress/e2e/plugins/backend-configuration-pn/BackendConfigurationPropertyWorkers.page.ts +++ b/eform-client/cypress/e2e/plugins/backend-configuration-pn/BackendConfigurationPropertyWorkers.page.ts @@ -193,11 +193,34 @@ export class WorkerRowObject { deleteBtn: Cypress.Chainable>; getRow(rowNum: number) { - const row = () => cy.get('.mat-mdc-row').eq(rowNum - 1); + const row = () => cy.get('.mat-mdc-row').should('exist').eq(rowNum - 1); this.row = row(); - this.editAssignmentsBtn = row().find('[id^=editAssignmentsBtn]').should('be.visible').should('be.enabled'); - this.editDeviceUserBtn = row().find('[id^=editDeviceUserBtn]').should('be.visible').should('be.enabled'); - this.deleteBtn = row().find('[id^=deleteDeviceUserBtn]').should('be.visible').should('be.enabled'); + row() + .should('exist') + .then($r => { + if ($r.length === 0) { + cy.log(`No row found at index ${rowNum} — skipping action menu click.`); + return; + } + + const $actionCell = $r.find('[id^="action-items"]').first(); + + if ($actionCell.length > 0) { + cy.wrap($actionCell) + .find('#actionMenu', { timeout: 500 }) + .filter(':visible') + .first() + .should('be.visible') + .click({ force: true }); + } else { + cy.log(`Row ${rowNum} has no [id^="action-items"], skipping click.`); + return; + } + }); + + this.editAssignmentsBtn = cy.get('[id^=editAssignmentsBtn]').should('be.visible').should('be.enabled'); + this.editDeviceUserBtn = cy.get('[id^=editDeviceUserBtn]').should('be.visible').should('be.enabled'); + this.deleteBtn = cy.get('[id^=deleteDeviceUserBtn]').should('be.visible').should('be.enabled'); return this; } diff --git a/eform-client/cypress/e2e/plugins/backend-configuration-pn/b/area-rules.t1.spec.cy.ts b/eform-client/cypress/e2e/plugins/backend-configuration-pn/b/area-rules.t1.spec.cy.ts index 7e23a9a9e..b49e2d891 100644 --- a/eform-client/cypress/e2e/plugins/backend-configuration-pn/b/area-rules.t1.spec.cy.ts +++ b/eform-client/cypress/e2e/plugins/backend-configuration-pn/b/area-rules.t1.spec.cy.ts @@ -35,6 +35,7 @@ describe('Area rules type 1', () => { backendConfigurationPropertyWorkersPage.create(workerForCreate); backendConfigurationPropertiesPage.goToProperties(); const propertyInTable = backendConfigurationPropertiesPage.getRowObjectByName(property.name); + cy.wait(1000); propertyInTable.goToAreas(); propertyInTable.bindAreasByName([nameArea]); cy.wait(500); diff --git a/eform-client/cypress/e2e/plugins/backend-configuration-pn/d/task-wizard.copy.cy.ts b/eform-client/cypress/e2e/plugins/backend-configuration-pn/d/task-wizard.copy.cy.ts index 31427933d..d0c8c0570 100644 --- a/eform-client/cypress/e2e/plugins/backend-configuration-pn/d/task-wizard.copy.cy.ts +++ b/eform-client/cypress/e2e/plugins/backend-configuration-pn/d/task-wizard.copy.cy.ts @@ -138,7 +138,20 @@ describe('Area rules type 1', () => { .invoke('text').should('eq', `${workerForCreate.name} ${workerForCreate.surname}`); // Copy task - cy.get('.cdk-row .cdk-column-actions .copyBtn').first().click(); + // cy.get('.cdk-row .cdk-column-actions .copyBtn').first().click(); + cy.get('.task-actions') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Now click the Copy Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=copyTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); + cy.intercept('POST', '**/api/backend-configuration-pn/task-wizard').as('createTask'); cy.get('#createTaskBtn').click(); cy.wait('@createTask', { timeout: 60000 }); @@ -178,7 +191,19 @@ describe('Area rules type 1', () => { // Copy and set new eform cy.intercept('GET', '**/api/backend-configuration-pn/properties/get-folder-dtos?**').as('getFolders'); - cy.get('.cdk-row .cdk-column-actions .copyBtn').first().click(); + // cy.get('.cdk-row .cdk-column-actions .copyBtn').first().click(); + cy.get('.task-actions') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Now click the Copy Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=copyTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); cy.intercept('POST', '**/api/backend-configuration-pn/task-wizard').as('createTask'); selectValueInNgSelector('#createTemplateSelector', editedTask.eformName, true); cy.get('#createTaskBtn').click(); diff --git a/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit-assignment.spec.cy.ts b/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit-assignment.spec.cy.ts index 0febc0ab6..02a729ea3 100644 --- a/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit-assignment.spec.cy.ts +++ b/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit-assignment.spec.cy.ts @@ -154,7 +154,19 @@ describe('Area rules type 1', () => { cy.get('#backend-configuration-pn-task-wizard').click(); cy.intercept('GET', '**/api/backend-configuration-pn/properties/get-folder-dtos?**').as('getFolders'); cy.intercept('POST', '**/api/templates/index').as('getTemplates'); - cy.get('.editBtn').click(); + // cy.get('.editBtn').click(); + cy.get('[id^=action-items]') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Now click the Copy Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=editTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); cy.wait('@getFolders', { timeout: 60000 }); cy.wait('@getTemplates', { timeout: 60000 }); //cy.get('.editBtn > .mat-mdc-button-touch-target').click(); @@ -174,7 +186,19 @@ describe('Area rules type 1', () => { cy.get('#backend-configuration-pn-task-wizard').click(); cy.intercept('GET', '**/api/backend-configuration-pn/properties/get-folder-dtos?**').as('getFolders'); cy.intercept('POST', '**/api/templates/index').as('getTemplates'); - cy.get('.editBtn').click(); + // cy.get('.editBtn').click(); + cy.get('[id^=action-items]') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Now click the Copy Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=editTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); cy.wait('@getFolders', { timeout: 60000 }); cy.wait('@getTemplates', { timeout: 60000 }); //cy.get('.editBtn > .mat-mdc-button-touch-target').click(); diff --git a/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit-frequency.spec.cy.ts b/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit-frequency.spec.cy.ts index 9dab73587..683d788ee 100644 --- a/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit-frequency.spec.cy.ts +++ b/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit-frequency.spec.cy.ts @@ -158,7 +158,19 @@ describe('Area rules type 1', () => { cy.wait('@createFolder', { timeout: 60000 }); cy.wait(1000); cy.get('#backend-configuration-pn-task-wizard').scrollIntoView().click(); - cy.get('.cdk-row .cdk-column-actions .editBtn').first().click(); + // cy.get('.cdk-row .cdk-column-actions .editBtn').first().click(); + cy.get('[id^=action-items]') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Now click the Copy Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=editTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); // // change task cy.get('#updateTaskStatusToggle').click(); cy.get('#updateTaskBtn').click(); @@ -181,7 +193,19 @@ describe('Area rules type 1', () => { .invoke('text') .should('eq', `${workerForCreate.name} ${workerForCreate.surname}`); - cy.get('.cdk-row .cdk-column-actions .editBtn').first().click(); + // cy.get('.cdk-row .cdk-column-actions .editBtn').first().click(); + cy.get('[id^=action-items]') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Now click the Copy Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=editTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); cy.intercept('GET', '**/api/backend-configuration-pn/properties/get-folder-dtos?**').as('getFolders'); // cy.get('#updateProperty').click(); // //selectValueInNgSelectorNoSelector(`${property2.cvrNumber} - ${property2.chrNumber} - ${property2.name}`); diff --git a/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit.spec.cy.ts b/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit.spec.cy.ts index 070393fd8..4a4b64b6c 100644 --- a/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit.spec.cy.ts +++ b/eform-client/cypress/e2e/plugins/backend-configuration-pn/g/task-wizard.edit.spec.cy.ts @@ -156,7 +156,19 @@ describe('Area rules type 1', () => { cy.get('#folderSaveBtn').click(); cy.wait(1000); cy.get('#backend-configuration-pn-task-wizard').scrollIntoView().click(); - cy.get('.cdk-row .cdk-column-actions .editBtn').first().click(); + // cy.get('.cdk-row .cdk-column-actions .editBtn').first().click(); + cy.get('.task-actions') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Now click the Edit Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=editTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); // // change task cy.get('#updateTaskStatusToggle').click(); cy.get('#updateTaskBtn').click(); @@ -179,7 +191,19 @@ describe('Area rules type 1', () => { .invoke('text') .should('eq', `${workerForCreate.name} ${workerForCreate.surname}`); - cy.get('.cdk-row .cdk-column-actions .editBtn').first().click(); + // cy.get('.cdk-row .cdk-column-actions .editBtn').first().click(); + cy.get('.task-actions') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Now click the Edit Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=editTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); cy.intercept('GET', '**/api/backend-configuration-pn/properties/get-folder-dtos?**').as('getFolders'); // cy.get('#updateProperty').click(); // //selectValueInNgSelectorNoSelector(`${property2.cvrNumber} - ${property2.chrNumber} - ${property2.name}`); diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/backend-configuration-pn.module.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/backend-configuration-pn.module.ts index 0d1c366b4..3f4bd5525 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/backend-configuration-pn.module.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/backend-configuration-pn.module.ts @@ -60,6 +60,7 @@ import { taskWizardReducer, taskWorkerAssignmentReducer, } from './state'; +import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu"; @NgModule({ @@ -103,6 +104,9 @@ import { taskWizardState: taskWizardReducer, taskWorkerAssignmentState: taskWorkerAssignmentReducer, },), + MatMenu, + MatMenuTrigger, + MatMenuItem, ], declarations: [ BackendConfigurationPnLayoutComponent, diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/properties-page/properties-table/properties-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/properties-page/properties-table/properties-table.component.html index 077ea44a5..6648585b7 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/properties-page/properties-table/properties-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/properties-page/properties-table/properties-table.component.html @@ -30,23 +30,23 @@ (sortChange)="sortTable($event)"> -
{{row.id}}
+
{{ row.id }}
-
{{row.name}}
+
{{ row.name }}
-
{{row.cvr}}
+
{{ row.cvr }}
-
{{row.chr}}
+
{{ row.chr }}
-
{{row.address}}
+
{{ row.address }}
@@ -63,51 +63,58 @@ - - - - - - - - - - - - - - + +
+ + + + + + + + + + + + + + + + +
diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/properties-page/properties-table/properties-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/properties-page/properties-table/properties-table.component.ts index 3753fa3c8..457bb3f56 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/properties-page/properties-table/properties-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/properties-page/properties-table/properties-table.component.ts @@ -31,8 +31,9 @@ export class PropertiesTableComponent implements OnInit { @Input() nameSearchSubject = new Subject(); @Input() propertiesModel: Paged = new Paged(); - @Input() tableHeaders: MtxGridColumn[]; - @Input() adminTableHeaders: MtxGridColumn[]; + @Input() tableHeaders: MtxGridColumn[] = []; + @Input() adminTableHeaders: MtxGridColumn[] = []; + @Output() showEditPropertyModal: EventEmitter = new EventEmitter(); @Output() @@ -68,7 +69,20 @@ export class PropertiesTableComponent implements OnInit { iconRegistry.addSvgIconLiteral('file-word', sanitizer.bypassSecurityTrustHtml(WordIcon)); } - ngOnInit(): void { } + ngOnInit(): void { + this.tableHeaders = [ + { header: 'ID', field: 'id', sortable: true }, + { header: 'Name', field: 'name', sortable: true }, + { header: 'CVR', field: 'cvr', sortable: true }, + { header: 'CHR', field: 'chr', sortable: true }, + { header: 'Address', field: 'address', sortable: true }, + { header: 'Compliance', field: 'compliance' }, + { header: 'Actions', field: 'actions', pinned: 'right'}, + ]; + + this.adminTableHeaders = [...this.tableHeaders]; + + } onShowDeletePropertyModal(propertyModel: PropertyModel) { this.showDeletePropertyModal.emit(propertyModel); diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-table/documents-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-table/documents-table.component.html index d6067d062..87905a3ac 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-table/documents-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-table/documents-table.component.html @@ -3,7 +3,8 @@ [columns]="tableHeaders" [cellTemplate]="{ status: statusTpl, - documentProperties: documentPropertiesTpl + documentProperties: documentPropertiesTpl, + actions: actionsTpl }" [showPaginator]="false" [pageOnFront]="false" @@ -57,3 +58,33 @@
+ + +
+ + + + + + + +
+
diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-table/documents-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-table/documents-table.component.ts index 5f9a2b039..ced90f966 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-table/documents-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-table/documents-table.component.ts @@ -70,33 +70,7 @@ export class DocumentsTableComponent implements OnInit, OnDestroy { // formatter: (document: DocumentModel) => this.translateService.instant(document.status ? 'ON' : 'OFF'), sortable: true, sortProp: {id: 'Status'} }, - { - field: 'actions', - header: this.translateService.stream('Actions'), - type: 'button', - width: '160px', - pinned: 'right', - right: '0px', - buttons: [ - { - type: 'icon', - icon: 'edit', - tooltip: this.translateService.stream('Edit document'), - iif: (document: DocumentModel) => document.isLocked === false, - click: (document: DocumentModel) => this.onShowEditDocumentModal(document), - class: 'editDocumentBtn', - }, - { - color: 'warn', - type: 'icon', - icon: 'delete', - tooltip: this.translateService.stream('Delete document'), - iif: (document: DocumentModel) => document.isLocked === false, - click: (document: DocumentModel) => this.onOpenDeleteModal(document), - class: 'deleteDocumentBtn', - }, - ], - }, + { field: 'actions', header: this.translateService.stream('Actions'), pinned: 'right' } ]; @Input() documents: DocumentModel[] = []; @Input() folders: DocumentSimpleFolderModel[] = []; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/documents.module.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/documents.module.ts index 1edbbb7f7..c9fdc0b69 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/documents.module.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/documents.module.ts @@ -33,6 +33,7 @@ import {MtxCheckboxGroupModule} from '@ng-matero/extensions/checkbox-group'; import {MatDatepickerModule} from '@angular/material/datepicker'; import {StatisticsModule} from '../statistics/statistics.module'; import {MatChip} from "@angular/material/chips"; +import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu"; @NgModule({ declarations: [ @@ -47,31 +48,34 @@ import {MatChip} from "@angular/material/chips"; DocumentsDocumentEditComponent, DocumentsDocumentDeleteComponent ], - imports: [ - CommonModule, - TranslateModule, - RouterModule, - DocumentsRouting, - EformSharedModule, - ReactiveFormsModule, - EformImportedModule, - FormsModule, - MatButtonModule, - MatTooltipModule, - MatIconModule, - MatFormFieldModule, - MtxSelectModule, - MatInputModule, - MtxGridModule, - MatDialogModule, - MatCardModule, - MatSlideToggleModule, - MatCheckboxModule, - MtxCheckboxGroupModule, - MatDatepickerModule, - StatisticsModule, - MatChip, - ], + imports: [ + CommonModule, + TranslateModule, + RouterModule, + DocumentsRouting, + EformSharedModule, + ReactiveFormsModule, + EformImportedModule, + FormsModule, + MatButtonModule, + MatTooltipModule, + MatIconModule, + MatFormFieldModule, + MtxSelectModule, + MatInputModule, + MtxGridModule, + MatDialogModule, + MatCardModule, + MatSlideToggleModule, + MatCheckboxModule, + MtxCheckboxGroupModule, + MatDatepickerModule, + StatisticsModule, + MatChip, + MatMenu, + MatMenuItem, + MatMenuTrigger, + ], providers: [], }) diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/property-workers/components/property-worker-table/property-worker-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/property-workers/components/property-worker-table/property-worker-table.component.html index b677da1d2..ccfdf702a 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/property-workers/components/property-worker-table/property-worker-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/property-workers/components/property-worker-table/property-worker-table.component.html @@ -50,7 +50,7 @@
- {{name}} + {{ name }}
@@ -62,11 +62,13 @@
- {{row.siteId}} ({{getFormattedDate(row.createdAt)}} / {{getFormattedDate(row.updatedAt)}}) + {{ row.siteId }} ({{ getFormattedDate(row.createdAt) }} + / {{ getFormattedDate(row.updatedAt) }}) - {{row.siteId}} -
+ {{ row.siteId }} + +
@@ -80,19 +82,19 @@ -
{{row.siteName}}
+
{{ row.siteName }}
-
{{row.workerEmail}}
+
{{ row.workerEmail }}
-
{{row.phoneNumber}}
+
{{ row.phoneNumber }}
-
{{row.language | translate}}
+
{{ row.language | translate }}
@@ -117,35 +119,43 @@ + + -
- - - + + + + + +
@@ -156,7 +166,7 @@ phone_iphone - {{row.model}} ({{row.osVersion}}) + {{ row.model }} ({{ row.osVersion }}) @@ -164,7 +174,7 @@ android - {{row.model}} ({{row.osVersion}}) + {{ row.model }} ({{ row.osVersion }}) @@ -177,7 +187,8 @@ 'status-inactive': TaskWizardStatusesEnum[row.taskManagementEnabled ? 1 : 2] !== 'Active' }" > - {{TaskWizardStatusesEnum[row.taskManagementEnabled ? 1 : 2] | translate}} + {{ TaskWizardStatusesEnum[row.taskManagementEnabled ? 1 : 2] | translate }}
@@ -188,6 +199,7 @@ 'status-inactive': TaskWizardStatusesEnum[row.timeRegistrationEnabled ? 1 : 2] !== 'Active' }" > - {{TaskWizardStatusesEnum[row.timeRegistrationEnabled ? 1 : 2] | translate}} + {{ TaskWizardStatusesEnum[row.timeRegistrationEnabled ? 1 : 2] | translate }} diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/components/task-wizard-table/task-wizard-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/components/task-wizard-table/task-wizard-table.component.html index e1c37649c..7aa281601 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/components/task-wizard-table/task-wizard-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/components/task-wizard-table/task-wizard-table.component.html @@ -1,7 +1,7 @@ + + +
+ + + + + + + + +
+
+ + diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/components/task-wizard-table/task-wizard-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/components/task-wizard-table/task-wizard-table.component.ts index d041f04c3..abf15cb66 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/components/task-wizard-table/task-wizard-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/components/task-wizard-table/task-wizard-table.component.ts @@ -82,43 +82,7 @@ export class TaskWizardTableComponent implements OnInit, OnDestroy { sortProp: {id: 'AssignedTo'}, formatter: (model: TaskWizardModel) => model.assignedTo.join('
') }, - { - field: 'actions', - header: this.translateService.stream('Actions'), - type: 'button', - width: '180px', - pinned: 'right', - right: '0px', - buttons: [ - { - iif: (model: TaskWizardModel) => model.createdInGuide, - color: 'accent', - type: 'icon', - icon: 'edit', - tooltip: this.translateService.stream('Edit task'), - click: (model: TaskWizardModel) => this.editTask.emit(model), - class: 'editBtn', - }, - { - iif: (model: TaskWizardModel) => model.createdInGuide, - color: 'accent', - type: 'icon', - icon: 'content_copy', - tooltip: this.translateService.stream('Copy task'), - click: (model: TaskWizardModel) => this.copyTask.emit(model), - class: 'copyBtn', - }, - { - iif: (model: TaskWizardModel) => model.createdInGuide, - color: 'warn', - type: 'icon', - icon: 'delete', - tooltip: this.translateService.stream('Delete task'), - click: (model: TaskWizardModel) => this.deleteTask.emit(model), - class: 'deleteBtn', - }, - ], - }, + { field: 'actions', header: this.translateService.stream('Actions'), pinned: 'right' } ]; public selectTaskWizardPaginationSort$ = this.store.select(selectTaskWizardPaginationSort); public selectTaskWizardPaginationIsSortDsc$ = this.store.select(selectTaskWizardPaginationIsSortDsc); diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/task-wizard.module.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/task-wizard.module.ts index 47411d2a2..adefdf3f3 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/task-wizard.module.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-wizard/task-wizard.module.ts @@ -28,6 +28,7 @@ import {FormattingTextEditorModule} from 'src/app/common/modules/eform-imported/ import {MatCardModule} from '@angular/material/card'; import {PlanningsModule} from '../../../items-planning-pn/modules/plannings/plannings.module'; import {StatisticsModule} from '../statistics/statistics.module'; +import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu"; @NgModule({ imports: [ @@ -53,6 +54,9 @@ import {StatisticsModule} from '../statistics/statistics.module'; MatCardModule, PlanningsModule, StatisticsModule, + MatMenu, + MatMenuItem, + MatMenuTrigger, ], declarations: [ TaskWizardFiltersComponent,