Skip to content

Commit e86a427

Browse files
fix: TTL-886 change check property from project name to customer name
1 parent c92dfbf commit e86a427

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
133133
}
134134

135135
entryFormIsValidate() {
136-
let projectName = '';
136+
let customerName = '';
137137
this.store.pipe(select(getTimeEntriesDataSource)).subscribe((ds) => {
138138
const dataToUse = ds.data.find((item) => item.project_id === this.activeEntry.project_id);
139-
projectName = dataToUse.project_name;
139+
customerName = dataToUse.customer_name;
140140
});
141-
return this.requiredFieldsForInternalAppExist(projectName) && this.entryForm.valid;
141+
return this.requiredFieldsForInternalAppExist(customerName) && this.entryForm.valid;
142142
}
143143

144144
onSubmit() {
@@ -199,9 +199,9 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
199199
this.actionSetDateSubscription.unsubscribe();
200200
}
201201

202-
requiredFieldsForInternalAppExist(projectName) {
202+
requiredFieldsForInternalAppExist(customerName) {
203203
const emptyFields = this.entryForm.value.uri === '' && this.entryForm.value.description === '';
204-
const isInternalApp = projectName.includes('(Applications)');
204+
const isInternalApp = customerName.includes('ioet');
205205
if (isInternalApp && emptyFields) {
206206
const message = 'The description field or ticket field should not be empty';
207207
this.toastrService.error(`Some fields are empty, ${message}.`);

src/app/modules/time-entries/pages/time-entries.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export class TimeEntriesComponent implements OnInit, OnDestroy, AfterViewInit {
177177
technologies: dataToUse.technologies ? dataToUse.technologies : [],
178178
uri: dataToUse.uri ? dataToUse.uri : '',
179179
activity_id: dataToUse.activity_id,
180-
project_name: dataToUse.project_name,
180+
customer_name: dataToUse.customer_name,
181181
project_id: dataToUse.project_id,
182182
start_date: currentDate,
183183
end_date: currentDate,
@@ -265,7 +265,7 @@ export class TimeEntriesComponent implements OnInit, OnDestroy, AfterViewInit {
265265
// Check required fields for internal apps (Ticket number or Description field should exist).
266266
requiredFieldsForInternalAppExist(event) {
267267
const emptyFields = event.entry.uri === '' && event.entry.description === '';
268-
const isInternalApp = this.entry.project_name.includes('(Applications)');
268+
const isInternalApp = this.entry.customer_name.includes('ioet');
269269
if (isInternalApp && emptyFields) {
270270
const message = 'The description field or ticket field should not be empty';
271271
this.toastrService.error(`Some fields are empty, ${message}.`);

0 commit comments

Comments
 (0)