Skip to content

Commit 06772a4

Browse files
committed
Changing so we look at if the employee have mobile access to time registration, if so a valid email address is mandatory.
1 parent 242e1b9 commit 06772a4

File tree

33 files changed

+53
-11
lines changed

33 files changed

+53
-11
lines changed

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationAssignmentWorkerServiceHelper.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,8 @@ await baseDbContext.SecurityGroupUsers.FirstAsync(x =>
608608
if (assignments.Count != 0)
609609
{
610610
await GoogleSheetHelper.PushToGoogleSheet(core, timePlanningDbContext, logger, oldSiteName, fullName).ConfigureAwait(false);
611+
assignments.First().EnableMobileAccess = deviceUserModel.EnableMobileAccess;
612+
await assignments.First().Update(timePlanningDbContext).ConfigureAwait(false);
611613
return new OperationDataResult<int>(true, siteDto.SiteId);
612614
}
613615

@@ -617,7 +619,8 @@ await baseDbContext.SecurityGroupUsers.FirstAsync(x =>
617619
{
618620
SiteId = siteDto.SiteId,
619621
CreatedByUserId = userId,
620-
UpdatedByUserId = userId
622+
UpdatedByUserId = userId,
623+
EnableMobileAccess = deviceUserModel.EnableMobileAccess
621624
};
622625
await assignmentSite.Create(timePlanningDbContext).ConfigureAwait(false);
623626
await GoogleSheetHelper.PushToGoogleSheet(core, timePlanningDbContext, logger, oldSiteName, fullName).ConfigureAwait(false);

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/DeviceUserModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class DeviceUserModel
4242
public string Language { get; set; }
4343
public string LanguageCode { get; set; }
4444
public bool? TimeRegistrationEnabled { get; set; }
45-
45+
public bool EnableMobileAccess { get; set; }
4646
// minutes from midnight for the start of the shift (0-1440) monday
4747
public int? StartMonday { get; set; }
4848
// minutes from midnight for the end of the shift (0-1440) monday

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationAssignmentWorkerService/BackendConfigurationAssignmentWorkerService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ join worker in sdkDbContext.Workers on siteWorker.WorkerId equals worker.Id
455455
deviceUserModel.StartSunday = assignedSite.StartSunday;
456456
deviceUserModel.EndSunday = assignedSite.EndSunday;
457457
deviceUserModel.BreakSunday = assignedSite.BreakSunday;
458+
deviceUserModel.EnableMobileAccess = assignedSite.EnableMobileAccess;
458459
}
459460

460461
deviceUserModel.TaskManagementEnabled = backendConfigurationPnDbContext.PropertyWorkers.Any(x =>

eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/bgBG.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,5 @@ export const bgBG = {
300300
'Show expired task on mobile': 'Показване на изтекла задача на мобилно устройство',
301301
Web: 'Уеб',
302302
Archive: 'Архив',
303+
'Mobile timeregistration': 'Мобилна регистрация на време',
303304
};

eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/csCZ.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,5 @@ export const csCZ = {
300300
'Show expired task on mobile': 'Zobrazit vypršelou úlohu na mobilu',
301301
Web: 'Web',
302302
Archive: 'Archiv',
303+
'Mobile timeregistration': 'Mobilní registrace času',
303304
};

eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/da.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,4 +302,5 @@ export const da = {
302302
'Show expired task on mobile': 'Vis overskredet opgave på mobil',
303303
Web: 'Web',
304304
Archive: 'Arkiv',
305+
'Mobile timeregistration': 'Mobil tidsregistrering',
305306
};

eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/deDE.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,4 +361,5 @@ export const deDE = {
361361
'Show expired task on mobile': 'Abgelaufene Aufgaben auf dem Mobilgerät anzeigen',
362362
Web: 'Web',
363363
Archive: 'Archiv',
364+
'Mobile timeregistration': 'Mobile Zeiterfassung',
364365
};

eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/elGR.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,5 @@ export const elGR = {
300300
'Show expired task on mobile': 'Εμφάνιση ληγμένης εργασίας σε κινητό',
301301
Web: 'Ιστός',
302302
Archive: 'Αρχείο',
303+
'Mobile timeregistration': 'Εγγραφή χρόνου για κινητά',
303304
};

eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/enUS.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,4 +317,5 @@ export const enUS= {
317317
'Show expired task on mobile': 'Show expired task on mobile',
318318
'Web': 'Web',
319319
'Archive': 'Archive',
320+
'Mobile timeregistration': 'Mobile timeregistration',
320321
};

eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/esES.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,5 @@ export const esES = {
300300
'Show expired task on mobile': 'Mostrar tarea expirada en el móvil',
301301
Web: 'Web',
302302
Archive: 'Archivo',
303+
'Mobile timeregistration': 'Registro de tiempo móvil',
303304
};

0 commit comments

Comments
 (0)