diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/BackendConfiguration.Pn.Integration.Test.csproj b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/BackendConfiguration.Pn.Integration.Test.csproj index feb8c9ec6..22b6f1493 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/BackendConfiguration.Pn.Integration.Test.csproj +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/BackendConfiguration.Pn.Integration.Test.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Test/BackendConfiguration.Pn.Test.csproj b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Test/BackendConfiguration.Pn.Test.csproj index c4fbf308d..c2bee5f9b 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Test/BackendConfiguration.Pn.Test.csproj +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Test/BackendConfiguration.Pn.Test.csproj @@ -11,7 +11,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/BackendConfiguration.Pn.csproj b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/BackendConfiguration.Pn.csproj index b870e1a55..20bc50d31 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/BackendConfiguration.Pn.csproj +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/BackendConfiguration.Pn.csproj @@ -219,15 +219,15 @@ - - - + + + - - - - - + + + + + diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationAreaRulePlanningsServiceHelper.cs b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationAreaRulePlanningsServiceHelper.cs index c4961a878..0b3fee145 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationAreaRulePlanningsServiceHelper.cs +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationAreaRulePlanningsServiceHelper.cs @@ -1,3 +1,4 @@ +#nullable enable using System; using System.Collections.Generic; using System.Linq; diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationTaskTrackerHelper.cs b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationTaskTrackerHelper.cs index e184ce1c8..f8bef0075 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationTaskTrackerHelper.cs +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationTaskTrackerHelper.cs @@ -70,7 +70,8 @@ public static async Task>> Index( .Select(x => new { x.PropertyId, x.PlanningId, x.Deadline, x.MicrotingSdkCaseId, x.MicrotingSdkeFormId, x.Id, x.AreaId, - x.PlanningCaseSiteId + x.PlanningCaseSiteId, + x.MovedToExpiredFolder }) .ToListAsync(); @@ -289,6 +290,7 @@ public static async Task>> Index( SdkFolderName = folderTranslations.FirstOrDefault(x => x.FolderId == planning.SdkFolderId) == null ? "" : folderTranslations.First(x => x.FolderId == planning.SdkFolderId).Name, CreatedInWizard = areaRuleCreatedInWizard, + MovedToExpiredFolder = compliance.MovedToExpiredFolder }; if (complianceModel.SdkCaseId == 0 && complianceModel.DeadlineTask < dateTimeNow) diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/GoogleSheetHelper.cs b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/GoogleSheetHelper.cs index f05abf3ca..83719160a 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/GoogleSheetHelper.cs +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/GoogleSheetHelper.cs @@ -163,7 +163,7 @@ public static async Task PushToGoogleSheet(Core core, TimePlanningPnDbContext db // ... existing code ... - SetAlternatingColumnColors(service, googleSheetId, sheetId!.Value, newHeaders.Count, logger); + // SetAlternatingColumnColors(service, googleSheetId, sheetId!.Value, newHeaders.Count, logger); logger.LogInformation("Headers are already up-to-date."); } diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/WorkOrderHelper.cs b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/WorkOrderHelper.cs index ce0b27fca..9343c0107 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/WorkOrderHelper.cs +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/WorkOrderHelper.cs @@ -1,3 +1,4 @@ +#nullable enable using System; using System.Collections.Generic; using System.Globalization; diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Files/BackendConfigurationFileRequestModel.cs b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Files/BackendConfigurationFileRequestModel.cs index d2dc609f3..72ac08239 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Files/BackendConfigurationFileRequestModel.cs +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Files/BackendConfigurationFileRequestModel.cs @@ -22,6 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#nullable enable namespace BackendConfiguration.Pn.Infrastructure.Models.Files; using Microting.eFormApi.BasePn.Infrastructure.Models.Common; diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/TaskTracker/TaskTrackerModel.cs b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/TaskTracker/TaskTrackerModel.cs index 91fbd62c3..ec1cf0434 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/TaskTracker/TaskTrackerModel.cs +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/TaskTracker/TaskTrackerModel.cs @@ -47,7 +47,7 @@ public class TaskTrackerModel /// /// Gets or sets the tags of the task tracker model. /// - public List Tags { get; set; } + public List Tags { get; set; } = []; /// @@ -130,4 +130,6 @@ public class TaskTrackerModel public string SdkFolderName { get; set; } public bool CreatedInWizard { get; set; } + + public bool MovedToExpiredFolder { get; set; } } \ No newline at end of file diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/PairItemWithSiteHelper.cs b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/PairItemWithSiteHelper.cs index e22e15a25..6e92a92a1 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/PairItemWithSiteHelper.cs +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/PairItemWithSiteHelper.cs @@ -396,7 +396,7 @@ await sdkDbContext.FolderTranslations.SingleOrDefaultAsync(x => private static async Task GetTopFolder(int folderId, MicrotingDbContext dbContext) { - var result = await dbContext.Folders.FirstOrDefaultAsync(y => y.Id == folderId).ConfigureAwait(false); + var result = await dbContext.Folders.FirstAsync(y => y.Id == folderId).ConfigureAwait(false); if (result.ParentId != null) { result = await GetTopFolder((int)result.ParentId, dbContext).ConfigureAwait(false); diff --git a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationPropertiesService/BackendConfigurationPropertiesService.cs b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationPropertiesService/BackendConfigurationPropertiesService.cs index f21567c59..1435b2210 100644 --- a/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationPropertiesService/BackendConfigurationPropertiesService.cs +++ b/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationPropertiesService/BackendConfigurationPropertiesService.cs @@ -611,7 +611,7 @@ public async Task>> GetLinkedFolde .Where(x => x.Id == propertyId) .Where(x => x.WorkflowState != Constants.WorkflowStates.Removed) .Where(x => x.FolderId.HasValue) - .Select(x => x.FolderId.Value) + .Select(x => x.FolderId!.Value) .ToListAsync(); folderIds.AddRange(await backendConfigurationPnDbContext.ProperyAreaFolders @@ -655,7 +655,7 @@ public async Task>> GetLinkedFolde .Where(x => propertyIds.Contains(x.Id)) .Where(x => x.WorkflowState != Constants.WorkflowStates.Removed) .Where(x => x.FolderId.HasValue) - .Select(x => x.FolderId.Value) + .Select(x => x.FolderId!.Value) .ToListAsync(); folderIds.AddRange(await backendConfigurationPnDbContext.ProperyAreaFolders @@ -748,6 +748,12 @@ public async Task>> GetLinkedSit //.Where(x => propertyIds.Contains(x.PropertyId)) .Where(x => x.WorkflowState != Constants.WorkflowStates.Removed); + // if propertyIds is null or empty return an empty list + if (propertyIds == null || !propertyIds.Any()) + { + return new OperationDataResult>(true, new List()); + } + if (propertyIds.Any()) { query = query.Where(x => propertyIds.Contains(x.PropertyId)); diff --git a/eform-client/cypress/e2e/plugins/backend-configuration-pn/c/task-wizard.delete.spec.cy.ts b/eform-client/cypress/e2e/plugins/backend-configuration-pn/c/task-wizard.delete.spec.cy.ts index 23e1b405d..681e3629b 100644 --- a/eform-client/cypress/e2e/plugins/backend-configuration-pn/c/task-wizard.delete.spec.cy.ts +++ b/eform-client/cypress/e2e/plugins/backend-configuration-pn/c/task-wizard.delete.spec.cy.ts @@ -98,12 +98,38 @@ describe('Area rules type 1', () => { cy.wait(500); cy.get('.cdk-row').should('have.length', 1); - cy.get('.cdk-row .cdk-column-actions .deleteBtn.mat-warn').first().click(); + // Open the action menu + cy.get('.task-actions') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Click the Delete Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=deleteTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); + cy.get('#taskWizardDeleteCancelBtn').click(); cy.wait(500); cy.get('.cdk-row').should('have.length', 1); - cy.get('.cdk-row .cdk-column-actions .deleteBtn.mat-warn').first().click(); + // Open the action menu again + cy.get('.task-actions') + .first() + .find('#actionMenu') + .should('be.visible') + .click({ force: true }); + + // Click the Delete Task button inside the opened menu + cy.get('.cdk-overlay-container') + .find('[id^=deleteTaskBtn]') + .should('be.visible') + .first() + .click({ force: true }); + cy.get('#taskWizardDeleteDeleteBtn').click(); cy.wait(500); cy.get('.cdk-row').should('not.exist'); diff --git a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationAreaRules.page.ts b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationAreaRules.page.ts index 7bf64c678..da76582f6 100644 --- a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationAreaRules.page.ts +++ b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationAreaRules.page.ts @@ -167,6 +167,14 @@ export class BackendConfigurationAreaRulesPage extends Page { } public async updateEntityList() { + // Open the action menu first (required for type 3 area rules where the button is in a dropdown) + await browser.pause(1000); + const actionMenu = await $$('#actionMenu')[0]; + await actionMenu.waitForDisplayed({ timeout: 40000 }); + await actionMenu.waitForClickable({ timeout: 40000 }); + await actionMenu.click(); + await browser.pause(1000); + const ele = await $(`.updateEntityList`); await ele.waitForDisplayed({ timeout: 40000 }); await ele.waitForClickable({ timeout: 40000 }); @@ -333,7 +341,9 @@ export class BackendConfigurationAreaRulesPage extends Page { } else { await (await this.entityListSaveBtn()).click(); } - await (await this.updateEntityList()).waitForClickable({ timeout: 40000 }) + // Wait for the action menu button to be clickable again (instead of opening the menu) + const actionMenu = await $$('#actionMenu')[0]; + await actionMenu.waitForClickable({ timeout: 40000 }); } public async editEntityItem(index: number, newName: string, clickCancel = false) { @@ -466,6 +476,7 @@ export class AreaRuleRowObject { } public async delete(clickCancel = false, waitCreateBtn = true) { + // await this.clickActionsMenu(); if (this.deleteRuleBtn) { await this.openDeleteModal(); await this.closeDeleteModal(clickCancel, waitCreateBtn); @@ -505,10 +516,17 @@ export class AreaRuleRowObject { clickCancel = false, waitCreateBtn = true ) { + // await this.clickActionsMenu(); await this.openEditModal(areaRule); await this.closeEditModal(clickCancel, waitCreateBtn); } + private async clickActionsMenu() { + await browser.pause(1000); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); + } + public async openEditModal(areaRule: AreaRuleCreateUpdate) { await this.editRuleBtn.click(); await browser.pause(500); diff --git a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationDocuments.page.ts b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationDocuments.page.ts index a716f6246..de5a07f15 100644 --- a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationDocuments.page.ts +++ b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationDocuments.page.ts @@ -283,10 +283,17 @@ export class FileRowObject { } public async delete(clickCancel = false) { + await this.clickActionsMenu(); await this.openDeleteModal(); await this.closeDeleteModal(clickCancel); } + private async clickActionsMenu() { + await browser.pause(1000); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); + } + public async openDeleteModal() { await this.deleteFileBtn.click(); await ( @@ -310,6 +317,7 @@ export class FileRowObject { } public async editFile(fileEdit: BackendFileEdit, clickCancel = false) { + await this.clickActionsMenu(); await this.openEditModal(fileEdit); await this.closeEditModal(clickCancel); if (fileEdit.tags && fileEdit.tags.length > 0) { diff --git a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationFiles.page.ts b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationFiles.page.ts index 97ccf4990..a36d8ecc6 100644 --- a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationFiles.page.ts +++ b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationFiles.page.ts @@ -268,8 +268,6 @@ export class FileRowObject { constructor() { } - public row: WebdriverIO.Element; - public checkbox: WebdriverIO.Element; public id: number; public createDate: string; public fileName: string; @@ -282,45 +280,32 @@ export class FileRowObject { public async getRow(rowNum: number): Promise { rowNum = rowNum - 1; - this.row = (await $$('tbody > tr'))[rowNum]; - if (this.row) { - this.checkbox = await this.row.$('.mat-column-select .column-select'); - this.id = +await (await this.row.$('.mat-column-id span')).getText(); - this.createDate = await (await this.row.$('.mat-column-createDate span')).getText(); - this.fileName = await (await this.row.$('.mat-column-fileName span')).getText(); - const properties = await this.row.$$('.mat-column-property mat-chip'); - this.properties = []; - for (let i = 0; i < properties.length; i++) { - const text = await properties[i].getText(); - this.properties.push(text.toString()); - } - // if (properties.length > 0) { - // properties[properties.length - 1] = properties[properties.length - 1].replace('edit', ''); // delete button - // this.properties = properties - // .filter(x => x) // delete empty strings - // .map(x => x.replaceAll('\n', '')); // delete enters - // } - const tags = await this.row.$$('.mat-column-tags mat-chip'); - this.tags = []; - for (let i = 0; i < tags.length; i++) { - const text = await tags[i].getText(); - this.tags.push(text.toString()); - } - // if (tags.length > 0) { - // // tags[tags.length - 1] = tags[tags.length - 1].replace('edit', ''); // delete button - // this.tags = tags - // //.filter(x => x.te) // delete empty strings - // .map(x => (await x.getText()).replaceAll('\n', '')); // delete enters - // } - this.editTagsBtn = await this.row.$('.mat-column-tags button'); - this.viewPDFBtn = await this.row.$$('.mat-column-actions button')[0]; - this.editFileNameBtn = await this.row.$$('.mat-column-actions button')[1]; - this.deleteFileBtn = await this.row.$$('.mat-column-actions button')[2]; + this.id = +await (await $('#fileId-'+rowNum)).getText(); + this.createDate = await (await $('#fileCreateDate-'+rowNum)).getText(); + this.fileName = await (await $('#fileName-'+rowNum)).getText(); + // Get properties from mat-chip elements - need to use row context since it's dynamic + const row = (await $$('tbody > tr'))[rowNum]; + const properties = await row.$$('.mat-column-property mat-chip'); + this.properties = []; + for (let i = 0; i < properties.length; i++) { + const text = await properties[i].getText(); + this.properties.push(text.toString()); } + const tags = await row.$$('.mat-column-tags mat-chip'); + this.tags = []; + for (let i = 0; i < tags.length; i++) { + const text = await tags[i].getText(); + this.tags.push(text.toString()); + } + this.editTagsBtn = await $('#editTagsBtn-'+rowNum); + this.viewPDFBtn = await $('#viewPdfBtn-'+rowNum); + this.editFileNameBtn = await $('#editFilenameBtn-'+rowNum); + this.deleteFileBtn = await $('#deleteFileBtn-'+rowNum); return this; } public async delete(clickCancel = false) { + await this.clickActionsMenu(); await this.openDeleteModal(); await this.closeDeleteModal(clickCancel); } @@ -348,6 +333,7 @@ export class FileRowObject { } public async editFile(fileEdit: BackendFileEdit, clickCancel = false) { + await this.clickActionsMenu(); await this.openEditModal(fileEdit); await this.closeEditModal(clickCancel); if (fileEdit.tags && fileEdit.tags.length > 0) { @@ -355,6 +341,12 @@ export class FileRowObject { } } + private async clickActionsMenu() { + await browser.pause(1000); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); + } + public async openEditModal(fileEdit: BackendFileEdit) { await this.editFileNameBtn.click(); await ( diff --git a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationProperties.page.ts b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationProperties.page.ts index 0884b2707..1c77ee1f1 100644 --- a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationProperties.page.ts +++ b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationProperties.page.ts @@ -326,6 +326,7 @@ export class PropertyRowObject { } public async delete(clickCancel = false) { + await this.clickActionsMenu(); await this.openDeleteModal(); await this.closeDeleteModal(clickCancel); } @@ -353,6 +354,7 @@ export class PropertyRowObject { } public async edit(property: PropertyCreateUpdate, clickCancel = false) { + await this.clickActionsMenu(); await this.openEditModal(property); await this.closeEditModal(clickCancel); } @@ -431,6 +433,7 @@ export class PropertyRowObject { } public async editBindWithAreas(bindAreas?: number[], clickCancel = false) { + await this.clickActionsMenu(); await this.openBindPropertyWithAreasModal(bindAreas); await this.closeBindPropertyWithAreasModal(clickCancel); } @@ -469,6 +472,7 @@ export class PropertyRowObject { } public async getBindAreas() { + await this.clickActionsMenu(); await this.openBindPropertyWithAreasModal(); await browser.pause(500); const checkboxes = await $$(`mat-checkbox-input`); @@ -480,6 +484,7 @@ export class PropertyRowObject { } public async openAreasViewModal(indexAreaForClick: number) { + await this.clickActionsMenu() await this.editPropertyAreasBtn.waitForClickable({ timeout: 40000 }); await this.editPropertyAreasBtn.click(); await ( @@ -506,6 +511,12 @@ export class PropertyRowObject { await backendConfigurationPropertiesPage.propertyCreateBtn() ).waitForClickable({ timeout: 40000 }); } + + private async clickActionsMenu() { + await browser.pause(1000); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); + } } export class PropertyCreateUpdate { diff --git a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationPropertyWorkers.page.ts b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationPropertyWorkers.page.ts index 130875f7d..618cd73b0 100644 --- a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationPropertyWorkers.page.ts +++ b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationPropertyWorkers.page.ts @@ -162,7 +162,7 @@ class BackendConfigurationPropertyWorkersPage extends Page { } public async rowNum(): Promise { - await browser.pause(500); + await browser.pause(1000); return (await $$('tbody > tr')).length; } @@ -296,6 +296,7 @@ export class PropertyWorkerRowObject { } async delete(clickCancel = false) { + await this.clickActionsMenu(); await this.openDeleteModal(); await this.closeDeleteModal(clickCancel); } @@ -328,6 +329,7 @@ export class PropertyWorkerRowObject { } async edit(propertyWorker?: PropertyWorker, clickCancel = false) { + await this.clickActionsMenu(); await this.openEditModal(propertyWorker); await this.closeEditModal(clickCancel); } @@ -409,6 +411,7 @@ export class PropertyWorkerRowObject { async getAssignedProperties(): Promise< { propertyName: string; checked: boolean }[] > { + await this.clickActionsMenu(); await this.openEditModal(); const pairingEditModalTableBody = await $('#pairingModalTableBody'); let masForReturn: { propertyName: string; checked: boolean }[] = new Array<{ @@ -433,6 +436,12 @@ export class PropertyWorkerRowObject { await this.closeEditModal(true); return masForReturn; } + + private async clickActionsMenu() { + await browser.pause(1000); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); + } } export class PropertyWorker { diff --git a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationTaskManagement.page.ts b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationTaskManagement.page.ts index 89d912cf9..b27f66923 100644 --- a/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationTaskManagement.page.ts +++ b/eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationTaskManagement.page.ts @@ -381,8 +381,8 @@ export class TaskRowObject { this.createdBy1 = await (await $$('td.createdByName')[rowNum]).getText(); this.createdBy2 = await (await $$('td.createdByText')[rowNum]).getText(); this.lastAssignedTo = await (await $$('td.lastAssignedTo')[rowNum]).getText(); - this.showTaskBtn = await $$('button.taskManagementViewBtn')[rowNum]; - this.deleteTaskBtn = await $$('button.taskManagementDeleteTaskBtn')[rowNum]; + this.showTaskBtn = await $('#taskManagementViewBtn-'+rowNum); + this.deleteTaskBtn = await $('#taskManagementDeleteTaskBtn-'+rowNum); this.description = await (await $$('td.description')[rowNum]).getText(); this.lastUpdatedDate = await (await $$('td.lastUpdateDate')[rowNum]).getText(); this.lastUpdatedBy = await (await $$('td.lastUpdatedBy')[rowNum]).getText(); @@ -391,19 +391,16 @@ export class TaskRowObject { } public async delete(clickCancel = false) { - if (this.deleteTaskBtn) { - await this.openDeleteModal(); - await this.closeDeleteModal(clickCancel); - } + await this.clickActionsMenu(); + await this.openDeleteModal(); + await this.closeDeleteModal(clickCancel); } public async openDeleteModal() { - if (this.deleteTaskBtn) { - await this.deleteTaskBtn.click(); - await ( - await backendConfigurationTaskManagementPage.taskManagementDeleteCancelBtn() - ).waitForClickable({ timeout: 40000 }); - } + await this.deleteTaskBtn.click(); + await ( + await backendConfigurationTaskManagementPage.taskManagementDeleteCancelBtn() + ).waitForClickable({ timeout: 40000 }); } public async closeDeleteModal(clickCancel = false) { @@ -476,6 +473,12 @@ export class TaskRowObject { await this.closeShowModal(true); return task; } + + private async clickActionsMenu() { + await browser.pause(1000); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); + } } export class TaskCreateShow { diff --git a/eform-client/e2e/Tests/backend-configuration-general/property-workers/backend-configuration-property-workers.create.spec.ts b/eform-client/e2e/Tests/backend-configuration-general/property-workers/backend-configuration-property-workers.create.spec.ts index 6d245aa78..c9bef8e12 100644 --- a/eform-client/e2e/Tests/backend-configuration-general/property-workers/backend-configuration-property-workers.create.spec.ts +++ b/eform-client/e2e/Tests/backend-configuration-general/property-workers/backend-configuration-property-workers.create.spec.ts @@ -34,7 +34,8 @@ describe('Backend Configuration Property Workers - Create and edit', function () it('should create worker and pair to created property', async () => { await backendConfigurationPropertiesPage.createProperty(property); const lastProperty = await backendConfigurationPropertiesPage.getLastPropertyRowObject(); - expect(await lastProperty.editPropertyAreasBtn.isEnabled()).eq(false); + // await $$('#actionMenu')[0].click(); + // expect(await lastProperty.editPropertyAreasBtn.isEnabled()).eq(false); await backendConfigurationPropertyWorkersPage.goToPropertyWorkers(); await backendConfigurationPropertyWorkersPage.create(workerForCreate); const worker = await backendConfigurationPropertyWorkersPage.getLastRowObject(); @@ -75,6 +76,9 @@ describe('Backend Configuration Property Workers - Create and edit', function () // expect(worker.lastName).eq(workerForCreate.surname); expect(worker.language).eq(workerForCreate.language); // check inputs + await browser.pause(500); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); await worker.openEditModal(null); expect( await ( diff --git a/eform-client/e2e/Tests/backend-configuration-general/property-workers/backend-configuration-property-workers.edit.spec.ts b/eform-client/e2e/Tests/backend-configuration-general/property-workers/backend-configuration-property-workers.edit.spec.ts index 14a0bb8ff..49e74b3c0 100644 --- a/eform-client/e2e/Tests/backend-configuration-general/property-workers/backend-configuration-property-workers.edit.spec.ts +++ b/eform-client/e2e/Tests/backend-configuration-general/property-workers/backend-configuration-property-workers.edit.spec.ts @@ -34,7 +34,7 @@ describe('Backend Configuration Property Workers - Create and edit', function () it('should create worker and pair to created property', async () => { await backendConfigurationPropertiesPage.createProperty(property); const lastProperty = await backendConfigurationPropertiesPage.getLastPropertyRowObject(); - expect(await lastProperty.editPropertyAreasBtn.isEnabled()).eq(false); + // expect(await lastProperty.editPropertyAreasBtn.isEnabled()).eq(false); await backendConfigurationPropertyWorkersPage.goToPropertyWorkers(); await backendConfigurationPropertyWorkersPage.create(workerForCreate); await browser.pause(500); @@ -76,6 +76,9 @@ describe('Backend Configuration Property Workers - Create and edit', function () // expect(worker.lastName).eq(workerForCreate.surname); expect(worker.language).eq(workerForCreate.language); // check inputs + await browser.pause(500); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); await worker.openEditModal(null); expect( await ( diff --git a/eform-client/e2e/Tests/backend-configuration-general/task-management/backend-configuration-task-management.delete.spec.ts b/eform-client/e2e/Tests/backend-configuration-general/task-management/backend-configuration-task-management.delete.spec.ts index 0576f4a29..fa63ec11c 100644 --- a/eform-client/e2e/Tests/backend-configuration-general/task-management/backend-configuration-task-management.delete.spec.ts +++ b/eform-client/e2e/Tests/backend-configuration-general/task-management/backend-configuration-task-management.delete.spec.ts @@ -40,6 +40,9 @@ describe('Backend Configuration Task Manager Delete Task', function () { await backendConfigurationPropertyWorkersPage.create(workerForCreate); await backendConfigurationPropertiesPage.goToProperties(); const createdProperty = await backendConfigurationPropertiesPage.getLastPropertyRowObject(); + await browser.pause(1000); + await $$('#actionMenu')[0].click(); + await browser.pause(1000); await createdProperty.propertyTaskAreasBtn.click(); for (let i = 0; i < (areas).length; i++) { const btn = await $('#addSingleEntitySelectableItem'); diff --git a/eform-client/e2e/Tests/backend-configuration-settings/application-settings.plugins-page.spec.ts b/eform-client/e2e/Tests/backend-configuration-settings/application-settings.plugins-page.spec.ts index 1cc61eebf..ac5729b38 100644 --- a/eform-client/e2e/Tests/backend-configuration-settings/application-settings.plugins-page.spec.ts +++ b/eform-client/e2e/Tests/backend-configuration-settings/application-settings.plugins-page.spec.ts @@ -3,6 +3,7 @@ import myEformsPage from '../../Page objects/MyEforms.page'; import pluginPage from '../../Page objects/Plugin.page'; import { expect } from 'chai'; +import { $ } from '@wdio/globals'; describe('Application settings page - site header section', function () { before(async () => { @@ -17,47 +18,104 @@ describe('Application settings page - site header section', function () { }); it('should activate the plugin', async () => { - let plugin = await pluginPage.getFirstPluginRowObj(); + // Helper function to activate a plugin by index using action menu + const activatePlugin = async (index: number, pluginName: string) => { + // Open action menu + const actionMenuBtn = await $(`#action-items-${index - 1}`).$('#actionMenu'); + await actionMenuBtn.waitForDisplayed({ timeout: 40000 }); + await actionMenuBtn.waitForClickable({ timeout: 40000 }); + await actionMenuBtn.click(); + await browser.pause(500); + + // Click on the status button inside the menu + const statusBtn = await $(`#plugin-status-button${index - 1}`); + await statusBtn.waitForDisplayed({ timeout: 40000 }); + await statusBtn.waitForClickable({ timeout: 40000 }); + await statusBtn.click(); + await browser.pause(500); + + // Confirm activation in the modal + const pluginOKBtn = await $('#pluginOKBtn'); + await pluginOKBtn.waitForDisplayed({ timeout: 40000 }); + await pluginOKBtn.click(); + await browser.pause(100000); // We need to wait 100 seconds for the plugin to create db etc. + + // Re-login and navigate back to plugins page + await loginPage.open('/'); + await loginPage.login(); + await myEformsPage.Navbar.goToPluginsPage(); + await browser.pause(500); + }; + + // Helper function to check plugin status via action menu + const checkPluginStatus = async (index: number, expectedStatus: string, pluginName: string) => { + // Open action menu + const actionMenuBtn = await $(`#action-items-${index - 1}`).$('#actionMenu'); + await actionMenuBtn.waitForDisplayed({ timeout: 40000 }); + await actionMenuBtn.waitForClickable({ timeout: 40000 }); + await actionMenuBtn.click(); + await browser.pause(500); + + // Check status + const statusBtn = await $(`#plugin-status-button${index - 1}`); + await statusBtn.waitForDisplayed({ timeout: 40000 }); + const statusIcon = await statusBtn.$('mat-icon'); + const status = await statusIcon.getText(); + expect(status, `${pluginName} status is not ${expectedStatus}`).eq(expectedStatus); + + // Close the menu + await browser.keys(['Escape']); + await browser.pause(300); + }; + + // Find and activate Microting Items Planning Plugin for (let i = 1; i < 10; i++) { const plugin = await pluginPage.getPluginRowObjByIndex(i); if (plugin.name === 'Microting Items Planning Plugin') { - await plugin.enableOrDisablePlugin(); + await activatePlugin(i, plugin.name); break; } } + + // Find and activate Microting Time Planning Plugin for (let i = 1; i < 10; i++) { const plugin = await pluginPage.getPluginRowObjByIndex(i); if (plugin.name === 'Microting Time Planning Plugin') { - await plugin.enableOrDisablePlugin(); + await activatePlugin(i, plugin.name); break; } } + + // Find and activate Microting Backend Configuration Plugin for (let i = 1; i < 10; i++) { const plugin = await pluginPage.getPluginRowObjByIndex(i); if (plugin.name === 'Microting Backend Configuration Plugin') { - await plugin.enableOrDisablePlugin(); + await activatePlugin(i, plugin.name); break; } } + // Verify all plugins are activated for (let i = 1; i < 10; i++) { const plugin = await pluginPage.getPluginRowObjByIndex(i); if (plugin.name === 'Microting Items Planning Plugin') { - expect(plugin.status, 'Microting Items Planning Plugin is not enabled').eq('toggle_on'); + await checkPluginStatus(i, 'toggle_on', plugin.name); break; } } + for (let i = 1; i < 10; i++) { const plugin = await pluginPage.getPluginRowObjByIndex(i); if (plugin.name === 'Microting Time Planning Plugin') { - expect(plugin.status, 'Microting Time Planning Plugin is not enabled').eq('toggle_on'); + await checkPluginStatus(i, 'toggle_on', plugin.name); break; } } + for (let i = 1; i < 10; i++) { const plugin = await pluginPage.getPluginRowObjByIndex(i); if (plugin.name === 'Microting Backend Configuration Plugin') { - expect(plugin.status, 'Microting Backend Configuration Plugin is not enabled').eq('toggle_on'); + await checkPluginStatus(i, 'toggle_on', plugin.name); break; } } 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 6648585b7..473c2d93a 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 @@ -102,7 +102,7 @@ (click)="onShowEditPropertyModal(row)" [disabled]="!authStateService.checkClaim('property_edit') && (selectAuthIsAdmin$ | async) !== true" > - edit + edit_square {{ 'Edit property' | translate }} - delete + delete {{ 'Delete property' | translate }} diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.html index 131941fb3..20fd988d7 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.html @@ -1,6 +1,9 @@ + + + + + more_vert + + + + + image + {{ 'View images' | translate }} + + + edit + {{ 'Edit' | translate }} + + + delete + {{ 'Delete' | translate }} + + + + diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.ts index 28f218290..1aad37fdd 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.ts @@ -54,29 +54,8 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { { header: this.translateService.stream('Actions'), field: 'actions', - type: 'button', - buttons: [ - { - tooltip: this.translateService.stream('View images'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onClickViewPicture(record.microtingSdkCaseId), - icon: 'image', - iif: (record: ReportEformItemModel) => record.imagesCount !== 0, - }, - { - tooltip: this.translateService.stream('Edit'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onClickEditCase(record.microtingSdkCaseId, record.eFormId, record.id), - icon: 'edit', - }, - { - tooltip: this.translateService.stream('Delete'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onShowDeletePlanningCaseModal(record), - color: 'warn', - icon: 'delete', - } - ] + width: '160px', + pinned: 'right', }, ]; adminTableHeaders: MtxGridColumn[] = [ @@ -96,29 +75,8 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { { header: this.translateService.stream('Actions'), field: 'actions', - type: 'button', - buttons: [ - { - tooltip: this.translateService.stream('View images'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onClickViewPicture(record.microtingSdkCaseId), - icon: 'image', - iif: (record: ReportEformItemModel) => record.imagesCount !== 0, - }, - { - tooltip: this.translateService.stream('Edit'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onClickEditCase(record.microtingSdkCaseId, record.eFormId, record.id), - icon: 'edit', - }, - { - tooltip: this.translateService.stream('Delete'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onShowDeletePlanningCaseModal(record), - color: 'warn', - icon: 'delete', - } - ] + width: '160px', + pinned: 'right', }, ]; mergedTableHeaders: MtxGridColumn[] = []; @@ -169,12 +127,8 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { }; }); if (this.isAdmin) { - this.adminTableHeaders.find(x => x.field === 'actions').class = ((record: ReportEformItemModel, _) => - record ? `id-${record.id}` : '');//microtingSdkCaseId${record.microtingSdkCaseId}-eFormId${record.eFormId}- this.mergedTableHeaders = [...this.adminTableHeaders, ...itemHeaders]; } else { - this.tableHeaders.find(x => x.field === 'actions').class = ((record: ReportEformItemModel, _) => - record ? `id-${record.id}` : '');//microtingSdkCaseId${record.microtingSdkCaseId}-eFormId${record.eFormId}- this.mergedTableHeaders = [...this.tableHeaders, ...itemHeaders]; } } diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/bgBG.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/bgBG.ts index 4d02bee0f..8618f9193 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/bgBG.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/bgBG.ts @@ -291,4 +291,5 @@ export const bgBG = { 'PIN code': 'ПИН код', 'Employee no': 'Служител №', 'Deactivate task': 'Деактивирайте задачата', + Areas: 'Области', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/csCZ.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/csCZ.ts index b38bbcb64..76b146494 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/csCZ.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/csCZ.ts @@ -291,4 +291,5 @@ export const csCZ = { 'PIN code': 'PIN kód', 'Employee no': 'Zaměstnanec č', 'Deactivate task': 'Deaktivovat úkol', + Areas: 'Oblasti', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/da.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/da.ts index 1e8fffdef..bcbbf7e18 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/da.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/da.ts @@ -293,4 +293,5 @@ export const da = { 'PIN code': 'PIN kode', 'Employee no': 'Medarbejder nummer', 'Deactivate task': 'Deaktiver opgave', + Areas: 'Områder', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/deDE.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/deDE.ts index 0cc959063..b1fdc70be 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/deDE.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/deDE.ts @@ -352,4 +352,5 @@ export const deDE = { 'PIN code': 'Geheimzahl', 'Employee no': 'Mitarbeiter-Nr.', 'Deactivate task': 'Aufgabe deaktivieren', + Areas: 'Gebiete', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/elGR.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/elGR.ts index df87843ac..d014a24b7 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/elGR.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/elGR.ts @@ -291,4 +291,5 @@ export const elGR = { 'PIN code': 'Κωδικό PIN', 'Employee no': 'Υπάλληλος αρ', 'Deactivate task': 'Απενεργοποίηση εργασίας', + Areas: 'Περιοχές', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/enUS.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/enUS.ts index e8f898221..f5111d8cc 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/enUS.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/enUS.ts @@ -308,4 +308,5 @@ export const enUS= { 'PIN code': 'PIN code', 'Employee no': 'Employee no', 'Deactivate task': 'Deactivate task', + 'Areas': 'Areas' }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/esES.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/esES.ts index 390313c30..a8d66ef6a 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/esES.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/esES.ts @@ -291,4 +291,5 @@ export const esES = { 'PIN code': 'Código PIN', 'Employee no': 'Numero de empleado', 'Deactivate task': 'Desactivar tarea', + Areas: 'Áreas', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/etET.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/etET.ts index 89dc24515..156fc666e 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/etET.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/etET.ts @@ -291,4 +291,5 @@ export const etET = { 'PIN code': 'PIN-koodi', 'Employee no': 'Töötaja nr', 'Deactivate task': 'Deaktiveerige ülesanne', + Areas: 'Piirkonnad', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/fiFI.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/fiFI.ts index 537844007..9fe59c376 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/fiFI.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/fiFI.ts @@ -291,4 +291,5 @@ export const fiFI = { 'PIN code': 'Pin-koodi', 'Employee no': 'Työntekijä nro', 'Deactivate task': 'Poista tehtävä käytöstä', + Areas: 'Alueet', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/frFR.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/frFR.ts index e1ecc1936..1b4216b2e 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/frFR.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/frFR.ts @@ -291,4 +291,5 @@ export const frFR = { 'PIN code': 'Code PIN', 'Employee no': 'Numéro d'employé', 'Deactivate task': 'Désactiver la tâche', + Areas: 'Zones', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/hrHR.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/hrHR.ts index fc4d32bf7..19352558f 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/hrHR.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/hrHR.ts @@ -291,4 +291,5 @@ export const hrHR = { 'PIN code': 'PIN kod', 'Employee no': 'Zaposlenik br', 'Deactivate task': 'Deaktiviraj zadatak', + Areas: 'Područja', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/huHU.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/huHU.ts index 1382cbd08..1855ab794 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/huHU.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/huHU.ts @@ -291,4 +291,5 @@ export const huHU = { 'PIN code': 'PIN-kód', 'Employee no': 'számú alkalmazott', 'Deactivate task': 'Inaktiválja a feladatot', + Areas: 'Területek', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/isIS.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/isIS.ts index dbd7fde7c..2c71cdf12 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/isIS.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/isIS.ts @@ -291,4 +291,5 @@ export const isIS = { 'PIN code': 'PIN númer', 'Employee no': 'Starfsmaður nr', 'Deactivate task': 'Slökktu á verkefni', + Areas: 'Svæði', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/itIT.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/itIT.ts index c40540cb7..ed52085c8 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/itIT.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/itIT.ts @@ -291,4 +291,5 @@ export const itIT = { 'PIN code': 'Codice PIN', 'Employee no': 'Dipendente n', 'Deactivate task': 'Disattivare l'attività', + Areas: 'Aree', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ltLT.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ltLT.ts index afc108cfa..10a2e2e06 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ltLT.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ltLT.ts @@ -291,4 +291,5 @@ export const ltLT = { 'PIN code': 'PIN kodas', 'Employee no': 'Darbuotojas Nr', 'Deactivate task': 'Išjungti užduotį', + Areas: 'Sritys', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/lvLV.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/lvLV.ts index 654754173..2c2a20986 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/lvLV.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/lvLV.ts @@ -291,4 +291,5 @@ export const lvLV = { 'PIN code': 'PIN kods', 'Employee no': 'Darbinieks Nr', 'Deactivate task': 'Deaktivizēt uzdevumu', + Areas: 'Apgabali', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/nlNL.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/nlNL.ts index 37505347e..0ad477fab 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/nlNL.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/nlNL.ts @@ -291,4 +291,5 @@ export const nlNL = { 'PIN code': 'Pincode', 'Employee no': 'Werknemer nummer', 'Deactivate task': 'Taak deactiveren', + Areas: 'Gebieden', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/noNO.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/noNO.ts index f39985fb9..082cbb0e2 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/noNO.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/noNO.ts @@ -291,4 +291,5 @@ export const noNO = { 'PIN code': 'PIN-kode', 'Employee no': 'Ansatt nummer', 'Deactivate task': 'Deaktiver oppgave', + Areas: 'Områder', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/plPL.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/plPL.ts index 0ed7a04ac..4c9595f7d 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/plPL.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/plPL.ts @@ -291,4 +291,5 @@ export const plPL = { 'PIN code': 'Kod PIN', 'Employee no': 'Pracownik numer', 'Deactivate task': 'Dezaktywuj zadanie', + Areas: 'Obszary', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptBR.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptBR.ts index 641cd4b73..b2f105ccc 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptBR.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptBR.ts @@ -291,4 +291,5 @@ export const ptBR = { 'PIN code': 'Código PIN', 'Employee no': 'Funcionário não', 'Deactivate task': 'Desativar tarefa', + Areas: 'Áreas', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptPT.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptPT.ts index e0e2d5781..72af5eab0 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptPT.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptPT.ts @@ -291,4 +291,5 @@ export const ptPT = { 'PIN code': 'Código PIN', 'Employee no': 'Funcionário não', 'Deactivate task': 'Desativar tarefa', + Areas: 'Áreas', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/roRO.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/roRO.ts index 9aaf0111a..ad87fd9dc 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/roRO.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/roRO.ts @@ -291,4 +291,5 @@ export const roRO = { 'PIN code': 'Cod PIN', 'Employee no': 'Angajat nr', 'Deactivate task': 'Dezactivați sarcina', + Areas: 'Zone', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/skSK.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/skSK.ts index 879699a23..ab514808b 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/skSK.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/skSK.ts @@ -291,4 +291,5 @@ export const skSK = { 'PIN code': 'PIN kód', 'Employee no': 'Zamestnanec č', 'Deactivate task': 'Deaktivovať úlohu', + Areas: 'Oblasti', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/slSL.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/slSL.ts index 100719f41..53d1338c1 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/slSL.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/slSL.ts @@ -291,4 +291,5 @@ export const slSL = { 'PIN code': 'PIN koda', 'Employee no': 'Uslužbenec št', 'Deactivate task': 'Deaktiviraj nalogo', + Areas: 'Območja', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/svSE.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/svSE.ts index d095f7ed7..51f766278 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/svSE.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/svSE.ts @@ -291,4 +291,5 @@ export const svSE = { 'PIN code': 'Pinkod', 'Employee no': 'Anställningsnummer', 'Deactivate task': 'Inaktivera uppgiften', + Areas: 'Områden', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ukUA.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ukUA.ts index 785311a09..6b09796db 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ukUA.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ukUA.ts @@ -291,4 +291,5 @@ export const ukUA = { 'PIN code': 'PIN-код', 'Employee no': 'Співробітник №', 'Deactivate task': 'Деактивувати завдання', + Areas: 'Області', }; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/models/task-tracker/task.model.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/models/task-tracker/task.model.ts index fcc1ae88b..1e4e8af95 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/models/task-tracker/task.model.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/models/task-tracker/task.model.ts @@ -23,6 +23,7 @@ export interface TaskModel { weeks: WeekListModel[]; sdkFolderName: string; createdInWizard: boolean; + movedToExpiredFolder: boolean } export interface WeekListModel { diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/area-rules.module.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/area-rules.module.ts index 3bd91073a..665579eee 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/area-rules.module.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/area-rules.module.ts @@ -25,6 +25,7 @@ import {MatInputModule} from '@angular/material/input'; import {MatCheckboxModule} from '@angular/material/checkbox'; import {MatCardModule} from '@angular/material/card'; import {MatTableModule} from '@angular/material/table'; +import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu"; @NgModule({ declarations: [ @@ -55,6 +56,9 @@ import {MatTableModule} from '@angular/material/table'; MatCheckboxModule, MatCardModule, MatTableModule, + MatMenuTrigger, + MatMenu, + MatMenuItem, ], }) export class AreaRulesModule { diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/components/area-rules-table/area-rules-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/components/area-rules-table/area-rules-table.component.html index 57d79e4e9..b5895a27e 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/components/area-rules-table/area-rules-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/components/area-rules-table/area-rules-table.component.html @@ -3,6 +3,7 @@ {{'Halebid' | translate}} {{'Morning tour' | translate}} {{'Pools' | translate}} matTooltip="{{ 'Edit rule' | translate }}" (click)="onShowEditRuleModal(row)" [disabled]="row.planningStatus"> - edit + edit_square {{'Pools' | translate}} + + + + more_vert + + + + + assignment + {{ 'Plan and assign' | translate }} + + + list + {{ 'Edit list of stables for tailbites' | translate }} + + + + + + + + + more_vert + + + + + assignment + {{ 'Plan and assign' | translate }} + + + edit + {{ 'Edit rule' | translate }} + + + + + {{'Chemicals' | translate}} this.onShowPlanAreaRule(rowData), - tooltip: this.translateService.stream('Plan and assign'), - }, - { - type: 'icon', - color: 'accent', - icon: 'list', - click: () => this.onShowEditEntityListModal(this.selectedArea.groupId), - tooltip: this.translateService.stream('Edit list of stables for tailbites'), - class: 'updateEntityList', - }, - ] }, ]; @@ -416,24 +398,6 @@ export class AreaRulesTableComponent implements OnChanges, OnInit { { field: 'actions', header: this.translateService.stream('Actions'), - type: 'button', - buttons: [ - { - type: 'icon', - color: 'accent', - icon: 'assignment', - click: (rowData: AreaRuleSimpleModel) => this.onShowPlanAreaRule(rowData), - tooltip: this.translateService.stream('Plan and assign'), - }, - { - type: 'icon', - color: 'accent', - icon: 'edit', - iif: (rowData: AreaRuleSimpleModel) => !rowData.isDefault && this.selectedArea.type !== 9 && !rowData.planningStatus, - click: (rowData: AreaRuleSimpleModel) => this.onShowEditRuleModal(rowData), - tooltip: this.translateService.stream('Edit rule'), - }, - ] }, ]; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-folders/documents-folders/documents-folders.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-folders/documents-folders/documents-folders.component.html index a89f31769..850e99032 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-folders/documents-folders/documents-folders.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/documents/components/documents-folders/documents-folders/documents-folders.component.html @@ -24,7 +24,7 @@ {{ 'Folders management' | translate }} id="editTagBtn" matTooltip="{{'Edit folder' | translate}}" > - edit + edit_square - edit + edit_square {{ 'Edit document' | translate }} @@ -82,7 +82,7 @@ id="deleteDocumentBtn-{{i}}" (click)="onOpenDeleteModal(row)" > - delete + delete {{ 'Delete document' | translate }} diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-actions/file-create/file-create.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-actions/file-create/file-create.component.html index eeab36564..c9c419e1c 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-actions/file-create/file-create.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-actions/file-create/file-create.component.html @@ -94,7 +94,7 @@ - + - + + {{ row.id }} + + + + {{ row.createDate | date:'dd.MM.yyyy HH:mm:ss' }} + + + + {{ row.fileName }}.{{ row.fileExtension }} + + + @@ -53,7 +65,7 @@ - + @@ -63,9 +75,48 @@ - edit + edit_square + + + + + more_vert + + + + + visibility + {{ 'View File' | translate }} + + + edit + {{ 'Edit file name' | translate }} + + + delete + {{ 'Delete file' | translate }} + + + + diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-table/files-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-table/files-table.component.ts index 80536879f..ac120d43f 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-table/files-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-table/files-table.component.ts @@ -69,35 +69,9 @@ export class FilesTableComponent implements OnInit { { field: 'actions', header: this.translateService.stream('Actions'), - type: 'button', width: '200px', pinned: 'right', right: '0px', - buttons: [ - { - type: 'icon', - icon: 'visibility', - tooltip: this.translateService.stream('View File'), - click: (filesModel: FilesModel) => this.onOpenView(filesModel), - class: 'viewPdfBtn', - }, - { - color: 'accent', - type: 'icon', - icon: 'edit', - tooltip: this.translateService.stream('Edit file name'), - click: (filesModel: FilesModel) => this.onShowEditDocumentModal(filesModel), - class: 'editFilenameBtn', - }, - { - color: 'warn', - type: 'icon', - icon: 'delete', - tooltip: this.translateService.stream('Delete file'), - click: (filesModel: FilesModel) => this.onOpenDeleteModal(filesModel), - class: 'deleteFileBtn', - }, - ], }, ]; pdfSub$: any; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/files.module.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/files.module.ts index 2f63dd744..fce125c01 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/files.module.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/files.module.ts @@ -36,6 +36,7 @@ import {PdfViewerModule} from 'ng2-pdf-viewer'; import {DragulaModule} from 'ng2-dragula'; import {MtxProgressModule} from '@ng-matero/extensions/progress'; import {MatDatepickerModule} from '@angular/material/datepicker'; +import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu"; @NgModule({ declarations: [ @@ -51,33 +52,36 @@ import {MatDatepickerModule} from '@angular/material/datepicker'; DownloadFilesNameArchiveComponent, FileCreateZoomPageComponent, ], - imports: [ - CommonModule, - TranslateModule, - RouterModule, - FilesRouting, - EformSharedModule, - ReactiveFormsModule, - EformImportedModule, - FormsModule, - MatButtonModule, - MatTooltipModule, - MatIconModule, - MatFormFieldModule, - MtxSelectModule, - MatInputModule, - MtxGridModule, - MatDialogModule, - MatCardModule, - MatSlideToggleModule, - MatCheckboxModule, - EformSharedTagsModule, - MatChipsModule, - PdfViewerModule, - DragulaModule, - MtxProgressModule, - MatDatepickerModule, - ], + imports: [ + CommonModule, + TranslateModule, + RouterModule, + FilesRouting, + EformSharedModule, + ReactiveFormsModule, + EformImportedModule, + FormsModule, + MatButtonModule, + MatTooltipModule, + MatIconModule, + MatFormFieldModule, + MtxSelectModule, + MatInputModule, + MtxGridModule, + MatDialogModule, + MatCardModule, + MatSlideToggleModule, + MatCheckboxModule, + EformSharedTagsModule, + MatChipsModule, + PdfViewerModule, + DragulaModule, + MtxProgressModule, + MatDatepickerModule, + MatMenuTrigger, + MatMenu, + MatMenuItem, + ], }) export class FilesModule { 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 ccfdf702a..652a6a538 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 @@ -110,7 +110,7 @@ matTooltip="{{ 'New OTP' | translate }}" (click)="openOtpModal(row)" > - key + key N/A @@ -133,7 +133,7 @@ id="editAssignmentsBtn-{{i}}" [routerLink]="['/plugins/backend-configuration-pn/task-worker-assignments/' + row.siteId]" > - visibility + visibility {{ 'Show assignments' | translate }} - edit + edit_square {{ 'Edit Device User' | translate }} - delete + delete {{ 'Delete Device User' | translate }} @@ -164,7 +164,7 @@ - phone_iphone + ios {{ row.model }} ({{ row.osVersion }}) diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.html index 131941fb3..20fd988d7 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.html @@ -1,6 +1,9 @@ + + + + + more_vert + + + + + image + {{ 'View images' | translate }} + + + edit + {{ 'Edit' | translate }} + + + delete + {{ 'Delete' | translate }} + + + + diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.ts index 74103e81b..0e5d63a1e 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.ts @@ -49,29 +49,8 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { { header: this.translateService.stream('Actions'), field: 'actions', - type: 'button', - buttons: [ - { - tooltip: this.translateService.stream('View images'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onClickViewPicture(record.microtingSdkCaseId), - icon: 'image', - iif: (record: ReportEformItemModel) => record.imagesCount !== 0, - }, - { - tooltip: this.translateService.stream('Edit'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onClickEditCase(record.microtingSdkCaseId, record.eFormId, record.id), - icon: 'edit', - }, - { - tooltip: this.translateService.stream('Delete'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onShowDeletePlanningCaseModal(record), - color: 'warn', - icon: 'delete', - } - ] + width: '160px', + pinned: 'right', }, {header: this.translateService.stream('Employee no'), field: 'employeeNo'}, ]; @@ -87,29 +66,8 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { { header: this.translateService.stream('Actions'), field: 'actions', - type: 'button', - buttons: [ - { - tooltip: this.translateService.stream('View images'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onClickViewPicture(record.microtingSdkCaseId), - icon: 'image', - iif: (record: ReportEformItemModel) => record.imagesCount !== 0, - }, - { - tooltip: this.translateService.stream('Edit'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onClickEditCase(record.microtingSdkCaseId, record.eFormId, record.id), - icon: 'edit', - }, - { - tooltip: this.translateService.stream('Delete'), - type: 'icon', - click: (record: ReportEformItemModel) => this.onShowDeletePlanningCaseModal(record), - color: 'warn', - icon: 'delete', - } - ] + width: '160px', + pinned: 'right', }, {header: this.translateService.stream('Employee no'), field: 'employeeNo'}, ]; @@ -161,9 +119,6 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { let isAdmin = false; this.selectAuthIsAdmin$.subscribe((selectAuthIsAdmin$) => isAdmin = selectAuthIsAdmin$); const tableHeaders = [...(isAdmin ? [...this.adminTableHeaders] : [...this.tableHeaders])]; - const index = tableHeaders - .findIndex(x => x.field === 'actions'); - tableHeaders[index].width = this.items.filter(x => x.imagesCount > 0).length > 0 ? '160px' : '110px'; this.mergedTableHeaders = [ ...tableHeaders, diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table/task-management-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table/task-management-table.component.html index a2e275960..0f42e0753 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table/task-management-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table/task-management-table.component.html @@ -2,7 +2,7 @@ {{row.status | translate}} + + + + + more_vert + + + + + edit_square + {{ 'Edit task' | translate }} + + + delete + {{ 'Delete task' | translate }} + + + + diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table/task-management-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table/task-management-table.component.ts index b5a0279b2..e74f39df2 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table/task-management-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table/task-management-table.component.ts @@ -78,27 +78,9 @@ export class TaskManagementTableComponent implements OnInit { { header: this.translateService.stream('Actions'), field: 'actions', - type: 'button', width: '100px', pinned: 'right', right: '0px', - buttons: [ - { - type: 'icon', - icon: 'edit', - click: (rowData: WorkOrderCaseModel) => this.onOpenViewModal(rowData.id), - tooltip: this.translateService.stream('Edit task'), - class: 'taskManagementViewBtn', - }, - { - type: 'icon', - icon: 'delete', - color: 'warn', - click: (rowData: WorkOrderCaseModel) => this.onOpenDeleteModal(rowData), - tooltip: this.translateService.stream('Delete task'), - class: 'taskManagementDeleteTaskBtn', - }, - ] }, ]; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/task-management.module.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/task-management.module.ts index 40fe52b9d..b508f635d 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/task-management.module.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/task-management.module.ts @@ -25,6 +25,7 @@ import {MatCardModule} from '@angular/material/card'; 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: [ @@ -34,28 +35,31 @@ import {MatChip} from "@angular/material/chips"; TaskManagementCreateShowModalComponent, TaskManagementDeleteModalComponent ], - imports: [ - CommonModule, - TranslateModule, - RouterModule, - TaskManagementRouting, - EformSharedModule, - ReactiveFormsModule, - EformImportedModule, - FormsModule, - MatButtonModule, - MatTooltipModule, - MatIconModule, - MatFormFieldModule, - MtxSelectModule, - MatInputModule, - MtxGridModule, - MatDialogModule, - MatCardModule, - MatDatepickerModule, - StatisticsModule, - MatChip, - ], + imports: [ + CommonModule, + TranslateModule, + RouterModule, + TaskManagementRouting, + EformSharedModule, + ReactiveFormsModule, + EformImportedModule, + FormsModule, + MatButtonModule, + MatTooltipModule, + MatIconModule, + MatFormFieldModule, + MtxSelectModule, + MatInputModule, + MtxGridModule, + MatDialogModule, + MatCardModule, + MatDatepickerModule, + StatisticsModule, + MatChip, + MatMenuTrigger, + MatMenu, + MatMenuItem, + ], providers: [], }) export class TaskManagementModule { diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.html b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.html index 4e123f1f7..484c2b8c7 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.html +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.html @@ -1,7 +1,7 @@ + + + + more_vert + + + + + edit_square + {{ 'Edit' | translate }} + + + delete + {{ 'Delete Case' | translate }} + + + + + diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.ts index 4475f6fad..3dd01e98f 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.ts @@ -48,9 +48,6 @@ export class TaskTrackerTableComponent implements OnInit, OnChanges { enabledHeadersNumber: number = 7; propertyHeaderEnabled: boolean = false; currentDate: Date = this.setDate(new Date()); - // changedate is "2025-10-30 00:00:00" - parsedDate = Date.parse('2025-11-15 00:00:00'); - changeDate: Date = new Date(this.parsedDate); tableHeaders: MtxGridColumn[] = [ {header: this.translateService.stream('Id'), field: 'complianceId', sortProp: {id: 'Id'}, sortable: false}, @@ -73,26 +70,6 @@ export class TaskTrackerTableComponent implements OnInit, OnChanges { // actions column with custom buttons {header: this.translateService.stream('Actions'), field: 'actions', sortable: false, width: '100px', pinned: 'right', - type: 'button', - buttons: [ // action buttons for each row - { - // eslint-disable-next-line max-len - iif: (record: TaskModel) => (record.createdInWizard && !record.taskIsExpired) || (record.taskIsExpired && record.createdInWizard && record.deadlineTask < this.changeDate), - type: 'icon', - icon: 'edit', - tooltip: this.translateService.stream('Edit'), - click: (record: TaskModel) => this.redirectToCompliance(record), - }, - { - // eslint-disable-next-line max-len - iif: (record: TaskModel) => record.createdInWizard && record.deadlineTask < this.changeDate, - type: 'icon', - tooltip: this.translateService.stream('Delete Case'), - icon: 'delete', - //color: (record: TaskModel) => this.deleteIconColor(record), // TODO: Uncomment when the logic is implemented - click: (record: TaskModel) => this.onShowDeleteComplianceModal(record), - } - ], }, ]; complianceDeleteComponentAfterClosedSub$: Subscription; diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/task-tracker.module.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/task-tracker.module.ts index 887c5a3d6..885561a5e 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/task-tracker.module.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/task-tracker.module.ts @@ -28,6 +28,7 @@ import {PlanningsModule} from '../../../items-planning-pn/modules/plannings/plan import {StatisticsModule} from '../statistics/statistics.module'; import {MatChipsModule} from '@angular/material/chips'; import {NgSelectModule} from "@ng-select/ng-select"; +import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu"; @NgModule({ declarations: [ @@ -62,6 +63,9 @@ import {NgSelectModule} from "@ng-select/ng-select"; StatisticsModule, MatChipsModule, NgSelectModule, + MatMenuTrigger, + MatMenu, + MatMenuItem, ], providers: [], }) 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 7aa281601..9cfe3deeb 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 @@ -96,7 +96,7 @@ id="editTaskBtn-{{i}}" (click)="editTask.emit(row)" > - edit + edit_square {{ 'Edit task' | translate }} @@ -116,7 +116,7 @@ id="deleteTaskBtn-{{i}}" (click)="deleteTask.emit(row)" > - delete + delete {{ 'Delete task' | translate }}