diff --git a/.git-crypt/keys/PROD/0/0D57F1A8D53A81F7400B003B23FA3416519EEE05.gpg b/.git-crypt/keys/PROD/0/0D57F1A8D53A81F7400B003B23FA3416519EEE05.gpg deleted file mode 100644 index 41c46fa73..000000000 Binary files a/.git-crypt/keys/PROD/0/0D57F1A8D53A81F7400B003B23FA3416519EEE05.gpg and /dev/null differ diff --git a/.git-crypt/keys/PROD/0/9122E40E0400D921898F3B395582EDA0BCA797BC.gpg b/.git-crypt/keys/PROD/0/9122E40E0400D921898F3B395582EDA0BCA797BC.gpg new file mode 100644 index 000000000..0b2e82c54 Binary files /dev/null and b/.git-crypt/keys/PROD/0/9122E40E0400D921898F3B395582EDA0BCA797BC.gpg differ diff --git a/.git-crypt/keys/STAGE/0/0D57F1A8D53A81F7400B003B23FA3416519EEE05.gpg b/.git-crypt/keys/STAGE/0/0D57F1A8D53A81F7400B003B23FA3416519EEE05.gpg deleted file mode 100644 index 4d6c1e8d0..000000000 Binary files a/.git-crypt/keys/STAGE/0/0D57F1A8D53A81F7400B003B23FA3416519EEE05.gpg and /dev/null differ diff --git a/.git-crypt/keys/STAGE/0/9122E40E0400D921898F3B395582EDA0BCA797BC.gpg b/.git-crypt/keys/STAGE/0/9122E40E0400D921898F3B395582EDA0BCA797BC.gpg new file mode 100644 index 000000000..b1e200052 --- /dev/null +++ b/.git-crypt/keys/STAGE/0/9122E40E0400D921898F3B395582EDA0BCA797BC.gpg @@ -0,0 +1,5 @@ +.. Z˹32$q|:k tQH,9GRAw8_+KVS0R!73*#R1K+PuقV SL F2jovrrtx^j +Rp5PC diff --git a/src/app/modules/shared/components/details-fields/details-fields.component.ts b/src/app/modules/shared/components/details-fields/details-fields.component.ts index ca66f7cbf..e41801a7f 100644 --- a/src/app/modules/shared/components/details-fields/details-fields.component.ts +++ b/src/app/modules/shared/components/details-fields/details-fields.component.ts @@ -333,6 +333,14 @@ export class DetailsFieldsComponent implements OnChanges, OnInit { } onSubmit() { + + // Debounce submit (Save) button + const button = document.querySelector('#submitButton'); + button.setAttribute('disabled', 'true'); + setTimeout(() => { + button.removeAttribute('disabled'); + }, 3000); + const emptyValue = ''; const { project_name, uri, description } = this.entryForm.value; const areEmptyValues = [uri, description].every(item => item === emptyValue); diff --git a/src/app/modules/time-clock/components/project-list-hover/project-list-hover.component.ts b/src/app/modules/time-clock/components/project-list-hover/project-list-hover.component.ts index 66207c63d..301aa33d5 100644 --- a/src/app/modules/time-clock/components/project-list-hover/project-list-hover.component.ts +++ b/src/app/modules/time-clock/components/project-list-hover/project-list-hover.component.ts @@ -106,6 +106,18 @@ export class ProjectListHoverComponent implements OnInit, OnDestroy { } clockIn(selectedProject, customerName, name) { + + // Debounce 'Clock In' buttons + const buttons = document.getElementsByClassName('btn btn-sm btn-primary btn-select'); + for (const button of buttons) { + button.setAttribute('disabled', 'true'); + } + setTimeout(() => { + for (const button of buttons) { + button.removeAttribute('disabled'); + } + }, 3000); + const entry = { project_id: selectedProject, start_date: new Date().toISOString(), @@ -113,6 +125,7 @@ export class ProjectListHoverComponent implements OnInit, OnDestroy { technologies: [], activity_id: head(this.activities).id, }; + this.store.dispatch(new entryActions.ClockIn(entry)); this.projectsForm.setValue({ project_id: `${customerName} - ${name}` }); setTimeout(() => { diff --git a/tsconfig.json b/tsconfig.json index 80a8e1cb8..bf3e900b6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,8 @@ ], "lib": [ "es2018", - "dom" + "dom", + "dom.Iterable" ] }, "angularCompilerOptions": {