From d12ce958e974b4407ef9f77a53eff5e4a0362bd8 Mon Sep 17 00:00:00 2001 From: Santiago Pozo Ruiz <38196801+DrFreud1@users.noreply.github.com> Date: Fri, 23 Jul 2021 14:42:12 -0500 Subject: [PATCH 1/7] Tt 289 cannot edit the date of an entry (#708) * fix: TT-289 added an extra comparison to make sure the update date is being saved * fix: TT-289 remove non-relevant anymore test cases, after fist changes * Update details-fields.component.ts * Update details-fields.component.ts --- .../details-fields.component.spec.ts | 26 ------------------- .../details-fields.component.ts | 3 +-- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/app/modules/shared/components/details-fields/details-fields.component.spec.ts b/src/app/modules/shared/components/details-fields/details-fields.component.spec.ts index 42f6e2263..2fa11b8af 100644 --- a/src/app/modules/shared/components/details-fields/details-fields.component.spec.ts +++ b/src/app/modules/shared/components/details-fields/details-fields.component.spec.ts @@ -418,19 +418,6 @@ describe('DetailsFieldsComponent', () => { expect(component.saveEntry.emit).toHaveBeenCalledWith(data); }); - it('should not modify the start_date when start_hour has not been modified', () => { - const currentDate = moment().format('YYYY-MM-DD'); - const startHour = moment().subtract(3, 'hours').format('HH:mm:ss'); - const expectedStartDate = new Date(`${currentDate}T${startHour.trim()}`); - - component.entryToEdit = { ...entryToEdit, start_date: expectedStartDate }; - fixture.componentInstance.ngOnChanges(); - - component.entryForm.patchValue({ description: 'test' }); - - expect(component.dateToSubmit('start_date', 'start_hour')).toEqual(expectedStartDate); - }); - it('should modify the start_date when start_hour has been modified', () => { const startDate = new Date(mockCurrentDate); @@ -445,19 +432,6 @@ describe('DetailsFieldsComponent', () => { expect(component.dateToSubmit('start_date', 'start_hour')).toEqual(expectedStartDate); }); - it('should not modify the end_date when end_hour has not been modified', () => { - const currentDate = moment().format('YYYY-MM-DD'); - const endHour = moment().subtract(3, 'hours').format('HH:mm:ss'); - const expectedEndDate = new Date(`${currentDate}T${endHour.trim()}`); - - component.entryToEdit = { ...entryToEdit, end_date: expectedEndDate }; - fixture.componentInstance.ngOnChanges(); - - component.entryForm.patchValue({ description: 'test' }); - - expect(component.dateToSubmit('end_date', 'end_hour')).toEqual(expectedEndDate); - }); - it('should modify the end_date when end_hour has been modified', () => { const endDate = new Date(mockCurrentDate); 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 82b99a121..e36b97433 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 @@ -269,8 +269,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit { const updatedHour = this.entryForm.value[hour]; const updatedDate = new Date(`${entryFormDate}T${updatedHour.trim()}`).toISOString(); const initialDate = get(this.entryToEdit, date, updatedDate); - const initialHour = formatDate(get(this.entryToEdit, date, updatedDate), 'HH:mm', 'en'); - const dateHasNotChanged = updatedHour === initialHour; + const dateHasNotChanged = (initialDate === updatedDate); const result = dateHasNotChanged ? initialDate : updatedDate; return result; } From 6e6b884adc468053b8116dc7fff4b8ebca689697 Mon Sep 17 00:00:00 2001 From: Kevin Jefferson Lopez De la O Date: Wed, 28 Jul 2021 14:42:44 -0500 Subject: [PATCH 2/7] fix: TT-290 added a new component (dropdown), and change the style the buttons associeted (#705) * fix: TT-290 created the component dropdown and changed style in the buttons associeted * style: TT-290 changed the color border button --- src/app/app.module.ts | 2 + .../activity-list.component.html | 17 +-- .../activity-list.component.spec.ts | 41 ++++--- .../activity-list/activity-list.component.ts | 18 +-- .../customer-list.component.html | 16 +-- .../customer-list.component.spec.ts | 24 ++-- .../customer-list/customer-list.component.ts | 18 +-- .../project-list/project-list.component.html | 24 ++-- .../project-list.component.spec.ts | 22 +++- .../project-list/project-list.component.ts | 20 ++-- .../dropdown/dropdown.component.html | 20 ++++ .../dropdown/dropdown.component.scss | 33 ++++++ .../dropdown/dropdown.component.spec.ts | 109 ++++++++++++++++++ .../components/dropdown/dropdown.component.ts | 44 +++++++ src/app/modules/shared/components/index.ts | 2 + .../modules/shared/models/activity.model.ts | 4 +- .../modules/shared/models/customer.model.ts | 16 ++- .../modules/shared/models/project.model.ts | 21 ++-- 18 files changed, 344 insertions(+), 107 deletions(-) create mode 100644 src/app/modules/shared/components/dropdown/dropdown.component.html create mode 100644 src/app/modules/shared/components/dropdown/dropdown.component.scss create mode 100644 src/app/modules/shared/components/dropdown/dropdown.component.spec.ts create mode 100644 src/app/modules/shared/components/dropdown/dropdown.component.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d0bca2dfd..c1259c812 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -84,6 +84,7 @@ import { NgxMaterialTimepickerModule } from 'ngx-material-timepicker'; import { TechnologyReportTableComponent } from './modules/technology-report/components/technology-report-table/technology-report-table.component'; import { TechnologyReportComponent } from './modules/technology-report/pages/technology-report.component'; import { CalendarComponent } from './modules/time-entries/components/calendar/calendar.component'; +import { DropdownComponent } from './modules/shared/components/dropdown/dropdown.component'; const maskConfig: Partial = { validation: false, @@ -137,6 +138,7 @@ const maskConfig: Partial = { TechnologyReportComponent, TechnologyReportTableComponent, CalendarComponent, + DropdownComponent, ], imports: [ NgxMaskModule.forRoot(maskConfig), diff --git a/src/app/modules/activities-management/components/activity-list/activity-list.component.html b/src/app/modules/activities-management/components/activity-list/activity-list.component.html index 0a9789373..e5492f92c 100644 --- a/src/app/modules/activities-management/components/activity-list/activity-list.component.html +++ b/src/app/modules/activities-management/components/activity-list/activity-list.component.html @@ -19,17 +19,10 @@ - + @@ -43,7 +36,7 @@ tabindex="-1" role="dialog" aria-hidden="true" - [title]="'Archive Activity'" + [title]="'Disable Activity'" [body]="message" (closeModalEvent)="deleteActivity()" > diff --git a/src/app/modules/activities-management/components/activity-list/activity-list.component.spec.ts b/src/app/modules/activities-management/components/activity-list/activity-list.component.spec.ts index d29ee5780..61594e1f8 100644 --- a/src/app/modules/activities-management/components/activity-list/activity-list.component.spec.ts +++ b/src/app/modules/activities-management/components/activity-list/activity-list.component.spec.ts @@ -18,19 +18,26 @@ describe('ActivityListComponent', () => { message: '', activityIdToEdit: '', }; - const operationBtnProps = [{ - key: 'active', - _status: false, - btnColor: 'btn-danger', - btnIcon: 'fa-arrow-circle-down', - btnName: 'Archive', - }, { - key: 'inactive', - _status: true, - btnColor: 'btn-primary', - btnIcon: 'fa-arrow-circle-up', - btnName: 'Active', - }]; + const operationBtnProps = [ + { + key: 'active', + _status: false, + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Active', + iconColor: 'text-success' + }, + { + key: 'inactive', + _status: true, + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Inactive', + iconColor: 'text-danger' + }, + ]; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ @@ -100,8 +107,8 @@ describe('ActivityListComponent', () => { expect(store.dispatch).toHaveBeenCalledWith(new UnarchiveActivity('id')); }); - it('openModal should set on true and display \"Are you sure you want to archive activity\"', () => { - const message = 'Are you sure you want to archive activity name?'; + it('openModal should set on true and display \"Are you sure you want to inactive activity\"', () => { + const message = 'Are you sure you want to disable activity name?'; const itemData = { id: '1', name: 'name', @@ -129,7 +136,9 @@ describe('ActivityListComponent', () => { _status: true, btnColor: 'btn-primary', btnIcon: 'fa-arrow-circle-up', + btnIconTwo: 'fa-check', btnName: 'Active', + iconColor: 'text-danger' }; spyOn(component, 'unarchiveActivity'); @@ -147,7 +156,9 @@ describe('ActivityListComponent', () => { _status: false, btnColor: 'btn-danger', btnIcon: 'fa-arrow-circle-down', + btnIconTwo: 'fa-caret-check', btnName: 'Archive', + iconColor: 'text-success' }; spyOn(component, 'openModal'); diff --git a/src/app/modules/activities-management/components/activity-list/activity-list.component.ts b/src/app/modules/activities-management/components/activity-list/activity-list.component.ts index 165d51cad..cf4df9b94 100644 --- a/src/app/modules/activities-management/components/activity-list/activity-list.component.ts +++ b/src/app/modules/activities-management/components/activity-list/activity-list.component.ts @@ -28,15 +28,19 @@ export class ActivityListComponent implements OnInit { const operationBtnProps = [{ key: 'active', _status: false, - btnColor: 'btn-danger', - btnIcon: 'fa-arrow-circle-down', - btnName: 'Archive', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Active', + iconColor: 'text-success' }, { key: 'inactive', _status: true, - btnColor: 'btn-primary', - btnIcon: 'fa-arrow-circle-up', - btnName: 'Active', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Inactive', + iconColor: 'text-danger' }]; this.store.dispatch(new LoadActivities()); @@ -70,7 +74,7 @@ export class ActivityListComponent implements OnInit { } openModal(item: Activity): void { - this.message = `Are you sure you want to archive activity ${item.name}?`; + this.message = `Are you sure you want to disable activity ${item.name}?`; this.showModal = true; } diff --git a/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.html b/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.html index acf7e6f99..50dab31b8 100644 --- a/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.html +++ b/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.html @@ -29,16 +29,10 @@ - + @@ -52,7 +46,7 @@ tabindex="-1" role="dialog" aria-hidden="true" - [title]="'Delete Customer'" + [title]="'Disable Customer'" [body]="message" (closeModalEvent)="deleteCustomer()" > diff --git a/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.spec.ts b/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.spec.ts index b38a604a8..67b3f3e15 100644 --- a/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.spec.ts +++ b/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.spec.ts @@ -34,16 +34,20 @@ describe('CustomerTableListComponent', () => { { key: 'active', _status: false, - btnColor: 'btn-danger', - btnIcon: 'fa-arrow-circle-down', - btnName: 'Archive', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Active', + iconColor: 'text-success' }, { key: 'inactive', _status: true, - btnColor: 'btn-primary', - btnIcon: 'fa-arrow-circle-up', - btnName: 'Active', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Inactive', + iconColor: 'text-danger' }, ]; @@ -215,8 +219,8 @@ describe('CustomerTableListComponent', () => { expect(component.dtElement.dtInstance.then).toHaveBeenCalled(); }); - it('openModal should set on true and display "Are you sure you want to archive customer"', () => { - const message = 'Are you sure you want to archive name?'; + it('openModal should set on true and display "Are you sure you want to disable customer"', () => { + const message = 'Are you sure you want to disable name?'; const itemData = { id: '1', name: 'name', @@ -244,7 +248,9 @@ describe('CustomerTableListComponent', () => { _status: false, btnColor: 'btn-danger', btnIcon: 'fa-arrow-circle-down', + btnIconTwo: 'fa-check', btnName: 'Archive', + iconColor: 'text-success' }; spyOn(component, 'openModal'); @@ -262,7 +268,9 @@ describe('CustomerTableListComponent', () => { _status: true, btnColor: 'btn-primary', btnIcon: 'fa-arrow-circle-up', + btnIconTwo: 'fa-check', btnName: 'Active', + iconColor: 'text-danger' }; component.switchStatus(itemData); diff --git a/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.ts b/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.ts index a3d431e82..ecf91a753 100644 --- a/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.ts +++ b/src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.ts @@ -53,16 +53,20 @@ export class CustomerListComponent implements OnInit, OnDestroy, AfterViewInit { { key: 'active', _status: false, - btnColor: 'btn-danger', - btnIcon: 'fa-arrow-circle-down', - btnName: 'Archive', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Active', + iconColor: 'text-success' }, { key: 'inactive', _status: true, - btnColor: 'btn-primary', - btnIcon: 'fa-arrow-circle-up', - btnName: 'Active', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Inactive', + iconColor: 'text-danger' }, ]; @@ -172,7 +176,7 @@ export class CustomerListComponent implements OnInit, OnDestroy, AfterViewInit { openModal(item: Customer) { this.idToDelete = item.id; - this.message = `Are you sure you want to archive ${item.name}?`; + this.message = `Are you sure you want to disable ${item.name}?`; this.showModal = true; } diff --git a/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.html b/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.html index 747c53f71..3382e4821 100644 --- a/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.html +++ b/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.html @@ -4,32 +4,26 @@ Project ID Project - Project Type + Project Type Options - Visibility + Visibility {{ project.id }} {{ project.name }} - {{ project.project_type.name }} + {{ project.project_type.name }} - - + + + @@ -43,7 +37,7 @@ tabindex="-1" role="dialog" aria-hidden="true" - [title]="'Archive Project'" + [title]="'Disable Project'" [body]="message" (closeModalEvent)="deleteProject()" > diff --git a/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.spec.ts b/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.spec.ts index 61dc638a1..e9ecc59d2 100644 --- a/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.spec.ts +++ b/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.spec.ts @@ -32,16 +32,20 @@ describe('ProjectListComponent', () => { { key: 'active', _status: false, - btnColor: 'btn-danger', - btnIcon: 'fa-arrow-circle-down', - btnName: 'Archive', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Active', + iconColor: 'text-success' }, { key: 'inactive', _status: true, - btnColor: 'btn-primary', - btnIcon: 'fa-arrow-circle-up', - btnName: 'Active', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Inactive', + iconColor: 'text-danger' }, ]; @@ -136,7 +140,9 @@ describe('ProjectListComponent', () => { _status: false, btnColor: 'btn-danger', btnIcon: 'fa-arrow-circle-down', + btnIconTwo: 'fa-caret-check', btnName: 'Archive', + iconColor: 'text-success' }; spyOn(component, 'openModal'); @@ -155,7 +161,9 @@ describe('ProjectListComponent', () => { _status: true, btnColor: 'btn-primary', btnIcon: 'fa-arrow-circle-up', + btnIconTwo: 'fa-check', btnName: 'Active', + iconColor: 'text-danger' }; component.switchStatus(itemData); @@ -173,7 +181,9 @@ describe('ProjectListComponent', () => { _status: false, btnColor: 'btn-danger', btnIcon: 'fa-arrow-circle-down', + btnIconTwo: 'fa-caret-check', btnName: 'Archive', + iconColor: 'text-success' }; component.openModal(itemData); diff --git a/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.ts b/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.ts index 58b18e79f..7073c4fcd 100644 --- a/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.ts +++ b/src/app/modules/customer-management/components/projects/components/project-list/project-list.component.ts @@ -6,7 +6,6 @@ import { ProjectState } from '../store/project.reducer'; import { getCustomerProjects } from '../store/project.selectors'; import * as actions from '../store/project.actions'; import { ProjectUI } from '../../../../../shared/models/project.model'; -import { ProjectTypeState } from '../../../projects-type/store'; import { ProjectType } from 'src/app/modules/shared/models'; @Component({ @@ -30,7 +29,6 @@ export class ProjectListComponent implements OnInit, OnDestroy { constructor( private store: Store, - private projectTypeStore: Store ) {} ngOnInit(): void { @@ -38,16 +36,20 @@ export class ProjectListComponent implements OnInit, OnDestroy { { key: 'active', _status: false, - btnColor: 'btn-danger', - btnIcon: 'fa-arrow-circle-down', - btnName: 'Archive', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Active', + iconColor: 'text-success' }, { key: 'inactive', _status: true, - btnColor: 'btn-primary', - btnIcon: 'fa-arrow-circle-up', - btnName: 'Active', + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-check', + btnName: 'Inactive', + iconColor: 'text-danger' }, ]; @@ -79,7 +81,7 @@ export class ProjectListComponent implements OnInit, OnDestroy { openModal(item: ProjectUI) { this.idToDelete = item.id; - this.message = `Are you sure you want archive ${item.name}?`; + this.message = `Are you sure you want Disable ${item.name}?`; this.showModal = true; } diff --git a/src/app/modules/shared/components/dropdown/dropdown.component.html b/src/app/modules/shared/components/dropdown/dropdown.component.html new file mode 100644 index 000000000..2eac90228 --- /dev/null +++ b/src/app/modules/shared/components/dropdown/dropdown.component.html @@ -0,0 +1,20 @@ + + \ No newline at end of file diff --git a/src/app/modules/shared/components/dropdown/dropdown.component.scss b/src/app/modules/shared/components/dropdown/dropdown.component.scss new file mode 100644 index 000000000..dbff41db6 --- /dev/null +++ b/src/app/modules/shared/components/dropdown/dropdown.component.scss @@ -0,0 +1,33 @@ +@import '../../../../../styles/colors.scss'; + +.btn-switch { + font-size: 1rem; + border: 1px solid lighten($primary-text, 10%); + border-radius: 20px; + width: clamp(7rem, 50%, 12rem); + display: flex; + justify-content: space-between; + align-items: center; + margin: 0 auto; +} + +.iconTwo { + color: lighten($primary-text, 10%); + text-align: center; +} + +.container-description-status { + display: flex; + align-items: center; + justify-content: flex-start; +} + +.icon { + flex: 0 0 20%; +} + +.description { + flex: 1 1 60%; + padding: 0; + margin: 0; +} diff --git a/src/app/modules/shared/components/dropdown/dropdown.component.spec.ts b/src/app/modules/shared/components/dropdown/dropdown.component.spec.ts new file mode 100644 index 000000000..ca5e237b7 --- /dev/null +++ b/src/app/modules/shared/components/dropdown/dropdown.component.spec.ts @@ -0,0 +1,109 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { DropdownComponent } from './dropdown.component'; + +describe('DropdownComponent', () => { + let component: DropdownComponent; + let fixture: ComponentFixture; + let fakeInfo: any; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ DropdownComponent ] + }) + .compileComponents(); + + fakeInfo = { + id: 'fake', + name: 'fake', + description: 'fake', + tenant_id: '', + status: '', + key: 'active', + _status: false, + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-caret-check', + btnName: 'Active', + iconColor: 'text-success' + }; + + fixture = TestBed.createComponent(DropdownComponent); + component = fixture.componentInstance; + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); + + it('should emit the item when clicked in method changeOperation', () => { + spyOn(component.updateInfo, 'emit'); + component.info = fakeInfo; + + fixture.detectChanges(); + component.changeOperation(fakeInfo); + + expect(component.updateInfo.emit).toHaveBeenCalled(); + }); + + it('should changed properties of item when is Active', () => { + const fakeInfoActive = { + id: 'fake', + name: 'fake', + description: 'fake', + tenant_id: '', + status: '', + key: 'active', + _status: true, + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-caret-check', + btnName: 'Active', + iconColor: 'text-success' + }; + const expectChangeValue = { + btnName: 'Inactive', + btnIcon: 'fa-circle', + iconColor: 'text-danger' + }; + component.info = fakeInfoActive; + + component.changePropertiesItem(fakeInfoActive); + + expect(component.dataChange.btnName).toEqual(expectChangeValue.btnName); + expect(component.dataChange.btnIcon).toEqual(expectChangeValue.btnIcon); + expect(component.dataChange.iconColor).toEqual(expectChangeValue.iconColor); + }); + + it('should change properties of item when is Inactive', () => { + const fakeInfoInactive = { + id: 'fake', + name: 'fake', + description: 'fake', + tenant_id: '', + status: '', + key: 'active', + _status: true, + btnColor: 'btn-white', + btnIcon: 'fa-circle', + btnIconTwo: 'fa-caret-check', + btnName: 'Inactive', + iconColor: 'text-danger' + }; + const expectChangeValue = { + btnName: 'Active', + btnIcon: 'fa-circle', + iconColor: 'text-success' + }; + component.info = fakeInfoInactive; + + component.changePropertiesItem(fakeInfoInactive); + + expect(component.dataChange.btnName).toEqual(expectChangeValue.btnName); + expect(component.dataChange.btnIcon).toEqual(expectChangeValue.btnIcon); + expect(component.dataChange.iconColor).toEqual(expectChangeValue.iconColor); + + }); +}); + + + diff --git a/src/app/modules/shared/components/dropdown/dropdown.component.ts b/src/app/modules/shared/components/dropdown/dropdown.component.ts new file mode 100644 index 000000000..7f3672b26 --- /dev/null +++ b/src/app/modules/shared/components/dropdown/dropdown.component.ts @@ -0,0 +1,44 @@ +import { Output, Component, EventEmitter, Input } from '@angular/core'; + + +@Component({ + selector: 'app-dropdown', + templateUrl: './dropdown.component.html', + styleUrls: ['./dropdown.component.scss'] +}) +export class DropdownComponent { + + @Input() info: any; + @Output() updateInfo: EventEmitter = new EventEmitter(); + + dataChange: any = { + id: '', + name: '', + description: '', + tenant_id: '', + status: '', + key: '', + _status: false, + btnColor: '', + btnIcon: '', + btnIconTwo: '', + btnName: '', + iconColor: '' + }; + + changePropertiesItem({btnName, btnIcon}){ + this.dataChange.btnIcon = btnIcon; + if (btnName === 'Active'){ + this.dataChange.btnName = 'Inactive'; + this.dataChange.iconColor = 'text-danger'; + }else{ + this.dataChange.btnName = 'Active'; + this.dataChange.iconColor = 'text-success'; + } + } + + changeOperation(item: any){ + this.updateInfo.emit(item); + + } +} diff --git a/src/app/modules/shared/components/index.ts b/src/app/modules/shared/components/index.ts index 41d940e42..81c30d5f5 100644 --- a/src/app/modules/shared/components/index.ts +++ b/src/app/modules/shared/components/index.ts @@ -5,3 +5,5 @@ export * from './month-picker/month-picker.component'; export * from './navbar/navbar.component'; export * from './sidebar/sidebar.component'; export * from './user/user.component'; +export * from './dropdown/dropdown.component'; + diff --git a/src/app/modules/shared/models/activity.model.ts b/src/app/modules/shared/models/activity.model.ts index d9fd4eb0c..d8c9332ff 100644 --- a/src/app/modules/shared/models/activity.model.ts +++ b/src/app/modules/shared/models/activity.model.ts @@ -14,9 +14,11 @@ export interface ActivityFront { status?: string; key: string; _status: boolean; - btnColor: string; + btnColor?: string; btnIcon: string; + btnIconTwo: string; btnName: string; + iconColor: string; } export interface ActivityStatus { diff --git a/src/app/modules/shared/models/customer.model.ts b/src/app/modules/shared/models/customer.model.ts index 42107c878..cfe704ed4 100644 --- a/src/app/modules/shared/models/customer.model.ts +++ b/src/app/modules/shared/models/customer.model.ts @@ -6,13 +6,17 @@ export interface Customer { } export interface CustomerUI { id?: string; - name?: string; - description?: string; - status?: any; - key?: string; + name: string; + description: string; + tenant_id?: string; + status?: string; + key: string; + _status: boolean; btnColor?: string; - btnIcon?: string; - btnName?: string; + btnIcon: string; + btnIconTwo: string; + btnName: string; + iconColor: string; } export interface Status { id: string; diff --git a/src/app/modules/shared/models/project.model.ts b/src/app/modules/shared/models/project.model.ts index 5a1c609d8..3c59e76c7 100644 --- a/src/app/modules/shared/models/project.model.ts +++ b/src/app/modules/shared/models/project.model.ts @@ -10,15 +10,16 @@ export interface Project { status?: any; } export interface ProjectUI { - id?: string; - customer_id?: string; - name?: string; - description?: string; - project_type_id?: string; - search_field?: string; - status?: any; - key?: string; + id: string; + name: string; + description: string; + tenant_id?: string; + status?: string; + key: string; + _status: boolean; btnColor?: string; - btnIcon?: string; - btnName?: string; + btnIcon: string; + btnIconTwo: string; + btnName: string; + iconColor: string; } From 7ec1de205153a51ab42c0ea86d2120ef46721292 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 28 Jul 2021 19:44:02 +0000 Subject: [PATCH 3/7] chore(release): 1.46.1 [skip ci]nn --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7cb8ed886..bb4e6ca70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "time-tracker", - "version": "1.46.0", + "version": "1.46.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b80b9ec64..7ac6015d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "time-tracker", - "version": "1.46.0", + "version": "1.46.1", "scripts": { "preinstall": "npx npm-force-resolutions", "ng": "ng", From 9b65a9448d169b001f9d338901b935b6e6b932e3 Mon Sep 17 00:00:00 2001 From: Kevin Lopez Date: Thu, 22 Jul 2021 11:28:48 -0500 Subject: [PATCH 4/7] refactor: TT-295 removal unnecessary feature toggles --- .../details-fields.component.ts | 1 - .../feature-toggle-general.service.spec.ts | 3 +- .../entry-fields.component.spec.ts | 128 +----------------- .../entry-fields/entry-fields.component.ts | 26 +--- src/environments/enum.ts | 2 - 5 files changed, 4 insertions(+), 156 deletions(-) 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 e36b97433..0a1b6f7da 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 @@ -311,7 +311,6 @@ export class DetailsFieldsComponent implements OnChanges, OnInit { this.toastrService.error('You cannot start a time-entry in the future'); return; } - this.saveEntry.emit({ entry, shouldRestartEntry: this.shouldRestartEntry }); } diff --git a/src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts b/src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts index 8deac72e0..b865897a3 100644 --- a/src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts +++ b/src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts @@ -27,8 +27,7 @@ describe('FeatureToggleGeneralService', () => { params.map((param) => { it(`isActivated should return a boolean ${param.bool}`, () => { const toggleName = FeatureToggle.SWITCH_GROUP; - // tslint:disable-next-line: no-shadowed-variable - featureManagerService.isToggleEnabledForUser = (toggleName) => of(param.bool); + featureManagerService.isToggleEnabledForUser = (toggleNameV) => of(param.bool); featureToggleGeneralService.isActivated(toggleName).subscribe((enabled) => { expect(enabled).toBe(param.bool); diff --git a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts index 45fed5730..57d2da186 100644 --- a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts +++ b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts @@ -1,4 +1,4 @@ -import { Subscription, of } from 'rxjs'; +import { Subscription } from 'rxjs'; import { LoadActiveEntry, EntryActionTypes } from './../../store/entry.actions'; import { ActivityManagementActionTypes } from './../../../activities-management/store/activity-management.actions'; import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; @@ -15,21 +15,15 @@ import { formatDate } from '@angular/common'; import { NgxMaterialTimepickerModule } from 'ngx-material-timepicker'; import * as moment from 'moment'; import { DATE_FORMAT_YEAR } from 'src/environments/environment'; -import { CookieService } from 'ngx-cookie-service'; -import { FeatureToggleGeneralService } from './../../../shared/feature-toggles/feature-toggle-general/feature-toggle-general.service'; -import { FeatureToggle } from 'src/environments/enum'; - describe('EntryFieldsComponent', () => { type Merged = TechnologyState & ProjectState; let component: EntryFieldsComponent; let fixture: ComponentFixture; let store: MockStore; - let cookieService: CookieService; let mockTechnologySelector; let mockProjectsSelector; let entryForm; - let featureToggleGeneralService: FeatureToggleGeneralService; const actionSub: ActionsSubject = new ActionsSubject(); const toastrServiceStub = { error: (message?: string, title?: string, override?: Partial) => { }, @@ -122,8 +116,6 @@ describe('EntryFieldsComponent', () => { entryForm = TestBed.inject(FormBuilder); mockTechnologySelector = store.overrideSelector(allTechnologies, state.technologies); mockProjectsSelector = store.overrideSelector(getCustomerProjects, state.projects); - featureToggleGeneralService = TestBed.inject(FeatureToggleGeneralService); - cookieService = TestBed.inject(CookieService); })); beforeEach(() => { @@ -440,124 +432,6 @@ describe('EntryFieldsComponent', () => { expect(component.actionSetDateSubscription.unsubscribe).toHaveBeenCalled(); }); - it('when feature-toggle "update-entries" enable for the user, the updateEntry function is executes to update the entries', () => { - spyOn(store, 'dispatch'); - const expected = { update_last_entry_if_overlap: true }; - const mockEntry = { - ...entry, - start_date: moment().format(DATE_FORMAT_YEAR), - start_hour: moment().format('HH:mm') - }; - const lastMockEntry = { - ...entry, - end_date: moment().format(DATE_FORMAT_YEAR), - end_hour: moment().format('HH:mm') - }; - const hourInTheFuture = moment().format('HH:mm'); - component.newData = mockEntry; - component.activeEntry = mockEntry; - component.lastEntry = lastMockEntry; - component.isFeatureToggleActive = true; - component.entryForm.patchValue({ start_hour: hourInTheFuture }); - - component.onUpdateStartHour(); - - expect(component.newData.update_last_entry_if_overlap).toEqual(expected.update_last_entry_if_overlap); - expect(store.dispatch).toHaveBeenCalled(); - }); - - it('Set true in isCookieFeatureToggleActive when feature-toggle "feature-toggle-in-cookies" is enable for user', () => { - const expectedValue = true; - spyOn(featureToggleGeneralService, 'isActivated').and.returnValue(of(true)); - - component.ngOnInit(); - - expect(component.isCookieFeatureToggleActive).toEqual(expectedValue); - }); - - it('Set false in isCookieFeatureToggleActive when feature-toggle "feature-toggle-in-cookies" is not enable for user', () => { - const expectedValue = false; - spyOn(featureToggleGeneralService, 'isActivated').and.returnValue(of(false)); - - component.ngOnInit(); - - expect(component.isCookieFeatureToggleActive).toEqual(expectedValue); - }); - - - it('Call cookieService.get() when isCookieFeatureToggleActive is True', () => { - const expectedValue = true; - component.isCookieFeatureToggleActive = expectedValue; - spyOn(cookieService, 'get').and.returnValue(`${expectedValue}`); - - component.ngOnInit(); - - expect(cookieService.get).toHaveBeenCalledWith(FeatureToggle.UPDATE_ENTRIES); - }); - - it('Call featureToggleGeneralService.isActivated() when isCookieFeatureToggleActive is False', () => { - const expectedValue = false; - spyOn(featureToggleGeneralService, 'isActivated').and.returnValue(of(expectedValue)); - - component.ngOnInit(); - - expect(featureToggleGeneralService.isActivated).toHaveBeenCalledWith(FeatureToggle.UPDATE_ENTRIES); - }); - - it('Set True in isFeatureToggleActive when cookieService.get() return "true" and isCookieFeatureToggleActive is true', () => { - const expectedValue = true; - component.isCookieFeatureToggleActive = expectedValue; - spyOn(cookieService, 'get').and.returnValue(`${expectedValue}`); - - component.ngOnInit(); - - expect(component.isFeatureToggleActive).toEqual(expectedValue); - }); - - it('Set True in isFeatureToggleActive when cookieService.get() return "false" and isCookieFeatureToggleActive is true', () => { - const expectedValue = false; - component.isCookieFeatureToggleActive = !expectedValue; - spyOn(cookieService, 'get').and.returnValue(`${expectedValue}`); - - component.ngOnInit(); - - expect(component.isFeatureToggleActive).toEqual(expectedValue); - }); - - it('Set True in isFeatureToggleActive when featureToggleGeneralService.isActivated() return true', () => { - const expectedValue = true; - spyOn(featureToggleGeneralService, 'isActivated').and.callFake( - (featureToggle) => featureToggle === FeatureToggle.COOKIES ? of(false) : of(true) ); - - component.ngOnInit(); - - expect(featureToggleGeneralService.isActivated).toHaveBeenCalledWith(FeatureToggle.UPDATE_ENTRIES); - expect(component.isFeatureToggleActive).toEqual(expectedValue); - }); - - it('Set False in isFeatureToggleActive when featureToggleGeneralService.isActivated() return false and isCookieFeatureToggleActive is false', () => { - const expectedValue = false; - spyOn(featureToggleGeneralService, 'isActivated').and.returnValue(of(expectedValue)); - - component.ngOnInit(); - - expect(component.isFeatureToggleActive).toEqual(expectedValue); - }); - - it('when FT "update-entries" disable for the user,the UpdateCurrentOrLastEntry function is called to update the entries', () => { - spyOn(featureToggleGeneralService, 'isActivated').and.returnValue(of(false)); - - const mockEntry = { - ...entry, - start_date: moment().format(DATE_FORMAT_YEAR), - start_hour: moment().format('HH:mm') - }; - component.newData = mockEntry; - featureToggleGeneralService.isActivated(FeatureToggle.UPDATE_ENTRIES).subscribe(() => { - expect(featureToggleGeneralService.isActivated).toHaveBeenCalled(); - }); - }); - it('when a activity is not register in DB should show activatefocus in select activity', () => { const activitiesMock = [{ id: 'xyz', diff --git a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts index 9dcad89d9..bf427963f 100644 --- a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts +++ b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts @@ -1,6 +1,5 @@ -import { FeatureToggleGeneralService } from './../../../shared/feature-toggles/feature-toggle-general/feature-toggle-general.service'; import { ActivityManagementActionTypes } from './../../../activities-management/store/activity-management.actions'; -import { EntryActionTypes, LoadActiveEntry, UpdateCurrentOrLastEntry, UpdateEntry, UpdateEntryRunning } from './../../store/entry.actions'; +import { EntryActionTypes, LoadActiveEntry } from './../../store/entry.actions'; import { filter} from 'rxjs/operators'; import { Component, OnDestroy, OnInit, ElementRef, ViewChild } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; @@ -17,8 +16,6 @@ import { formatDate } from '@angular/common'; import { getTimeEntriesDataSource } from '../../store/entry.selectors'; import { DATE_FORMAT } from 'src/environments/environment'; import { Subscription, } from 'rxjs'; -import { FeatureToggle } from './../../../../../environments/enum'; -import { CookieService } from 'ngx-cookie-service'; type Merged = TechnologyState & ProjectState & ActivityState; @@ -48,8 +45,6 @@ export class EntryFieldsComponent implements OnInit, OnDestroy { private store: Store, private actionsSubject$: ActionsSubject, private toastrService: ToastrService, - private featureToggleGeneralService: FeatureToggleGeneralService, - private cookiesService: CookieService, ) { this.entryForm = this.formBuilder.group({ description: '', @@ -70,17 +65,6 @@ export class EntryFieldsComponent implements OnInit, OnDestroy { this.store.dispatch(new LoadActiveEntry()); }); - this.featureToggleGeneralService.isActivated(FeatureToggle.COOKIES).subscribe((flag) => { - this.isCookieFeatureToggleActive = flag; - }); - - if (this.isCookieFeatureToggleActive){ - this.isFeatureToggleActive = this.cookiesService.get(FeatureToggle.UPDATE_ENTRIES) === 'true' ? true : false; - }else{ - this.featureToggleGeneralService.isActivated(FeatureToggle.UPDATE_ENTRIES).subscribe((flag) => { - this.isFeatureToggleActive = flag; - }); - } this.loadActiveEntrySubscription = this.actionsSubject$ .pipe( filter( @@ -176,13 +160,7 @@ export class EntryFieldsComponent implements OnInit, OnDestroy { return; } this.entryForm.patchValue({ start_date: newHourEntered }); - if (this.isFeatureToggleActive) { - this.newData.update_last_entry_if_overlap = true; - this.store.dispatch(new entryActions.UpdateEntryRunning({ ...this.newData, ...this.entryForm.value })); - - } else { - this.store.dispatch(new entryActions.UpdateCurrentOrLastEntry({ ...this.newData, ...this.entryForm.value })); - } + this.store.dispatch(new entryActions.UpdateCurrentOrLastEntry({ ...this.newData, ...this.entryForm.value })); this.showTimeInbuttons = false; } diff --git a/src/environments/enum.ts b/src/environments/enum.ts index 2bfaebb69..907327f21 100644 --- a/src/environments/enum.ts +++ b/src/environments/enum.ts @@ -1,6 +1,4 @@ export enum FeatureToggle { SWITCH_GROUP = 'switch-group', - UPDATE_ENTRIES = 'update-entries', - COOKIES = 'feature-toggle-in-cookies', TIME_TRACKER_CALENDAR = 'time-tracker-calendar' } From a5041904bc101a83825f7d57fc8153ac126f1746 Mon Sep 17 00:00:00 2001 From: Edgar Guaman Date: Wed, 28 Jul 2021 18:15:55 -0500 Subject: [PATCH 5/7] fix: TT-295 Undefined this.newData.update_last_entry_if_overlap = true; --- .../feature-toggle-general.service.spec.ts | 2 +- .../components/entry-fields/entry-fields.component.spec.ts | 2 +- .../components/entry-fields/entry-fields.component.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts b/src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts index b865897a3..72339a2cd 100644 --- a/src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts +++ b/src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts @@ -27,7 +27,7 @@ describe('FeatureToggleGeneralService', () => { params.map((param) => { it(`isActivated should return a boolean ${param.bool}`, () => { const toggleName = FeatureToggle.SWITCH_GROUP; - featureManagerService.isToggleEnabledForUser = (toggleNameV) => of(param.bool); + featureManagerService.isToggleEnabledForUser = () => of(param.bool); featureToggleGeneralService.isActivated(toggleName).subscribe((enabled) => { expect(enabled).toBe(param.bool); diff --git a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts index 57d2da186..150a03593 100644 --- a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts +++ b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts @@ -255,7 +255,7 @@ describe('EntryFieldsComponent', () => { component.activeEntry = entry; component.setDataToUpdate(entry); const updatedTime = moment(mockDate).format('HH:mm'); - + // this.newData.update_last_entry_if_overlap = true; component.entryForm.patchValue({ start_hour: updatedTime }); spyOn(store, 'dispatch'); diff --git a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts index bf427963f..62fcf672c 100644 --- a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts +++ b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts @@ -160,7 +160,8 @@ export class EntryFieldsComponent implements OnInit, OnDestroy { return; } this.entryForm.patchValue({ start_date: newHourEntered }); - this.store.dispatch(new entryActions.UpdateCurrentOrLastEntry({ ...this.newData, ...this.entryForm.value })); + this.newData.update_last_entry_if_overlap = true; + this.store.dispatch(new entryActions.UpdateEntryRunning({ ...this.newData, ...this.entryForm.value })); this.showTimeInbuttons = false; } From 354fbe632847775b50d62568c5f6a3f85f9d1dfc Mon Sep 17 00:00:00 2001 From: Sandro Castillo Date: Wed, 28 Jul 2021 18:52:53 -0500 Subject: [PATCH 6/7] fix: TT-295 newData undefined resolved --- .../entry-fields/entry-fields.component.spec.ts | 13 +++++++++++-- .../entry-fields/entry-fields.component.ts | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts index 150a03593..0ac724448 100644 --- a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts +++ b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts @@ -99,7 +99,12 @@ describe('EntryFieldsComponent', () => { description: 'description for active entry', uri: 'abc', start_date: moment(mockDate).format(DATE_FORMAT_YEAR), - start_hour: moment(mockDate).format('HH:mm'), + start_hour: moment(mockDate).format('HH:mm') + }; + + const mockEntryOverlap = { + ...entry, + update_last_entry_if_overlap: true }; beforeEach(waitForAsync(() => { @@ -252,19 +257,22 @@ describe('EntryFieldsComponent', () => { }); it('when a start hour is updated, then dispatch UpdateActiveEntry', () => { + component.newData = mockEntryOverlap; component.activeEntry = entry; component.setDataToUpdate(entry); const updatedTime = moment(mockDate).format('HH:mm'); - // this.newData.update_last_entry_if_overlap = true; + component.entryForm.patchValue({ start_hour: updatedTime }); spyOn(store, 'dispatch'); component.onUpdateStartHour(); + expect(store.dispatch).toHaveBeenCalled(); expect(component.showTimeInbuttons).toEqual(false); }); it('When start_time is updated, component.last_entry is equal to time entry in the position 1', waitForAsync(() => { + component.newData = mockEntryOverlap; component.activeEntry = entry; component.setDataToUpdate(entry); const updatedTime = moment(mockDate).format('HH:mm'); @@ -276,6 +284,7 @@ describe('EntryFieldsComponent', () => { })); it('When start_time is updated for a time entry. UpdateCurrentOrLastEntry action is dispatched', () => { + component.newData = mockEntryOverlap; component.activeEntry = entry; component.setDataToUpdate(entry); const updatedTime = moment(mockDate).subtract(4, 'hours').format('HH:mm'); diff --git a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts index 62fcf672c..e1c164b2f 100644 --- a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts +++ b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts @@ -94,7 +94,7 @@ export class EntryFieldsComponent implements OnInit, OnDestroy { uri: this.activeEntry.uri, activity_id: this.activeEntry.activity_id, start_date: this.activeEntry.start_date, - start_hour: formatDate(this.activeEntry.start_date, 'HH:mm', 'en'), + start_hour: formatDate(this.activeEntry.start_date, 'HH:mm', 'en') }; this.activateFocus(); }); From 1ee3100f49ab1d976a62271b7655570b5cd920f1 Mon Sep 17 00:00:00 2001 From: Edgar Guaman Date: Thu, 29 Jul 2021 15:21:22 -0500 Subject: [PATCH 7/7] fix: TT-295 Changes in the mockEntryOvelap variable --- .../components/entry-fields/entry-fields.component.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts index 0ac724448..32ef74547 100644 --- a/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts +++ b/src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts @@ -103,7 +103,6 @@ describe('EntryFieldsComponent', () => { }; const mockEntryOverlap = { - ...entry, update_last_entry_if_overlap: true };