From 4c5363047fc236eb92a475ea88de1d70343412f1 Mon Sep 17 00:00:00 2001 From: samuelmbabhazi Date: Mon, 2 Sep 2024 07:12:33 +0200 Subject: [PATCH 01/13] Broken UI for Timesheet Modal Log --- .../components/badge-label/badge-label.component.ts | 3 +++ .../view-time-log-modal.component.scss | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/ui-core/shared/src/lib/components/badge-label/badge-label.component.ts b/packages/ui-core/shared/src/lib/components/badge-label/badge-label.component.ts index ef0cd9cafdc..70b0bced0a1 100644 --- a/packages/ui-core/shared/src/lib/components/badge-label/badge-label.component.ts +++ b/packages/ui-core/shared/src/lib/components/badge-label/badge-label.component.ts @@ -9,6 +9,9 @@ import { NbComponentStatus, NbComponentSize } from '@nebular/theme'; :host { display: inline-block; position: relative; + nb-badge { + right: inherit !important; + } } ` ] diff --git a/packages/ui-core/shared/src/lib/timesheet/view-time-log-modal/view-time-log-modal.component.scss b/packages/ui-core/shared/src/lib/timesheet/view-time-log-modal/view-time-log-modal.component.scss index bfe2a805970..0a80be3b789 100644 --- a/packages/ui-core/shared/src/lib/timesheet/view-time-log-modal/view-time-log-modal.component.scss +++ b/packages/ui-core/shared/src/lib/timesheet/view-time-log-modal/view-time-log-modal.component.scss @@ -2,8 +2,8 @@ @import 'gauzy/_gauzy-dialogs'; :host { - display: flex; - justify-content: center; + display: flex; + justify-content: center; .close-button { position: absolute; @@ -24,7 +24,7 @@ flex-direction: column; flex-direction: flex-start; - >.subtitle { + > .subtitle { font-size: 11px; font-weight: 600; line-height: 13px; @@ -51,6 +51,9 @@ .date { color: rgba(126, 126, 143, 1); } + .date { + margin-top: 5%; + } ngx-label { display: flex; @@ -97,10 +100,8 @@ line-height: 10px; letter-spacing: 0em; text-align: center; - } } - } .actions { From 89e4f4eed6fdb3c64a55dac6029bad7fad3dd7e6 Mon Sep 17 00:00:00 2001 From: Kifungo A <45813955+adkif@users.noreply.github.com> Date: Mon, 2 Sep 2024 09:43:03 +0200 Subject: [PATCH 02/13] fix: added TimeTrackerDateManager to RecapService and WeeklyRecapService, and passed todayStart and todayEnd to request objects in multiple methods. --- .../src/lib/recap/+state/recap.service.ts | 14 ++++++++++---- .../src/lib/recap/weekly/+state/weekly.service.ts | 6 ++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/desktop-ui-lib/src/lib/recap/+state/recap.service.ts b/packages/desktop-ui-lib/src/lib/recap/+state/recap.service.ts index 71c34214ef9..3cac217b0a9 100644 --- a/packages/desktop-ui-lib/src/lib/recap/+state/recap.service.ts +++ b/packages/desktop-ui-lib/src/lib/recap/+state/recap.service.ts @@ -8,7 +8,7 @@ import { IGetTimeSlotInput } from '@gauzy/contracts'; import { reduce } from 'underscore'; -import { Store, ToastrNotificationService } from '../../services'; +import { Store, TimeTrackerDateManager, ToastrNotificationService } from '../../services'; import { ActivityService, TimesheetService, TimesheetStatisticsService } from '../services/timesheet'; import { RecapQuery } from './recap.query'; import { RecapStore } from './recap.store'; @@ -88,7 +88,9 @@ export class RecapService { organizationId, onlyMe: true, employeeIds, - tenantId + tenantId, + todayStart: TimeTrackerDateManager.startToday, + todayEnd: TimeTrackerDateManager.endToday }; const tasks = await this.timesheetStatisticsService.getTasksStatistics(request); this.recapStore.update({ tasks }); @@ -111,7 +113,9 @@ export class RecapService { organizationId, employeeIds, onlyMe: true, - tenantId + tenantId, + todayStart: TimeTrackerDateManager.startToday, + todayEnd: TimeTrackerDateManager.endToday }; const timeSlots = await this.timesheetService.getTimeSlots(request); this.recapStore.update({ timeSlots }); @@ -134,7 +138,9 @@ export class RecapService { organizationId, employeeIds, onlyMe: true, - tenantId + tenantId, + todayStart: TimeTrackerDateManager.startToday, + todayEnd: TimeTrackerDateManager.endToday }; const count = await this.timesheetStatisticsService.getCounts(request); this.recapStore.update({ count }); diff --git a/packages/desktop-ui-lib/src/lib/recap/weekly/+state/weekly.service.ts b/packages/desktop-ui-lib/src/lib/recap/weekly/+state/weekly.service.ts index c5008270f21..7f18365d219 100644 --- a/packages/desktop-ui-lib/src/lib/recap/weekly/+state/weekly.service.ts +++ b/packages/desktop-ui-lib/src/lib/recap/weekly/+state/weekly.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { ICountsStatistics, IGetCountsStatistics, IGetTimeLogInput, ReportDayData } from '@gauzy/contracts'; import { Observable } from 'rxjs'; import { RequestQuery } from '../../+state/request/request.query'; -import { Store, ToastrNotificationService } from '../../../services'; +import { Store, TimeTrackerDateManager, ToastrNotificationService } from '../../../services'; import { TimesheetService, TimesheetStatisticsService } from '../../services/timesheet'; import { IDateRangePicker } from '../../shared/features/date-range-picker/date-picker.interface'; import { WeeklyRecapQuery } from './weekly.query'; @@ -84,7 +84,9 @@ export class WeeklyRecapService { organizationId, employeeIds, onlyMe: true, - tenantId + tenantId, + todayStart: TimeTrackerDateManager.startToday, + todayEnd: TimeTrackerDateManager.endToday }; const count = await this.timesheetStatisticsService.getCounts(request); this.weeklyStore.update({ count: { ...count, reWeeklyLimit: user.employee.reWeeklyLimit } }); From 95082b3507bfbaf65795a32a8dd90f35ab53dbfc Mon Sep 17 00:00:00 2001 From: Kifungo A <45813955+adkif@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:34:23 +0200 Subject: [PATCH 03/13] fix: add null check for 'arg' in sendActivities method and log info message if arg is null. --- .../src/lib/time-tracker/time-tracker.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/desktop-ui-lib/src/lib/time-tracker/time-tracker.component.ts b/packages/desktop-ui-lib/src/lib/time-tracker/time-tracker.component.ts index 6e5dffd2d4b..b7dfd98119b 100644 --- a/packages/desktop-ui-lib/src/lib/time-tracker/time-tracker.component.ts +++ b/packages/desktop-ui-lib/src/lib/time-tracker/time-tracker.component.ts @@ -2158,6 +2158,11 @@ export class TimeTrackerComponent implements OnInit, AfterViewInit { return; } + if (!arg) { + this._loggerService.info('No data available to send from sendActivities'); + return; + } + // screenshot process let screenshotImg = []; From 377a7553d27d9f0745a72184cd6aecf52a137cc9 Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Mon, 2 Sep 2024 15:14:23 +0530 Subject: [PATCH 04/13] fix: time off policy crud permission definition --- .../time-off-settings.component.html | 100 +++++++------- .../time-off-settings.component.scss | 2 +- .../time-off-settings.component.ts | 128 ++++++++---------- .../app/pages/time-off/time-off.component.ts | 13 +- .../src/app/pages/time-off/time-off.module.ts | 52 ++++--- ...f-routing.module.ts => time-off.routes.ts} | 18 +-- .../static/styles/@shared/_pg-card.scss | 31 +++++ 7 files changed, 187 insertions(+), 157 deletions(-) rename apps/gauzy/src/app/pages/time-off/{time-off-routing.module.ts => time-off.routes.ts} (72%) create mode 100644 packages/ui-core/static/styles/@shared/_pg-card.scss diff --git a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.html b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.html index 0a1fd2204ad..0ebc5a2f81c 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.html +++ b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.html @@ -1,8 +1,4 @@ - +
@@ -22,60 +18,67 @@

- -
- -
- - + + + + +
+ +
+ + + +
+ + + + + + + + +

{{ 'SETTINGS_MENU.NO_LAYOUT' | translate }}

+
- - -
- + + +
- +
+ + - - diff --git a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.scss b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.scss index 38c72d42fec..f64d0c0e1eb 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.scss +++ b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.scss @@ -1 +1 @@ -@import '../../payments/payments.component.scss'; +@import '@shared/_pg-card.scss'; diff --git a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.ts b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.ts index b39f6b2d480..ee050930d47 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, OnDestroy, ErrorHandler } from '@angular/core'; +import { Component, OnInit, OnDestroy } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ComponentLayoutStyleEnum, IOrganization, ITimeOffPolicy } from '@gauzy/contracts'; import { debounceTime, filter, first, tap } from 'rxjs/operators'; @@ -7,7 +7,7 @@ import { Cell } from 'angular2-smart-table'; import { NbDialogService } from '@nebular/theme'; import { TranslateService } from '@ngx-translate/core'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { ServerDataSource, Store, TimeOffService, ToastrService } from '@gauzy/ui-core/core'; +import { ErrorHandlingService, ServerDataSource, Store, TimeOffService, ToastrService } from '@gauzy/ui-core/core'; import { API_PREFIX, ComponentEnum, distinctUntilChange } from '@gauzy/ui-core/common'; import { DeleteConfirmationComponent, @@ -25,34 +25,38 @@ import { PaidIcon, RequestApprovalIcon } from '../table-components'; styleUrls: ['./time-off-settings.component.scss'] }) export class TimeOffSettingsComponent extends PaginationFilterBaseComponent implements OnInit, OnDestroy { - smartTableSettings: object; - selectedPolicy: ITimeOffPolicy; - smartTableSource: ServerDataSource; - timeOffPolicies: ITimeOffPolicy[] = []; - loading: boolean = false; - disableButton: boolean = true; - viewComponentName: ComponentEnum; - dataLayoutStyle = ComponentLayoutStyleEnum.TABLE; - componentLayoutStyleEnum = ComponentLayoutStyleEnum; - private _refresh$: Subject = new Subject(); + public smartTableSettings: object; + public selectedPolicy: ITimeOffPolicy; + public smartTableSource: ServerDataSource; public organization: IOrganization; - timeOffPolicies$: Subject = this.subject$; + public timeOffPolicies: ITimeOffPolicy[] = []; + public loading: boolean = false; + public disableButton: boolean = true; + public viewComponentName: ComponentEnum; + public dataLayoutStyle = ComponentLayoutStyleEnum.TABLE; + public componentLayoutStyleEnum = ComponentLayoutStyleEnum; + private _refresh$: Subject = new Subject(); + public timeOffPolicies$: Subject = this.subject$; + + private get _isGridLayout(): boolean { + return this.componentLayoutStyleEnum.CARDS_GRID === this.dataLayoutStyle; + } constructor( - private readonly dialogService: NbDialogService, - private readonly toastrService: ToastrService, - private readonly timeOffService: TimeOffService, - private readonly store: Store, - private readonly errorHandler: ErrorHandler, - public readonly translateService: TranslateService, - private readonly httpClient: HttpClient + readonly translateService: TranslateService, + private readonly _dialogService: NbDialogService, + private readonly _httpClient: HttpClient, + private readonly _toastrService: ToastrService, + private readonly _errorHandlingService: ErrorHandlingService, + private readonly _timeOffService: TimeOffService, + private readonly _store: Store ) { super(translateService); this.setView(); } ngOnInit() { - this._loadSettingsSmartTableSettings(); + this._loadSmartTableSettings(); this._applyTranslationOnSmartTable(); this.timeOffPolicies$ @@ -71,7 +75,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl untilDestroyed(this) ) .subscribe(); - const storeOrganization$ = this.store.selectedOrganization$; + const storeOrganization$ = this._store.selectedOrganization$; storeOrganization$ .pipe( debounceTime(100), @@ -93,13 +97,9 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl .subscribe(); } - private get _isGridLayout(): boolean { - return this.componentLayoutStyleEnum.CARDS_GRID === this.dataLayoutStyle; - } - setView() { this.viewComponentName = ComponentEnum.TIME_OFF_SETTINGS; - this.store + this._store .componentLayout$(this.viewComponentName) .pipe( distinctUntilChange(), @@ -113,13 +113,19 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl .subscribe(); } - private _loadSettingsSmartTableSettings() { + /** + * Load settings for smart table + */ + private _loadSmartTableSettings() { + // Get pagination settings const pagination: IPaginationBase = this.getPagination(); + + // Set up smart table settings this.smartTableSettings = { actions: false, - selectedRowIndex: -1, editable: true, - noDataMessage: this.getTranslation('SM_TABLE.NO_DATA.TIME_OFF'), + selectedRowIndex: -1, + noDataMessage: this.getTranslation('SM_TABLE.NO_DATA.TIME_OFF_POLICY'), pager: { display: false, perPage: pagination ? pagination.itemsPerPage : this.minItemPerPage @@ -172,7 +178,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl */ openAddPolicyDialog(): void { // Open the add policy dialog - this.dialogService + this._dialogService .open(TimeOffSettingsMutationComponent) .onClose.pipe( // Filter out null or undefined policies @@ -194,7 +200,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl // Check if a valid policy is provided if (policy) { // Add the policy using timeOffService - this.timeOffService + this._timeOffService .createPolicy(policy) .pipe( // Take the first emitted value and automatically unsubscribe when the component is destroyed @@ -204,9 +210,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl .subscribe({ next: () => { // Display success toast with the added policy's name - this.toastrService.success('NOTES.POLICY.ADD_POLICY', { - name: policy.name - }); + this._toastrService.success('NOTES.POLICY.ADD_POLICY', { name: policy.name }); // Trigger refresh for relevant observables this._refresh$.next(true); @@ -214,7 +218,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl }, error: () => { // Display a danger toast in case of an error during policy addition - this.toastrService.danger('NOTES.POLICY.SAVE_ERROR'); + this._toastrService.danger('NOTES.POLICY.SAVE_ERROR'); } }); } @@ -236,7 +240,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl } // Open the edit policy dialog with the selected policy as context - this.dialogService + this._dialogService .open(TimeOffSettingsMutationComponent, { context: { policy: this.selectedPolicy @@ -263,7 +267,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl const selectedPolicyId = this.selectedPolicy.id; // Update the policy using timeOffService - this.timeOffService + this._timeOffService .updatePolicy(selectedPolicyId, policy) .pipe( // Take the first emitted value and automatically unsubscribe when the component is destroyed @@ -273,7 +277,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl .subscribe({ next: () => { // Display success toast with the edited policy's name - this.toastrService.success('NOTES.POLICY.EDIT_POLICY', { + this._toastrService.success('NOTES.POLICY.EDIT_POLICY', { name: policy.name }); @@ -281,7 +285,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl this._refresh$.next(true); this.timeOffPolicies$.next(true); }, - error: (error) => this.errorHandler.handleError(error) + error: (error) => this._errorHandlingService.handleError(error) }); } @@ -300,7 +304,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl } // Open the delete confirmation dialog - this.dialogService + this._dialogService .open(DeleteConfirmationComponent, { context: { recordType: this.getTranslation('TIME_OFF_PAGE.POLICY.POLICY') @@ -329,7 +333,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl } // Delete the policy using timeOffService - this.timeOffService + this._timeOffService .deletePolicy(this.selectedPolicy.id) .pipe( // Take the first emitted value and automatically unsubscribe when the component is destroyed @@ -339,7 +343,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl .subscribe({ next: () => { // Display success toast with the deleted policy's name - this.toastrService.success('NOTES.POLICY.DELETE_POLICY', { + this._toastrService.success('NOTES.POLICY.DELETE_POLICY', { name: this.selectedPolicy.name }); @@ -347,7 +351,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl this._refresh$.next(true); this.timeOffPolicies$.next(true); }, - error: (error) => this.errorHandler.handleError(error) + error: (error) => this._errorHandlingService.handleError(error) }); } @@ -376,12 +380,11 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl // Set loading state to true while fetching data this.loading = true; - // Destructure properties for clarity - const { tenantId } = this.store.user; - const { id: organizationId } = this.organization; + // Destructure organization properties for clarity + const { id: organizationId, tenantId } = this.organization; // Create a new ServerDataSource for Smart Table - this.smartTableSource = new ServerDataSource(this.httpClient, { + this.smartTableSource = new ServerDataSource(this._httpClient, { endPoint: `${API_PREFIX}/time-off-policy/pagination`, relations: ['employees', 'employees.user'], where: { @@ -406,13 +409,8 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl } }); } catch (error) { - // Handle errors and display a danger toast - this.toastrService.danger( - this.getTranslation('', { - error: error.error?.message || error.message - }), - this.getTranslation('TOASTR.TITLE.ERROR') - ); + // Handle errors and display a danger toast with the error message + this._errorHandlingService.handleError(error); } } @@ -442,13 +440,8 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl this._loadGridLayoutData(); } } catch (error) { - // Handle errors and display a danger toast - this.toastrService.danger( - this.getTranslation('', { - error: error.error?.message || error.message - }), - this.getTranslation('TOASTR.TITLE.ERROR') - ); + // Handle errors and display a danger toast with the error message + this._errorHandlingService.handleError(error); } } @@ -461,20 +454,15 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl // Use await to asynchronously load data using the Smart Table source await this.smartTableSource.getElements(); } catch (error) { - // Handle errors and display a danger toast - this.toastrService.danger( - this.getTranslation('', { - error: error.error?.message || error.message - }), - this.getTranslation('TOASTR.TITLE.ERROR') - ); + // Handle errors and display a danger toast with the error message + this._errorHandlingService.handleError(error); } } private _applyTranslationOnSmartTable() { this.translateService.onLangChange .pipe( - tap(() => this._loadSettingsSmartTableSettings()), + tap(() => this._loadSmartTableSettings()), untilDestroyed(this) ) .subscribe(); diff --git a/apps/gauzy/src/app/pages/time-off/time-off.component.ts b/apps/gauzy/src/app/pages/time-off/time-off.component.ts index 86f574cfbc6..7eced299f11 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.component.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.component.ts @@ -15,7 +15,14 @@ import { TimeOffService, ToastrService } from '@gauzy/ui-core/core'; -import { StatusTypesEnum, ITimeOff, ComponentLayoutStyleEnum, IOrganization, IDateRangePicker } from '@gauzy/contracts'; +import { + StatusTypesEnum, + ITimeOff, + ComponentLayoutStyleEnum, + IOrganization, + IDateRangePicker, + ID +} from '@gauzy/contracts'; import { API_PREFIX, ComponentEnum, distinctUntilChange, toUTC } from '@gauzy/ui-core/common'; import { PaginationFilterBaseComponent, @@ -39,7 +46,7 @@ import { ApprovalPolicyComponent } from '../approvals/table-components'; }) export class TimeOffComponent extends PaginationFilterBaseComponent implements OnInit, OnDestroy { settingsSmartTable: object; - selectedEmployeeId: string | null; + selectedEmployeeId: ID; selectedDateRange: IDateRangePicker; sourceSmartTable: ServerDataSource; timeOffs: ITimeOff[] = []; @@ -396,7 +403,7 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O renderComponent: ApprovalPolicyComponent, componentInitFunction: (instance: ApprovalPolicyComponent, cell: Cell) => { instance.rowData = cell.getRow().getData(); - instance.value = cell.getValue(); + instance.value = cell.getRawValue(); }, isFilterable: { type: 'custom', diff --git a/apps/gauzy/src/app/pages/time-off/time-off.module.ts b/apps/gauzy/src/app/pages/time-off/time-off.module.ts index add77bd890c..06c69f3abe9 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.module.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.module.ts @@ -1,4 +1,5 @@ import { NgModule } from '@angular/core'; +import { ROUTES, RouterModule } from '@angular/router'; import { NbBadgeModule, NbButtonModule, @@ -23,38 +24,45 @@ import { CardGridModule, SharedModule, TimeOffMutationModule, - UserFormsModule + UserFormsModule, + TableComponentsModule } from '@gauzy/ui-core/shared'; +import { routes } from './time-off.routes'; import { TimeOffComponent } from './time-off.component'; -import { TimeOffRoutingModule } from './time-off-routing.module'; +import { PaidIcon, RequestApprovalIcon } from './table-components'; import { TimeOffSettingsComponent } from './time-off-settings/time-off-settings.component'; -import { RequestApprovalIcon } from './table-components/request-approval-icon'; -import { PaidIcon } from './table-components/paid-icon'; + +// Nebular Modules +const NB_MODULES = [ + NbBadgeModule, + NbButtonModule, + NbCardModule, + NbCheckboxModule, + NbDialogModule.forChild(), + NbIconModule, + NbInputModule, + NbRouteTabsetModule, + NbSelectModule, + NbSpinnerModule, + NbTooltipModule, + NbRadioModule, + NbToggleModule +]; + +// Third Party Modules +const THIRD_PARTY_MODULES = [NgSelectModule, NgxPermissionsModule.forChild(), TranslateModule.forChild()]; @NgModule({ imports: [ + RouterModule.forChild(routes), + ...NB_MODULES, + ...THIRD_PARTY_MODULES, SharedModule, - TimeOffRoutingModule, UserFormsModule, - NbCardModule, - NbButtonModule, - NbInputModule, - NbIconModule, - NbDialogModule.forChild(), - NbTooltipModule, - NgSelectModule, - NbRadioModule, - NbSelectModule, - NbBadgeModule, - CardGridModule, - NbRouteTabsetModule, - NbCheckboxModule, - TranslateModule.forChild(), - NbSpinnerModule, TimeOffMutationModule, - NgxPermissionsModule.forChild(), + CardGridModule, SmartDataViewLayoutModule, - NbToggleModule + TableComponentsModule ], declarations: [TimeOffComponent, TimeOffSettingsComponent, RequestApprovalIcon, PaidIcon], providers: [OrganizationsService, TimeOffService] diff --git a/apps/gauzy/src/app/pages/time-off/time-off-routing.module.ts b/apps/gauzy/src/app/pages/time-off/time-off.routes.ts similarity index 72% rename from apps/gauzy/src/app/pages/time-off/time-off-routing.module.ts rename to apps/gauzy/src/app/pages/time-off/time-off.routes.ts index 591e0efbe4e..6853205ea16 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off-routing.module.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.routes.ts @@ -1,19 +1,21 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { Routes } from '@angular/router'; import { PermissionsEnum } from '@gauzy/contracts'; import { PermissionsGuard } from '@gauzy/ui-core/core'; import { DateRangePickerResolver } from '@gauzy/ui-core/shared'; import { TimeOffComponent } from './time-off.component'; import { TimeOffSettingsComponent } from './time-off-settings/time-off-settings.component'; -const routes: Routes = [ +/** + * Routes for the TimeOffModule + */ +export const routes: Routes = [ { path: '', component: TimeOffComponent, canActivate: [PermissionsGuard], data: { permissions: { - only: [PermissionsEnum.ORG_TIME_OFF_VIEW], + only: [PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_READ], redirectTo: '/pages/dashboard' }, selectors: { @@ -31,7 +33,7 @@ const routes: Routes = [ canActivate: [PermissionsGuard], data: { permissions: { - only: [PermissionsEnum.POLICY_VIEW], + only: [PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_POLICY_VIEW], redirectTo: '/pages/dashboard' }, selectors: { @@ -42,9 +44,3 @@ const routes: Routes = [ } } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class TimeOffRoutingModule {} diff --git a/packages/ui-core/static/styles/@shared/_pg-card.scss b/packages/ui-core/static/styles/@shared/_pg-card.scss new file mode 100644 index 00000000000..12c71395e6a --- /dev/null +++ b/packages/ui-core/static/styles/@shared/_pg-card.scss @@ -0,0 +1,31 @@ +@import 'gauzy/_gauzy-table.scss'; +@import 'gauzy/_gauzy-cards.scss'; + +$card-height: calc($default-card-height + 3.75rem); + +:host { + nb-card, + nb-card-body { + background-color: var(--gauzy-card-2); + margin: 0; + display: flex; + flex-direction: column; + + .table-scroll-container { + flex-grow: 10; + max-height: unset; + } + } + + nb-card-body { + border-radius: 0 0 $default-radius $default-radius; + @include nb-ltr(padding, 1rem 0.5rem 1rem 18px); + @include nb-rtl(padding, 1rem 18px 1rem 0.5rem); + } + + nb-card, + nb-card-header { + border-radius: var(--border-radius); + } + @include nb-card-overrides(unset, $card-height, $default-radius); +} From b025fce2dc6d8df458e96c64801e299a8f72560d Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Mon, 2 Sep 2024 16:41:07 +0530 Subject: [PATCH 05/13] fix: added new translation for time off permissions --- packages/ui-core/i18n/assets/i18n/ach.json | 3 --- packages/ui-core/i18n/assets/i18n/ar.json | 15 ++++++++++----- packages/ui-core/i18n/assets/i18n/bg.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/de.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/en.json | 14 ++++++++++---- packages/ui-core/i18n/assets/i18n/es.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/fr.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/he.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/it.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/nl.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/pl.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/pt.json | 16 +++++++++++----- packages/ui-core/i18n/assets/i18n/ru.json | 17 +++++++++++------ packages/ui-core/i18n/assets/i18n/zh.json | 16 +++++++++++----- 14 files changed, 141 insertions(+), 68 deletions(-) diff --git a/packages/ui-core/i18n/assets/i18n/ach.json b/packages/ui-core/i18n/assets/i18n/ach.json index 961edf20b3a..d95f08395e2 100644 --- a/packages/ui-core/i18n/assets/i18n/ach.json +++ b/packages/ui-core/i18n/assets/i18n/ach.json @@ -1849,7 +1849,6 @@ "ORG_PROPOSALS_VIEW": "crwdns2663:0crwdne2663:0", "ORG_PROPOSAL_TEMPLATES_VIEW": "crwdns8724:0crwdne8724:0", "ORG_PROPOSAL_TEMPLATES_EDIT": "crwdns8726:0crwdne8726:0", - "ORG_TIME_OFF_VIEW": "crwdns2665:0crwdne2665:0", "ORG_EMPLOYEES_VIEW": "crwdns2667:0crwdne2667:0", "ORG_EMPLOYEES_EDIT": "crwdns2669:0crwdne2669:0", "ORG_CANDIDATES_VIEW": "crwdns3380:0crwdne3380:0", @@ -1867,8 +1866,6 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "crwdns4082:0crwdne4082:0", "ALL_ORG_VIEW": "crwdns2675:0crwdne2675:0", "ALL_ORG_EDIT": "crwdns2677:0crwdne2677:0", - "POLICY_VIEW": "crwdns2701:0crwdne2701:0", - "POLICY_EDIT": "crwdns2703:0crwdne2703:0", "CHANGE_SELECTED_EMPLOYEE": "crwdns2739:0crwdne2739:0", "CHANGE_SELECTED_CANDIDATE": "crwdns3384:0crwdne3384:0", "CHANGE_SELECTED_ORGANIZATION": "crwdns2741:0crwdne2741:0", diff --git a/packages/ui-core/i18n/assets/i18n/ar.json b/packages/ui-core/i18n/assets/i18n/ar.json index 16c542b0701..7345f8c60a7 100644 --- a/packages/ui-core/i18n/assets/i18n/ar.json +++ b/packages/ui-core/i18n/assets/i18n/ar.json @@ -1108,7 +1108,8 @@ "TABLE": "الطاولة", "CARDS_GRID": "شبكة البطاقات", "SPRINT_VIEW": "عرض السبرينت", - "QUICK_SETTINGS": "الإعدادات السريعة" + "QUICK_SETTINGS": "الإعدادات السريعة", + "NO_LAYOUT": "No data layout available" }, "CHANGELOG_MENU": { "HEADER": "ما الجديد؟", @@ -1999,7 +2000,6 @@ "ORG_PROPOSALS_VIEW": "عرض صفحة العروض", "ORG_PROPOSAL_TEMPLATES_VIEW": "عرض صفحة قوالب الاقتراحات", "ORG_PROPOSAL_TEMPLATES_EDIT": "إنشاء/تعديل/حذف قوالب الاقتراحات", - "ORG_TIME_OFF_VIEW": "عرض صفحة الإجازات", "ORG_EMPLOYEES_VIEW": "عرض موظفي المؤسسة", "ORG_EMPLOYEES_EDIT": "إنشاء/تعديل/حذف موظفي المنظمة", "ORG_CANDIDATES_VIEW": "عرض مرشحي المنظمة", @@ -2020,8 +2020,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "إنشاء / تحرير / حذف تعليقات المرشح", "ALL_ORG_VIEW": "عرض جميع المؤسسات", "ALL_ORG_EDIT": "إنشاء/تعديل/حذف جميع المؤسسات", - "POLICY_VIEW": "عرض سياسة الإجازات", - "POLICY_EDIT": "تعديل سياسة الإجازة المدفوعة", + "TIME_OFF_POLICY_ADD": "Add Time Off Policy", + "TIME_OFF_POLICY_VIEW": "View Time Off Policy", + "TIME_OFF_POLICY_EDIT": "Edit Time Off Policy", + "TIME_OFF_POLICY_DELETE": "Delete Time Off Policy", "CHANGE_SELECTED_EMPLOYEE": "تغيير الموظف المحدد", "CHANGE_SELECTED_CANDIDATE": "تغيير المرشح المحدد", "CHANGE_SELECTED_ORGANIZATION": "تغيير المنظمة المحددة", @@ -2046,7 +2048,10 @@ "PUBLIC_PAGE_EDIT": "تحرير صفحة المنظمة العامة", "CAN_APPROVE_TIMESHEET": "اعتماد الجدول الزمني", "EVENT_TYPES_VIEW": "عرض أنواع الأحداث", - "TIME_OFF_EDIT": "تحرير وقت الراحة", + "TIME_OFF_ADD": "Add Time Off", + "TIME_OFF_VIEW": "View Time Off", + "TIME_OFF_EDIT": "Edit Time Off", + "TIME_OFF_DELETE": "Delete Time Off", "ORG_INVENTORY_VIEW": "عرض جرد المنظمة", "INVENTORY_GALLERY_VIEW": "عرض معرض المخزون", "INVENTORY_GALLERY_EDIT": "تعديل معرض المخزون", diff --git a/packages/ui-core/i18n/assets/i18n/bg.json b/packages/ui-core/i18n/assets/i18n/bg.json index 51b52f3cfb5..bd827cf6f4b 100644 --- a/packages/ui-core/i18n/assets/i18n/bg.json +++ b/packages/ui-core/i18n/assets/i18n/bg.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "Не сте създали никакви заявки за одобрение.", "APPROVAL_POLICY": "Не сте създали никакви политики за одобрение.", "TIME_OFF": "Не сте създали никакво време за отпуск.", + "TIME_OFF_POLICY": "Не сте създали политики за отпуск.", "CANDIDATE": "Не сте създали никакви кандидати.", "INTERVIEW": "Не сте създали никакви интервюта.", "EQUIPMENT": "Не сте създали никакво оборудване.", @@ -1116,7 +1117,8 @@ "TABLE": "Таблица", "CARDS_GRID": "Карти и мрежа", "SPRINT_VIEW": "Визуализация на спринт", - "QUICK_SETTINGS": "Бързи настройки" + "QUICK_SETTINGS": "Бързи настройки", + "NO_LAYOUT": "Няма наличен изглед за данни" }, "CHANGELOG_MENU": { "HEADER": "Какво ново?", @@ -2035,7 +2037,6 @@ "ORG_PROPOSALS_VIEW": "Виж страницата с кандидатствания", "ORG_PROPOSAL_TEMPLATES_VIEW": "View Proposal Templates Page", "ORG_PROPOSAL_TEMPLATES_EDIT": "Create/Edit/Delete Proposal Templates", - "ORG_TIME_OFF_VIEW": "Виж Time Off страницата", "ORG_EMPLOYEES_ADD": "Създаване на служители в организацията", "ORG_EMPLOYEES_VIEW": "Преглед на служители в организацията", "ORG_EMPLOYEES_EDIT": "Редактиране на служители в организацията", @@ -2058,8 +2059,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Create/Edit/Delete Candidate Feedback", "ALL_ORG_VIEW": "Виж всички организации", "ALL_ORG_EDIT": "Създай/Редактирай/Изтрии всички организации", - "POLICY_VIEW": "Виж Time Off политиката", - "POLICY_EDIT": "Редактирай Time Off политиката", + "TIME_OFF_POLICY_ADD": "Добавяне на Политика за Отпуск", + "TIME_OFF_POLICY_VIEW": "Преглед на Политика за Отпуск", + "TIME_OFF_POLICY_EDIT": "Редактиране на Политика за Отпуск", + "TIME_OFF_POLICY_DELETE": "Изтриване на Политика за Отпуск", "CHANGE_SELECTED_EMPLOYEE": "Промени избрания служител", "CHANGE_SELECTED_CANDIDATE": "Change Selected Candidate", "CHANGE_SELECTED_ORGANIZATION": "Промени избраната организация", @@ -2084,7 +2087,10 @@ "PUBLIC_PAGE_EDIT": "Edit Organization Public Page", "CAN_APPROVE_TIMESHEET": "Approve Timesheet", "EVENT_TYPES_VIEW": "View Event Types", - "TIME_OFF_EDIT": "Edit Time Off", + "TIME_OFF_ADD": "Добавяне на Отпуск", + "TIME_OFF_VIEW": "Преглед на Отпуск", + "TIME_OFF_EDIT": "Редактиране на Отпуск", + "TIME_OFF_DELETE": "Изтриване на Отпуск", "ORG_INVENTORY_VIEW": "View Organization Inventory", "INVENTORY_GALLERY_VIEW": "View Inventory Gallery", "INVENTORY_GALLERY_EDIT": "Edit Inventory Gallery", diff --git a/packages/ui-core/i18n/assets/i18n/de.json b/packages/ui-core/i18n/assets/i18n/de.json index 8a863321fac..51cad471946 100644 --- a/packages/ui-core/i18n/assets/i18n/de.json +++ b/packages/ui-core/i18n/assets/i18n/de.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "Sie haben keine Genehmigungsanfrage erstellt.", "APPROVAL_POLICY": "Sie haben keine Genehmigungsrichtlinie erstellt.", "TIME_OFF": "Du hast keinen Urlaub erstellt.", + "TIME_OFF_POLICY": "Sie haben keine Urlaubsrichtlinien erstellt.", "CANDIDATE": "Sie haben keinen Kandidaten erstellt.", "INTERVIEW": "Sie haben kein Interview erstellt.", "EQUIPMENT": "Du hast keine Ausrüstung erstellt.", @@ -1108,7 +1109,8 @@ "TABLE": "Tisch", "CARDS_GRID": "Kartenraster", "SPRINT_VIEW": "Sprint-Ansicht", - "QUICK_SETTINGS": "Schnelleinstellungen" + "QUICK_SETTINGS": "Schnelleinstellungen", + "NO_LAYOUT": "Kein Datenlayout verfügbar" }, "CHANGELOG_MENU": { "HEADER": "Was gibt es Neues?", @@ -1996,7 +1998,6 @@ "ORG_PROPOSALS_VIEW": "Seite \"Vorschläge anzeigen\" anzeigen", "ORG_PROPOSAL_TEMPLATES_VIEW": "Seite mit Vorschlagvorlagen anzeigen", "ORG_PROPOSAL_TEMPLATES_EDIT": "Erstellen/Bearbeiten/Löschen von Vorschlagsvorlagen", - "ORG_TIME_OFF_VIEW": "Seite für Freizeit anzeigen", "ORG_EMPLOYEES_VIEW": "Anzeigen von Mitarbeitern der Organisation", "ORG_EMPLOYEES_EDIT": "Erstellen/Bearbeiten/Löschen von Organisation-Mitarbeitern", "ORG_CANDIDATES_VIEW": "Organisationskandidaten anzeigen", @@ -2017,8 +2018,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Kandidatenfeedback erstellen/bearbeiten/löschen.", "ALL_ORG_VIEW": "Alle Organisationen anzeigen", "ALL_ORG_EDIT": "Erstellen/Bearbeiten/Löschen aller Organisationen", - "POLICY_VIEW": "Sehen Sie sich die Urlaubsrichtlinie an", - "POLICY_EDIT": "Bearbeiten Sie die Urlaubsrichtlinie.", + "TIME_OFF_POLICY_ADD": "Urlaubsrichtlinie Hinzufügen", + "TIME_OFF_POLICY_VIEW": "Urlaubsrichtlinie Anzeigen", + "TIME_OFF_POLICY_EDIT": "Urlaubsrichtlinie Bearbeiten", + "TIME_OFF_POLICY_DELETE": "Urlaubsrichtlinie Löschen", "CHANGE_SELECTED_EMPLOYEE": "Ausgewählten Mitarbeiter ändern", "CHANGE_SELECTED_CANDIDATE": "Ändern Sie ausgewählten Kandidaten", "CHANGE_SELECTED_ORGANIZATION": "Ändere die ausgewählte Organisation.", @@ -2043,7 +2046,10 @@ "PUBLIC_PAGE_EDIT": "Editieren der öffentlichen Seite der Organisation", "CAN_APPROVE_TIMESHEET": "Zeitplan genehmigen", "EVENT_TYPES_VIEW": "Ansicht der Veranstaltungstypen.", - "TIME_OFF_EDIT": "Bearbeiten Sie die Freizeit.", + "TIME_OFF_ADD": "Urlaub Hinzufügen", + "TIME_OFF_VIEW": "Urlaub Anzeigen", + "TIME_OFF_EDIT": "Urlaub Bearbeiten", + "TIME_OFF_DELETE": "Urlaub Löschen", "ORG_INVENTORY_VIEW": "Organisationsinventar anzeigen", "INVENTORY_GALLERY_VIEW": "\"Inventargalerie anzeigen\"", "INVENTORY_GALLERY_EDIT": "Galerie Inventar bearbeiten", diff --git a/packages/ui-core/i18n/assets/i18n/en.json b/packages/ui-core/i18n/assets/i18n/en.json index 29680bfe99a..9e712c8d96f 100644 --- a/packages/ui-core/i18n/assets/i18n/en.json +++ b/packages/ui-core/i18n/assets/i18n/en.json @@ -195,6 +195,7 @@ "APPROVAL_REQUEST": "You have not created any approval requests.", "APPROVAL_POLICY": "You have not created any approval policies.", "TIME_OFF": "You have not created any time offs.", + "TIME_OFF_POLICY": "You have not created any time off policies.", "CANDIDATE": "You have not created any candidates.", "INTERVIEW": "You have not created any interviews.", "EQUIPMENT": "You have not created any equipment.", @@ -1147,7 +1148,8 @@ "TABLE": "Table", "CARDS_GRID": "Cards Grid", "SPRINT_VIEW": "Sprint View", - "QUICK_SETTINGS": "Quick Settings" + "QUICK_SETTINGS": "Quick Settings", + "NO_LAYOUT": "No data layout available" }, "CHANGELOG_MENU": { "HEADER": "What's new?", @@ -2107,7 +2109,6 @@ "ORG_PROPOSALS_VIEW": "View Proposals Page", "ORG_PROPOSAL_TEMPLATES_VIEW": "View Proposal Templates Page", "ORG_PROPOSAL_TEMPLATES_EDIT": "Create/Edit/Delete Proposal Templates", - "ORG_TIME_OFF_VIEW": "View Time Off Page", "ORG_EMPLOYEES_ADD": "Create Organization Employees", "ORG_EMPLOYEES_VIEW": "View Organization Employees", "ORG_EMPLOYEES_EDIT": "Edit Organization Employees", @@ -2130,8 +2131,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Create/Edit/Delete Candidate Feedback", "ALL_ORG_VIEW": "View All Organizations", "ALL_ORG_EDIT": "Create/Edit/Delete All Organizations", - "POLICY_VIEW": "View Time Off Policy", - "POLICY_EDIT": "Edit Time Off Policy", + "TIME_OFF_POLICY_ADD": "Add Time Off Policy", + "TIME_OFF_POLICY_VIEW": "View Time Off Policy", + "TIME_OFF_POLICY_EDIT": "Edit Time Off Policy", + "TIME_OFF_POLICY_DELETE": "Delete Time Off Policy", "CHANGE_SELECTED_EMPLOYEE": "Change Selected Employee", "CHANGE_SELECTED_CANDIDATE": "Change Selected Candidate", "CHANGE_SELECTED_ORGANIZATION": "Change Selected Organization", @@ -2156,7 +2159,10 @@ "PUBLIC_PAGE_EDIT": "Edit Organization Public Page", "CAN_APPROVE_TIMESHEET": "Approve Timesheet", "EVENT_TYPES_VIEW": "View Event Types", + "TIME_OFF_ADD": "Add Time Off", + "TIME_OFF_VIEW": "View Time Off", "TIME_OFF_EDIT": "Edit Time Off", + "TIME_OFF_DELETE": "Delete Time Off", "ORG_INVENTORY_VIEW": "View Organization Inventory", "INVENTORY_GALLERY_VIEW": "View Inventory Gallery", "INVENTORY_GALLERY_EDIT": "Edit Inventory Gallery", diff --git a/packages/ui-core/i18n/assets/i18n/es.json b/packages/ui-core/i18n/assets/i18n/es.json index 76388ce2d7d..4d44a151b80 100644 --- a/packages/ui-core/i18n/assets/i18n/es.json +++ b/packages/ui-core/i18n/assets/i18n/es.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "No has creado ninguna solicitud de aprobación.", "APPROVAL_POLICY": "No has creado ninguna política de aprobación.", "TIME_OFF": "No has creado ningún tiempo libre.", + "TIME_OFF_POLICY": "No has creado ninguna política de vacaciones.", "CANDIDATE": "No has creado ningún candidato.", "INTERVIEW": "No has creado ninguna entrevista.", "EQUIPMENT": "No has creado ningún equipo.", @@ -1110,7 +1111,8 @@ "TABLE": "Mesa", "CARDS_GRID": "Cuadrícula de Tarjetas", "SPRINT_VIEW": "Sprint View", - "QUICK_SETTINGS": "Configuración rápida" + "QUICK_SETTINGS": "Configuración rápida", + "NO_LAYOUT": "No hay diseño de datos disponible" }, "CHANGELOG_MENU": { "HEADER": "¿Qué hay de nuevo?", @@ -2002,7 +2004,6 @@ "ORG_PROPOSALS_VIEW": "Página de Visualización de Propuestas", "ORG_PROPOSAL_TEMPLATES_VIEW": "Ver página de plantillas de propuestas", "ORG_PROPOSAL_TEMPLATES_EDIT": "Crear/Editar/Eliminar plantillas de propuestas", - "ORG_TIME_OFF_VIEW": "Ver página de tiempo libre", "ORG_EMPLOYEES_VIEW": "Ver empleados de la organización.", "ORG_EMPLOYEES_EDIT": "Crear/Editar/Eliminar Empleados de la Organización", "ORG_CANDIDATES_VIEW": "Ver candidatos de la organización.", @@ -2023,8 +2024,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Crear/Editar/Eliminar Retroalimentación del candidato.", "ALL_ORG_VIEW": "Ver todas las organizaciones", "ALL_ORG_EDIT": "Crear/Editar/Eliminar todas las Organizaciones", - "POLICY_VIEW": "Ver política de tiempo libre.", - "POLICY_EDIT": "Editar política de tiempo libre.", + "TIME_OFF_POLICY_ADD": "Agregar Política de Vacaciones", + "TIME_OFF_POLICY_VIEW": "Ver Política de Vacaciones", + "TIME_OFF_POLICY_EDIT": "Editar Política de Vacaciones", + "TIME_OFF_POLICY_DELETE": "Eliminar Política de Vacaciones", "CHANGE_SELECTED_EMPLOYEE": "Cambiar Empleado Seleccionado", "CHANGE_SELECTED_CANDIDATE": "Cambiar Candidato Seleccionado", "CHANGE_SELECTED_ORGANIZATION": "Cambiar Organización Seleccionada", @@ -2049,7 +2052,10 @@ "PUBLIC_PAGE_EDIT": "Editar Página Pública de la Organización", "CAN_APPROVE_TIMESHEET": "Aprobar la hoja de horas.", "EVENT_TYPES_VIEW": "Ver Tipos de Evento", - "TIME_OFF_EDIT": "Editar tiempo libre", + "TIME_OFF_ADD": "Agregar Vacaciones", + "TIME_OFF_VIEW": "Ver Vacaciones", + "TIME_OFF_EDIT": "Editar Vacaciones", + "TIME_OFF_DELETE": "Eliminar Vacaciones", "ORG_INVENTORY_VIEW": "Ver inventario de la organización", "INVENTORY_GALLERY_VIEW": "Ver Galería de Inventario", "INVENTORY_GALLERY_EDIT": "Editar Galería de Inventario", diff --git a/packages/ui-core/i18n/assets/i18n/fr.json b/packages/ui-core/i18n/assets/i18n/fr.json index 8ca2dd632f4..69919648f6a 100644 --- a/packages/ui-core/i18n/assets/i18n/fr.json +++ b/packages/ui-core/i18n/assets/i18n/fr.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "Vous n'avez créé aucune demande d'approbation.", "APPROVAL_POLICY": "Vous n'avez créé aucune politique d'approbation.", "TIME_OFF": "Vous n'avez créé aucun congé.", + "TIME_OFF_POLICY": "Vous n'avez créé aucune politique de congé.", "CANDIDATE": "Vous n'avez créé aucun candidat.", "INTERVIEW": "Vous n'avez créé aucune interview.", "EQUIPMENT": "Vous n'avez créé aucun équipement.", @@ -1109,7 +1110,8 @@ "TABLE": "Table", "CARDS_GRID": "Grille de cartes", "SPRINT_VIEW": "Vue Sprint", - "QUICK_SETTINGS": "Paramètres rapides" + "QUICK_SETTINGS": "Paramètres rapides", + "NO_LAYOUT": "Aucun modèle de données disponible" }, "CHANGELOG_MENU": { "HEADER": "Quoi de neuf?", @@ -2001,7 +2003,6 @@ "ORG_PROPOSALS_VIEW": "Voir la page des propositions", "ORG_PROPOSAL_TEMPLATES_VIEW": "Afficher la page des modèles de proposition.", "ORG_PROPOSAL_TEMPLATES_EDIT": "Créer/Modifier/Supprimer des modèles de proposition", - "ORG_TIME_OFF_VIEW": "Afficher la page des congés.", "ORG_EMPLOYEES_VIEW": "Voir les employés de l'organisation", "ORG_EMPLOYEES_EDIT": "Créer/Modifier/Supprimer les employés de l'organisation", "ORG_CANDIDATES_VIEW": "Voir les candidats de l'organisation.", @@ -2022,8 +2023,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Créer/Modifier/Supprimer des retours de candidats", "ALL_ORG_VIEW": "Voir toutes les organisations", "ALL_ORG_EDIT": "Créer/Modifier/Supprimer Toutes les Organisations", - "POLICY_VIEW": "Consulter la politique de congé.", - "POLICY_EDIT": "Modifier la politique de congé", + "TIME_OFF_POLICY_ADD": "Ajouter une Politique de Congé", + "TIME_OFF_POLICY_VIEW": "Voir la Politique de Congé", + "TIME_OFF_POLICY_EDIT": "Modifier la Politique de Congé", + "TIME_OFF_POLICY_DELETE": "Supprimer la Politique de Congé", "CHANGE_SELECTED_EMPLOYEE": "Changer l'employé sélectionné", "CHANGE_SELECTED_CANDIDATE": "Changer le candidat sélectionné", "CHANGE_SELECTED_ORGANIZATION": "Changer l'organisation sélectionnée", @@ -2048,7 +2051,10 @@ "PUBLIC_PAGE_EDIT": "Modifier la page publique de l'organisation", "CAN_APPROVE_TIMESHEET": "Approuver la feuille de temps", "EVENT_TYPES_VIEW": "Afficher les types d'événements", - "TIME_OFF_EDIT": "Modifier les congés", + "TIME_OFF_ADD": "Ajouter Congé", + "TIME_OFF_VIEW": "Voir Congé", + "TIME_OFF_EDIT": "Modifier Congé", + "TIME_OFF_DELETE": "Supprimer Congé", "ORG_INVENTORY_VIEW": "Voir l'inventaire de l'organisation", "INVENTORY_GALLERY_VIEW": "Voir la galerie de l'inventaire", "INVENTORY_GALLERY_EDIT": "Modifier la galerie d'inventaire", diff --git a/packages/ui-core/i18n/assets/i18n/he.json b/packages/ui-core/i18n/assets/i18n/he.json index fdc13b48f7f..065023454e2 100644 --- a/packages/ui-core/i18n/assets/i18n/he.json +++ b/packages/ui-core/i18n/assets/i18n/he.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "לא יצרתם בקשות אישור.", "APPROVAL_POLICY": "לא יצרתם מדיניות אישור.", "TIME_OFF": "לא יצרתם ימי חופשה.", + "TIME_OFF_POLICY": "לא יצרת מדיניות חופשה.", "CANDIDATE": "לא יצרתם מועמדים.", "INTERVIEW": "לא יצרתם ראיונות.", "EQUIPMENT": "לא יצרתם ציוד.", @@ -1112,7 +1113,8 @@ "TABLE": "Table", "CARDS_GRID": "Cards Grid", "SPRINT_VIEW": "Sprint View", - "QUICK_SETTINGS": "Quick Settings" + "QUICK_SETTINGS": "Quick Settings", + "NO_LAYOUT": "אין פריסת נתונים זמינה" }, "CHANGELOG_MENU": { "HEADER": "What's new?", @@ -2028,7 +2030,6 @@ "ORG_PROPOSALS_VIEW": "View Proposals Page", "ORG_PROPOSAL_TEMPLATES_VIEW": "View Proposal Templates Page", "ORG_PROPOSAL_TEMPLATES_EDIT": "Create/Edit/Delete Proposal Templates", - "ORG_TIME_OFF_VIEW": "View Time Off Page", "ORG_EMPLOYEES_ADD": "צור עובדי ארגון", "ORG_EMPLOYEES_VIEW": "צפה בעובדי ארגון", "ORG_EMPLOYEES_EDIT": "ערוך עובדי ארגון", @@ -2051,8 +2052,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Create/Edit/Delete Candidate Feedback", "ALL_ORG_VIEW": "View All Organizations", "ALL_ORG_EDIT": "Create/Edit/Delete All Organizations", - "POLICY_VIEW": "View Time Off Policy", - "POLICY_EDIT": "Edit Time Off Policy", + "TIME_OFF_POLICY_ADD": "הוסף מדיניות חופשה", + "TIME_OFF_POLICY_VIEW": "צפה במדיניות חופשה", + "TIME_OFF_POLICY_EDIT": "ערוך מדיניות חופשה", + "TIME_OFF_POLICY_DELETE": "מחק מדיניות חופשה", "CHANGE_SELECTED_EMPLOYEE": "Change Selected Employee", "CHANGE_SELECTED_CANDIDATE": "Change Selected Candidate", "CHANGE_SELECTED_ORGANIZATION": "Change Selected Organization", @@ -2077,7 +2080,10 @@ "PUBLIC_PAGE_EDIT": "Edit Organization Public Page", "CAN_APPROVE_TIMESHEET": "Approve Timesheet", "EVENT_TYPES_VIEW": "View Event Types", - "TIME_OFF_EDIT": "Edit Time Off", + "TIME_OFF_ADD": "הוסף חופשה", + "TIME_OFF_VIEW": "צפה בחופשה", + "TIME_OFF_EDIT": "ערוך חופשה", + "TIME_OFF_DELETE": "מחק חופשה", "ORG_INVENTORY_VIEW": "View Organization Inventory", "INVENTORY_GALLERY_VIEW": "View Inventory Gallery", "INVENTORY_GALLERY_EDIT": "Edit Inventory Gallery", diff --git a/packages/ui-core/i18n/assets/i18n/it.json b/packages/ui-core/i18n/assets/i18n/it.json index 99c45a5429a..103b712b665 100644 --- a/packages/ui-core/i18n/assets/i18n/it.json +++ b/packages/ui-core/i18n/assets/i18n/it.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "Non hai creato nessuna richiesta di approvazione", "APPROVAL_POLICY": "Non hai creato alcuna politica di approvazione", "TIME_OFF": "Non hai creato nessun periodo di ferie", + "TIME_OFF_POLICY": "Non hai creato alcuna politica di ferie.", "CANDIDATE": "Non hai creato nessun candidato", "INTERVIEW": "Non hai creato nessun colloquio", "EQUIPMENT": "Non hai creato alcun equipaggiamento", @@ -1108,7 +1109,8 @@ "TABLE": "Tavolo", "CARDS_GRID": "Griglia di carte", "SPRINT_VIEW": "Vista della sprint", - "QUICK_SETTINGS": "Impostazioni rapide" + "QUICK_SETTINGS": "Impostazioni rapide", + "NO_LAYOUT": "Nessun layout di dati disponibile" }, "CHANGELOG_MENU": { "HEADER": "Cosa c'è di nuovo?", @@ -2000,7 +2002,6 @@ "ORG_PROPOSALS_VIEW": "Visualizza pagina delle proposte", "ORG_PROPOSAL_TEMPLATES_VIEW": "Visualizza la pagina dei modelli di proposta", "ORG_PROPOSAL_TEMPLATES_EDIT": "Creare/Modificare/Eliminare modelli di proposte", - "ORG_TIME_OFF_VIEW": "Visualizza la pagina delle assenze", "ORG_EMPLOYEES_VIEW": "Visualizza dipendenti dell'organizzazione", "ORG_EMPLOYEES_EDIT": "Creare/Modificare/Eliminare dipendenti dell'organizzazione", "ORG_CANDIDATES_VIEW": "Visualizza candidati dell'organizzazione", @@ -2021,8 +2022,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Creare/Modificare/Eliminare Feedback del Candidato", "ALL_ORG_VIEW": "Visualizza tutte le organizzazioni", "ALL_ORG_EDIT": "Crea/Modifica/Elimina tutte le organizzazioni", - "POLICY_VIEW": "Visualizza la politica sul tempo libero", - "POLICY_EDIT": "Modifica la politica sul tempo libero", + "TIME_OFF_POLICY_ADD": "Aggiungi Politica di Ferie", + "TIME_OFF_POLICY_VIEW": "Visualizza Politica di Ferie", + "TIME_OFF_POLICY_EDIT": "Modifica Politica di Ferie", + "TIME_OFF_POLICY_DELETE": "Elimina Politica di Ferie", "CHANGE_SELECTED_EMPLOYEE": "Cambia Dipendente Selezionato", "CHANGE_SELECTED_CANDIDATE": "Cambia candidato selezionato", "CHANGE_SELECTED_ORGANIZATION": "Cambia Organizzazione Selezionata", @@ -2047,7 +2050,10 @@ "PUBLIC_PAGE_EDIT": "Modifica Pagina Pubblica Organizzazione", "CAN_APPROVE_TIMESHEET": "Approva il foglio presenze", "EVENT_TYPES_VIEW": "Visualizza tipi di eventi", - "TIME_OFF_EDIT": "Modifica tempo libero", + "TIME_OFF_ADD": "Aggiungi Ferie", + "TIME_OFF_VIEW": "Visualizza Ferie", + "TIME_OFF_EDIT": "Modifica Ferie", + "TIME_OFF_DELETE": "Elimina Ferie", "ORG_INVENTORY_VIEW": "Visualizza l'inventario dell'organizzazione", "INVENTORY_GALLERY_VIEW": "Visualizza la galleria di inventario", "INVENTORY_GALLERY_EDIT": "Modifica la Galleria dell'Inventario", diff --git a/packages/ui-core/i18n/assets/i18n/nl.json b/packages/ui-core/i18n/assets/i18n/nl.json index b93aa5c4fbe..b79c9f060dc 100644 --- a/packages/ui-core/i18n/assets/i18n/nl.json +++ b/packages/ui-core/i18n/assets/i18n/nl.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "Je hebt geen goedkeuringsverzoek aangemaakt.", "APPROVAL_POLICY": "U heeft geen goedkeuringsbeleid aangemaakt.", "TIME_OFF": "U heeft geen verlof aangemaakt.", + "TIME_OFF_POLICY": "U heeft nog geen verlofbeleid aangemaakt.", "CANDIDATE": "Je hebt nog geen kandidaat aangemaakt.", "INTERVIEW": "Je hebt nog geen enkel interview aangemaakt.", "EQUIPMENT": "Je hebt geen apparatuur gemaakt.", @@ -1108,7 +1109,8 @@ "TABLE": "Tafel", "CARDS_GRID": "Kaartenraster", "SPRINT_VIEW": "Sprintweergave", - "QUICK_SETTINGS": "Snelle instellingen" + "QUICK_SETTINGS": "Snelle instellingen", + "NO_LAYOUT": "Geen gegevenslay-out beschikbaar" }, "CHANGELOG_MENU": { "HEADER": "Wat is er nieuw?", @@ -2000,7 +2002,6 @@ "ORG_PROPOSALS_VIEW": "Bekijk voorstellenpagina", "ORG_PROPOSAL_TEMPLATES_VIEW": "Bekijk de pagina met voorstelsjablonen", "ORG_PROPOSAL_TEMPLATES_EDIT": "Maak/bewerk/verwijder sjablonen voor voorstellen", - "ORG_TIME_OFF_VIEW": "Bekijk Verlofpagina", "ORG_EMPLOYEES_VIEW": "Bekijk organisatiemedewerkers", "ORG_EMPLOYEES_EDIT": "Maak/Bewerk/Verwijder Organisatiemedewerkers", "ORG_CANDIDATES_VIEW": "Bekijk kandidaten van de organisatie", @@ -2021,8 +2022,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Maak/Bewerk/Verwijder Kandidaat Feedback", "ALL_ORG_VIEW": "Bekijk alle organisaties", "ALL_ORG_EDIT": "Maak/Bewerk/Verwijder Alle Organisaties", - "POLICY_VIEW": "Bekijk verlofbeleid", - "POLICY_EDIT": "Bewerk Verlofbeleid", + "TIME_OFF_POLICY_ADD": "Voeg Verlofbeleid Toe", + "TIME_OFF_POLICY_VIEW": "Bekijk Verlofbeleid", + "TIME_OFF_POLICY_EDIT": "Bewerk Verlofbeleid", + "TIME_OFF_POLICY_DELETE": "Verwijder Verlofbeleid", "CHANGE_SELECTED_EMPLOYEE": "Wijzig geselecteerde werknemer", "CHANGE_SELECTED_CANDIDATE": "Geselecteerde kandidaat wijzigen", "CHANGE_SELECTED_ORGANIZATION": "Verander Geselecteerde Organisatie", @@ -2047,7 +2050,10 @@ "PUBLIC_PAGE_EDIT": "Pagina van organisatie bewerken", "CAN_APPROVE_TIMESHEET": "Goedkeuren tijdschema", "EVENT_TYPES_VIEW": "Bekijk evenementtypes", - "TIME_OFF_EDIT": "Bewerk Verlof", + "TIME_OFF_ADD": "Verlof Toevoegen", + "TIME_OFF_VIEW": "Verlof Bekijken", + "TIME_OFF_EDIT": "Verlof Bewerken", + "TIME_OFF_DELETE": "Verlof Verwijderen", "ORG_INVENTORY_VIEW": "Bekijk Organisatievoorraad", "INVENTORY_GALLERY_VIEW": "Bekijk inventarisgalerij", "INVENTORY_GALLERY_EDIT": "Bewerk voorraadgalerij", diff --git a/packages/ui-core/i18n/assets/i18n/pl.json b/packages/ui-core/i18n/assets/i18n/pl.json index 6d47935b3f8..ab8c7b64743 100644 --- a/packages/ui-core/i18n/assets/i18n/pl.json +++ b/packages/ui-core/i18n/assets/i18n/pl.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "Nie utworzyłeś żadnego wniosku o zatwierdzenie", "APPROVAL_POLICY": "Nie utworzyłeś żadnej polityki zatwierdzania", "TIME_OFF": "Nie utworzyłeś żadnego urlopu", + "TIME_OFF_POLICY": "Nie utworzyłeś żadnych polityk urlopowych.", "CANDIDATE": "Nie utworzyłeś żadnego kandydata", "INTERVIEW": "Nie stworzyłeś żadnego wywiadu", "EQUIPMENT": "Nie utworzyłeś żadnego wyposażenia", @@ -1108,7 +1109,8 @@ "TABLE": "Tabela", "CARDS_GRID": "Siatka kart", "SPRINT_VIEW": "Widok sprintu", - "QUICK_SETTINGS": "Szybkie ustawienia" + "QUICK_SETTINGS": "Szybkie ustawienia", + "NO_LAYOUT": "Brak dostępnego układu danych" }, "CHANGELOG_MENU": { "HEADER": "Co nowego?", @@ -2000,7 +2002,6 @@ "ORG_PROPOSALS_VIEW": "Zobacz stronę z propozycjami", "ORG_PROPOSAL_TEMPLATES_VIEW": "Zobacz stronę szablonów propozycji", "ORG_PROPOSAL_TEMPLATES_EDIT": "Twórz/Modyfikuj/Usuń szablony propozycji", - "ORG_TIME_OFF_VIEW": "Zobacz stronę Time Off", "ORG_EMPLOYEES_VIEW": "Wyświetl pracowników organizacji", "ORG_EMPLOYEES_EDIT": "Twórz/edytuj/usuń pracowników organizacji", "ORG_CANDIDATES_VIEW": "Wyświetl kandydatów organizacji", @@ -2021,8 +2022,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Utwórz/edytuj/usuń informacje zwrotne kandydata", "ALL_ORG_VIEW": "Wyświetl wszystkie organizacje", "ALL_ORG_EDIT": "Stwórz/edytuj/usuń wszystkie organizacje", - "POLICY_VIEW": "Zobacz Politykę urlopów", - "POLICY_EDIT": "Edytuj politykę urlopową", + "TIME_OFF_POLICY_ADD": "Dodaj Politykę Urlopową", + "TIME_OFF_POLICY_VIEW": "Zobacz Politykę Urlopową", + "TIME_OFF_POLICY_EDIT": "Edytuj Politykę Urlopową", + "TIME_OFF_POLICY_DELETE": "Usuń Politykę Urlopową", "CHANGE_SELECTED_EMPLOYEE": "Zmień wybranego pracownika", "CHANGE_SELECTED_CANDIDATE": "Zmień wybranego kandydata", "CHANGE_SELECTED_ORGANIZATION": "Zmień wybraną organizację", @@ -2047,7 +2050,10 @@ "PUBLIC_PAGE_EDIT": "Edytuj publiczną stronę organizacji", "CAN_APPROVE_TIMESHEET": "Zatwierdź kartę czasu pracy", "EVENT_TYPES_VIEW": "Wyświetl typy wydarzeń", - "TIME_OFF_EDIT": "Edytuj czas wolny", + "TIME_OFF_ADD": "Dodaj Urlop", + "TIME_OFF_VIEW": "Zobacz Urlop", + "TIME_OFF_EDIT": "Edytuj Urlop", + "TIME_OFF_DELETE": "Usuń Urlop", "ORG_INVENTORY_VIEW": "Wyświetl inwentarz organizacji", "INVENTORY_GALLERY_VIEW": "Zobacz galerię inwentarza", "INVENTORY_GALLERY_EDIT": "Edytuj galerię inwentarza", diff --git a/packages/ui-core/i18n/assets/i18n/pt.json b/packages/ui-core/i18n/assets/i18n/pt.json index 74753029b23..26e4c2bdbcc 100644 --- a/packages/ui-core/i18n/assets/i18n/pt.json +++ b/packages/ui-core/i18n/assets/i18n/pt.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "Você não criou nenhum pedido de aprovação.", "APPROVAL_POLICY": "Você não criou nenhuma política de aprovação.", "TIME_OFF": "Você não criou nenhum tempo livre.", + "TIME_OFF_POLICY": "Você não criou nenhuma política de folga.", "CANDIDATE": "Você não criou nenhum candidato.", "INTERVIEW": "Você não criou nenhuma entrevista.", "EQUIPMENT": "Você não criou nenhum equipamento.", @@ -1108,7 +1109,8 @@ "TABLE": "Mesa", "CARDS_GRID": "Grade de Cartões", "SPRINT_VIEW": "Sprint View", - "QUICK_SETTINGS": "Configurações rápidas" + "QUICK_SETTINGS": "Configurações rápidas", + "NO_LAYOUT": "Nenhum layout de dados disponível" }, "CHANGELOG_MENU": { "HEADER": "O que há de novo?", @@ -2000,7 +2002,6 @@ "ORG_PROPOSALS_VIEW": "Página de visualização de propostas.", "ORG_PROPOSAL_TEMPLATES_VIEW": "Ver página de modelos de proposta", "ORG_PROPOSAL_TEMPLATES_EDIT": "Criar/Editar/Excluir Modelos de Proposta", - "ORG_TIME_OFF_VIEW": "Visualizar Página de Tempo Livre", "ORG_EMPLOYEES_VIEW": "Visualizar Funcionários da Organização", "ORG_EMPLOYEES_EDIT": "Criar/Editar/Excluir funcionários da organização", "ORG_CANDIDATES_VIEW": "Visualizar os Candidatos da Organização", @@ -2021,8 +2022,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Criar/Editar/Excluir Feedback do Candidato", "ALL_ORG_VIEW": "Ver todas as organizações", "ALL_ORG_EDIT": "Criar/Editar/Excluir todas as Organizações", - "POLICY_VIEW": "Visualizar Política de Licença", - "POLICY_EDIT": "Editar Política de Tempo Livre", + "TIME_OFF_POLICY_ADD": "Adicionar Política de Folga", + "TIME_OFF_POLICY_VIEW": "Ver Política de Folga", + "TIME_OFF_POLICY_EDIT": "Editar Política de Folga", + "TIME_OFF_POLICY_DELETE": "Excluir Política de Folga", "CHANGE_SELECTED_EMPLOYEE": "Alterar Funcionário Selecionado", "CHANGE_SELECTED_CANDIDATE": "Mudança de Candidato Selecionado", "CHANGE_SELECTED_ORGANIZATION": "Alterar Organização Selecionada", @@ -2047,7 +2050,10 @@ "PUBLIC_PAGE_EDIT": "Editar página pública da organização.", "CAN_APPROVE_TIMESHEET": "Aprovar Folha de Horas", "EVENT_TYPES_VIEW": "Ver Tipos de Eventos", - "TIME_OFF_EDIT": "Editar Período de Ausência ou Editar Folga", + "TIME_OFF_ADD": "Adicionar Folga", + "TIME_OFF_VIEW": "Ver Folga", + "TIME_OFF_EDIT": "Editar Folga", + "TIME_OFF_DELETE": "Excluir Folga", "ORG_INVENTORY_VIEW": "Visualizar inventário da organização", "INVENTORY_GALLERY_VIEW": "Ver galeria de inventário", "INVENTORY_GALLERY_EDIT": "Editar Galeria de Inventário", diff --git a/packages/ui-core/i18n/assets/i18n/ru.json b/packages/ui-core/i18n/assets/i18n/ru.json index 23e1e3ef740..00131a760c4 100644 --- a/packages/ui-core/i18n/assets/i18n/ru.json +++ b/packages/ui-core/i18n/assets/i18n/ru.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "Вы не создали ни одного запроса на одобрение.", "APPROVAL_POLICY": "Вы не создали ни одной политики одобрения.", "TIME_OFF": "Вы не создали ни одного отпуска.", + "TIME_OFF_POLICY": "Вы не создали никаких политик отпуска.", "CANDIDATE": "Вы не создали ни одного кандидата.", "INTERVIEW": "Вы не создали ни одного интервью.", "EQUIPMENT": "Вы не создали ни одного оборудования.", @@ -1116,7 +1117,8 @@ "TABLE": "Таблица", "CARDS_GRID": "Сетка карт", "SPRINT_VIEW": "Просмотр спринта", - "QUICK_SETTINGS": "Быстрые настройки" + "QUICK_SETTINGS": "Быстрые настройки", + "NO_LAYOUT": "Нет доступного макета данных" }, "CHANGELOG_MENU": { "HEADER": "Что нового?", @@ -2035,7 +2037,6 @@ "ORG_PROPOSALS_VIEW": "Показать страницу предложений", "ORG_PROPOSAL_TEMPLATES_VIEW": "Просмотр шаблонов предложения страницы", "ORG_PROPOSAL_TEMPLATES_EDIT": "Создать/Изменить/Удалить шаблоны предложения", - "ORG_TIME_OFF_VIEW": "Показать время на странице", "ORG_EMPLOYEES_ADD": "Создать сотрудников организации", "ORG_EMPLOYEES_VIEW": "Просмотр сотрудников организации", "ORG_EMPLOYEES_EDIT": "Редактировать сотрудников организации", @@ -2058,8 +2059,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "Создать/изменить/Удалить отзыв по Кандидату", "ALL_ORG_VIEW": "Просмотр всех организаций", "ALL_ORG_EDIT": "Создание/Изменить/Удалить все организации", - "POLICY_VIEW": "Просмотр политики отключения", - "POLICY_EDIT": "Редактировать политику отключения", + "TIME_OFF_POLICY_ADD": "Добавить политику отпуска", + "TIME_OFF_POLICY_VIEW": "Просмотреть политику отпуска", + "TIME_OFF_POLICY_EDIT": "Редактировать политику отпуска", + "TIME_OFF_POLICY_DELETE": "Удалить политику отпуска", "CHANGE_SELECTED_EMPLOYEE": "Изменить выбранного сотрудника", "CHANGE_SELECTED_CANDIDATE": "Изменить выбранный Кандидат", "CHANGE_SELECTED_ORGANIZATION": "Изменить выбранную организацию", @@ -2083,8 +2086,10 @@ "ORG_HELP_CENTER_EDIT": "Редактировать справочный центр организации", "PUBLIC_PAGE_EDIT": "Изменить публичную страницу организации", "CAN_APPROVE_TIMESHEET": "Одобрить график работы", - "EVENT_TYPES_VIEW": "Типы событий", - "TIME_OFF_EDIT": "Редактировать время выкл", + "TIME_OFF_ADD": "Добавить отпуск", + "TIME_OFF_VIEW": "Просмотреть отпуск", + "TIME_OFF_EDIT": "Редактировать отпуск", + "TIME_OFF_DELETE": "Удалить отпуск", "ORG_INVENTORY_VIEW": "Просмотр инвентаризации организации", "INVENTORY_GALLERY_VIEW": "Просмотреть галерею инвентаря", "INVENTORY_GALLERY_EDIT": "Изменить галерею инвентаря", diff --git a/packages/ui-core/i18n/assets/i18n/zh.json b/packages/ui-core/i18n/assets/i18n/zh.json index 42a668fe972..abab41a0ac5 100644 --- a/packages/ui-core/i18n/assets/i18n/zh.json +++ b/packages/ui-core/i18n/assets/i18n/zh.json @@ -185,6 +185,7 @@ "APPROVAL_REQUEST": "您还没有创建任何审批请求。", "APPROVAL_POLICY": "您还没有创建任何审批策略。", "TIME_OFF": "您还没有创建任何休假。", + "TIME_OFF_POLICY": "您尚未创建任何休假政策。", "CANDIDATE": "您还没有创建任何候选人。", "INTERVIEW": "您尚未创建任何面试。", "EQUIPMENT": "你还没有创建任何设备。", @@ -1108,7 +1109,8 @@ "TABLE": "桌子", "CARDS_GRID": "卡片网格", "SPRINT_VIEW": "Sprint View 时事回顾", - "QUICK_SETTINGS": "快捷设置" + "QUICK_SETTINGS": "快捷设置", + "NO_LAYOUT": "没有可用的数据布局" }, "CHANGELOG_MENU": { "HEADER": "有什么新的吗?", @@ -2000,7 +2002,6 @@ "ORG_PROPOSALS_VIEW": "查看提案页面", "ORG_PROPOSAL_TEMPLATES_VIEW": "查看提案模板页面", "ORG_PROPOSAL_TEMPLATES_EDIT": "创建/编辑/删除提案模板", - "ORG_TIME_OFF_VIEW": "查看休假页面", "ORG_EMPLOYEES_VIEW": "查看组织员工", "ORG_EMPLOYEES_EDIT": "创建/编辑/删除组织员工", "ORG_CANDIDATES_VIEW": "查看组织候选人", @@ -2021,8 +2022,10 @@ "ORG_CANDIDATES_FEEDBACK_EDIT": "创建/编辑/删除候选人反馈", "ALL_ORG_VIEW": "查看所有组织", "ALL_ORG_EDIT": "创建/编辑/删除所有组织", - "POLICY_VIEW": "查看休假政策", - "POLICY_EDIT": "编辑休假政策", + "TIME_OFF_POLICY_ADD": "添加休假政策", + "TIME_OFF_POLICY_VIEW": "查看休假政策", + "TIME_OFF_POLICY_EDIT": "编辑休假政策", + "TIME_OFF_POLICY_DELETE": "删除休假政策", "CHANGE_SELECTED_EMPLOYEE": "更改选定的员工", "CHANGE_SELECTED_CANDIDATE": "改变选定的候选人", "CHANGE_SELECTED_ORGANIZATION": "更改所选组织", @@ -2047,7 +2050,10 @@ "PUBLIC_PAGE_EDIT": "编辑组织公共页面", "CAN_APPROVE_TIMESHEET": "批准时间表", "EVENT_TYPES_VIEW": "查看事件类型", - "TIME_OFF_EDIT": "修改休假时间", + "TIME_OFF_ADD": "添加休假", + "TIME_OFF_VIEW": "查看休假", + "TIME_OFF_EDIT": "编辑休假", + "TIME_OFF_DELETE": "删除休假", "ORG_INVENTORY_VIEW": "查看组织库存", "INVENTORY_GALLERY_VIEW": "查看库存画廊", "INVENTORY_GALLERY_EDIT": "编辑库存画廊", From f587690efde071bd9ad87f77f1a3606f2bc8b8ed Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Mon, 2 Sep 2024 17:17:19 +0530 Subject: [PATCH 06/13] fix: time off crud permission definition --- .../approval-policy.component.ts | 2 +- .../time-off-settings.component.html | 11 +- .../time-off-settings.component.ts | 5 +- .../pages/time-off/time-off.component.html | 268 +++++++++--------- .../app/pages/time-off/time-off.component.ts | 250 +++++++++------- .../src/app/pages/time-off/time-off.routes.ts | 2 +- .../contracts/src/role-permission.model.ts | 49 ++-- .../default-role-permissions.ts | 45 +-- .../src/time-off-policy/repository/index.ts | 2 + .../mikro-orm-time-off-policy.repository.ts | 2 +- .../time-off-policy.controller.ts | 31 +- .../time-off-policy/time-off-policy.entity.ts | 27 +- .../time-off-policy/time-off-policy.module.ts | 15 +- .../time-off-policy.service.ts | 112 ++++---- .../time-off-request.controller.ts | 52 ++-- .../base-nav-menu/base-nav-menu.component.ts | 13 +- 16 files changed, 478 insertions(+), 408 deletions(-) create mode 100644 packages/core/src/time-off-policy/repository/index.ts diff --git a/apps/gauzy/src/app/pages/approvals/table-components/approval-policy/approval-policy.component.ts b/apps/gauzy/src/app/pages/approvals/table-components/approval-policy/approval-policy.component.ts index e5a58ac2f4c..fcea539d5f9 100644 --- a/apps/gauzy/src/app/pages/approvals/table-components/approval-policy/approval-policy.component.ts +++ b/apps/gauzy/src/app/pages/approvals/table-components/approval-policy/approval-policy.component.ts @@ -1,7 +1,7 @@ import { Component, Input } from '@angular/core'; @Component({ - selector: 'ngx-approval-policy', + selector: 'ngx-approval-policy-table', templateUrl: './approval-policy.component.html', styleUrls: ['./approval-policy.component.scss'] }) diff --git a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.html b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.html index 0ebc5a2f81c..1685d198fbb 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.html +++ b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.html @@ -18,7 +18,8 @@

- + + @@ -52,6 +53,14 @@

+ + + +
+ +

You don't have permission to view this page

+
+
diff --git a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.ts b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.ts index ee050930d47..8fd03d442eb 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off-settings/time-off-settings.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, OnDestroy } from '@angular/core'; import { HttpClient } from '@angular/common/http'; -import { ComponentLayoutStyleEnum, IOrganization, ITimeOffPolicy } from '@gauzy/contracts'; +import { ComponentLayoutStyleEnum, IOrganization, ITimeOffPolicy, PermissionsEnum } from '@gauzy/contracts'; import { debounceTime, filter, first, tap } from 'rxjs/operators'; import { Subject } from 'rxjs/internal/Subject'; import { Cell } from 'angular2-smart-table'; @@ -20,7 +20,7 @@ import { PaidIcon, RequestApprovalIcon } from '../table-components'; @UntilDestroy({ checkProperties: true }) @Component({ - selector: 'ga-time-off-settings', + selector: 'ga-time-off-policy-list', templateUrl: './time-off-settings.component.html', styleUrls: ['./time-off-settings.component.scss'] }) @@ -32,6 +32,7 @@ export class TimeOffSettingsComponent extends PaginationFilterBaseComponent impl public timeOffPolicies: ITimeOffPolicy[] = []; public loading: boolean = false; public disableButton: boolean = true; + public PermissionsEnum = PermissionsEnum; public viewComponentName: ComponentEnum; public dataLayoutStyle = ComponentLayoutStyleEnum.TABLE; public componentLayoutStyleEnum = ComponentLayoutStyleEnum; diff --git a/apps/gauzy/src/app/pages/time-off/time-off.component.html b/apps/gauzy/src/app/pages/time-off/time-off.component.html index 4e0fde74de4..e417c6e5b0b 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.component.html +++ b/apps/gauzy/src/app/pages/time-off/time-off.component.html @@ -6,55 +6,60 @@

{{ 'TIME_OFF_PAGE.HEADER' | translate }}

- +
+ - - {{ 'TIME_OFF_PAGE.DISPLAY_HOLIDAYS' | translate }} - - + + + + + {{ 'TIME_OFF_PAGE.DISPLAY_HOLIDAYS' | translate }} + + + + +
+ - + {{ 'TIME_OFF_PAGE.STATUSES.' + status | translate }} + +
- -
- -
- - + + + + + + +
+ +
+ + + +
+ + + +
+ +
+
+ + + +

{{ 'SETTINGS_MENU.NO_LAYOUT' | translate }}

+
- -
- + + + +
+ +

You don't have permission to view this page

+ - +
+ + + + + + +
+ + +
- -
-
- -
- -
+ + + +
+
+ + - - - + + + +
- - - - - - diff --git a/apps/gauzy/src/app/pages/time-off/time-off.component.ts b/apps/gauzy/src/app/pages/time-off/time-off.component.ts index 7eced299f11..d96cbde7de3 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.component.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.component.ts @@ -10,6 +10,7 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import * as moment from 'moment'; import { DateRangePickerBuilderService, + ErrorHandlingService, ServerDataSource, Store, TimeOffService, @@ -21,7 +22,9 @@ import { ComponentLayoutStyleEnum, IOrganization, IDateRangePicker, - ID + ID, + PermissionsEnum, + NullableString } from '@gauzy/contracts'; import { API_PREFIX, ComponentEnum, distinctUntilChange, toUTC } from '@gauzy/ui-core/common'; import { @@ -40,47 +43,47 @@ import { ApprovalPolicyComponent } from '../approvals/table-components'; @UntilDestroy({ checkProperties: true }) @Component({ - selector: 'ga-time-off', + selector: 'ga-time-off-list', templateUrl: './time-off.component.html', styleUrls: ['./time-off.component.scss'] }) export class TimeOffComponent extends PaginationFilterBaseComponent implements OnInit, OnDestroy { - settingsSmartTable: object; - selectedEmployeeId: ID; - selectedDateRange: IDateRangePicker; - sourceSmartTable: ServerDataSource; - timeOffs: ITimeOff[] = []; - selectedTimeOffRecord: ITimeOff; - timeOffRequest: ITimeOff; - viewComponentName: ComponentEnum; - dataLayoutStyle = ComponentLayoutStyleEnum.TABLE; - componentLayoutStyleEnum = ComponentLayoutStyleEnum; - rows: Array = []; - selectedStatus = StatusTypesEnum.ALL; - timeOffStatuses = Object.keys(StatusTypesEnum); - loading: boolean; - isRecordSelected: boolean = false; - displayHolidays: boolean = true; - showActions: boolean = false; - includeArchived: boolean = false; - showFilter: boolean = false; - + public settingsSmartTable: object; + public selectedEmployeeId: ID; + public selectedDateRange: IDateRangePicker; + public sourceSmartTable: ServerDataSource; + public timeOffs: ITimeOff[] = []; + public selectedTimeOffRecord: ITimeOff; + public timeOffRequest: ITimeOff; + public PermissionsEnum = PermissionsEnum; + public viewComponentName: ComponentEnum; + public dataLayoutStyle = ComponentLayoutStyleEnum.TABLE; + public componentLayoutStyleEnum = ComponentLayoutStyleEnum; + public timeOffStatusesselectedStatus = StatusTypesEnum.ALL; + public timeOffStatuses = Object.keys(StatusTypesEnum); + public loading: boolean; + public disableButton: boolean = true; + public displayHolidays: boolean = true; + public showActions: boolean = false; + public includeArchived: boolean = false; + public showFilter: boolean = false; public organization: IOrganization; public timeOff$: Subject = this.subject$; private _refresh$: Subject = new Subject(); constructor( - private readonly router: Router, - private readonly dialogService: NbDialogService, - private readonly timeOffService: TimeOffService, - private readonly toastrService: ToastrService, - private readonly store: Store, - private readonly translate: TranslateService, - private readonly httpClient: HttpClient, - private readonly route: ActivatedRoute, - private readonly dateRangePickerBuilderService: DateRangePickerBuilderService + readonly translateService: TranslateService, + private readonly _router: Router, + private readonly _dialogService: NbDialogService, + private readonly _timeOffService: TimeOffService, + private readonly _toastrService: ToastrService, + private readonly _store: Store, + private readonly _httpClient: HttpClient, + private readonly _route: ActivatedRoute, + private readonly _dateRangePickerBuilderService: DateRangePickerBuilderService, + private readonly _errorHandlingService: ErrorHandlingService ) { - super(translate); + super(translateService); this.setView(); } @@ -103,9 +106,9 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O untilDestroyed(this) ) .subscribe(); - const storeOrganization$ = this.store.selectedOrganization$; - const selectedDateRange$ = this.dateRangePickerBuilderService.selectedDateRange$; - const storeEmployee$ = this.store.selectedEmployee$; + const storeOrganization$ = this._store.selectedOrganization$; + const selectedDateRange$ = this._dateRangePickerBuilderService.selectedDateRange$; + const storeEmployee$ = this._store.selectedEmployee$; combineLatest([storeOrganization$, selectedDateRange$, storeEmployee$]) .pipe( debounceTime(200), @@ -121,7 +124,7 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O untilDestroyed(this) ) .subscribe(); - this.route.queryParamMap + this._route.queryParamMap .pipe( filter((params) => !!params && params.get('openAddDialog') === 'true'), debounceTime(1000), @@ -141,7 +144,7 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O setView() { this.viewComponentName = ComponentEnum.TIME_OFF; - this.store + this._store .componentLayout$(this.viewComponentName) .pipe( distinctUntilChange(), @@ -155,18 +158,18 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O .subscribe(); } - showAdditionalActions() { - this.showActions = !this.showActions; - } - + /** + * Change display holidays + * + * @param isHoliday + */ changeDisplayHolidays(isHoliday: boolean) { - this.isRecordSelected = false; this._refresh$.next(true); this.timeOff$.next(true); } private _applyTranslationOnSmartTable() { - this.translate.onLangChange + this.translateService.onLangChange .pipe( tap(() => this._loadSmartTableSettings()), untilDestroyed(this) @@ -180,7 +183,6 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O * @param status */ detectStatusChange(status: StatusTypesEnum) { - this.isRecordSelected = false; switch (status) { case StatusTypesEnum.REQUESTED: case StatusTypesEnum.APPROVED: @@ -193,18 +195,24 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O } } - openTimeOffSettings() { - this.router.navigate(['/pages/employees/time-off/settings']); - } - - selectRecord({ isSelected, data }) { - this.isRecordSelected = isSelected ? true : false; + /** + * Select time off record + * + * @param param0 + */ + selectTimeOff({ isSelected, data }) { + this.disableButton = !isSelected; this.selectedTimeOffRecord = isSelected ? data : null; } + /** + * Approves the selected time off request. + * + * @param selectedItem + */ approveDaysOff(selectedItem?: ITimeOff) { if (selectedItem) { - this.selectRecord({ + this.selectTimeOff({ isSelected: true, data: selectedItem }); @@ -212,19 +220,19 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O if (this.selectedTimeOffRecord.status !== StatusTypesEnum.APPROVED) { const requestId = this.selectedTimeOffRecord.id; this.selectedTimeOffRecord.status = StatusTypesEnum.APPROVED; - this.timeOffService + this._timeOffService .updateRequestStatus(requestId, 'approval') .pipe(untilDestroyed(this), first()) .subscribe({ next: () => { - this.toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.STATUS_SET_APPROVED'); + this._toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.STATUS_SET_APPROVED'); this._refresh$.next(true); this.timeOff$.next(true); }, - error: () => this.toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_SET_STATUS') + error: () => this._toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_SET_STATUS') }); } else { - this.toastrService.success( + this._toastrService.success( 'TIME_OFF_PAGE.NOTIFICATIONS.APPROVED_NO_CHANGES', 'TIME_OFF_PAGE.NOTIFICATIONS.NO_CHANGES' ); @@ -233,9 +241,14 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O } } + /** + * Denies the selected time off request. + * + * @param selectedItem + */ denyDaysOff(selectedItem?: ITimeOff) { if (selectedItem) { - this.selectRecord({ + this.selectTimeOff({ isSelected: true, data: selectedItem }); @@ -243,18 +256,18 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O if (this.selectedTimeOffRecord.status !== StatusTypesEnum.DENIED) { const requestId = this.selectedTimeOffRecord.id; this.selectedTimeOffRecord.status = StatusTypesEnum.DENIED; - this.timeOffService + this._timeOffService .updateRequestStatus(requestId, 'denied') .pipe(untilDestroyed(this), first()) .subscribe({ next: () => { - this.toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.REQUEST_DENIED'); + this._toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.REQUEST_DENIED'); this.timeOff$.next(true); }, - error: () => this.toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_SET_STATUS') + error: () => this._toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_SET_STATUS') }); } else { - this.toastrService.success( + this._toastrService.success( 'TIME_OFF_PAGE.NOTIFICATIONS.DENIED_NO_CHANGES', 'TIME_OFF_PAGE.NOTIFICATIONS.NO_CHANGES' ); @@ -263,14 +276,19 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O } } + /** + * Deletes the selected time off request. + * + * @param selectedItem + */ deleteRequest(selectedItem?: ITimeOff) { if (selectedItem) { - this.selectRecord({ + this.selectTimeOff({ isSelected: true, data: selectedItem }); } - this.dialogService + this._dialogService .open(DeleteConfirmationComponent, { context: { recordType: this.getTranslation('TIME_OFF_PAGE.TIME_OFF_REQUEST') @@ -279,23 +297,26 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O .onClose.pipe(first()) .subscribe((res) => { if (res) { - this.timeOffService + this._timeOffService .deleteDaysOffRequest(this.selectedTimeOffRecord.id) .pipe(untilDestroyed(this), first()) .subscribe({ next: () => { - this.toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.REQUEST_DELETED'); + this._toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.REQUEST_DELETED'); this._refresh$.next(true); this.timeOff$.next(true); }, - error: () => this.toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_DELETE_REQUEST') + error: () => this._toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_DELETE_REQUEST') }); } }); } + /** + * Opens a dialog for requesting time off. + */ requestDaysOff() { - this.dialogService + this._dialogService .open(TimeOffRequestMutationComponent, { context: { type: 'request' } }) @@ -306,8 +327,12 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O }); } + /** + * Adds holidays to the selected time off request. + * Opens a dialog for adding holidays. + */ addHolidays() { - this.dialogService + this._dialogService .open(TimeOffHolidayMutationComponent) .onClose.pipe(untilDestroyed(this), first()) .subscribe((res) => { @@ -325,7 +350,7 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O updateTimeOffRecord() { this._removeDocUrl(); - this.dialogService + this._dialogService .open(TimeOffRequestMutationComponent, { context: { timeOff: this.selectedTimeOffRecord } }) @@ -339,6 +364,9 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O }); } + /** + * Archives the selected time off request. + */ archive() { const requestId = this.selectedTimeOffRecord.id; this.selectedTimeOffRecord.isArchived = true; @@ -346,6 +374,11 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O this._updateRecord(requestId); } + /** + * Change include archived + * + * @param $event + */ changeIncludeArchived($event) { this._refresh$.next(true); this.timeOff$.next(true); @@ -356,7 +389,10 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O * */ private _loadSmartTableSettings() { + // Get pagination settings const pagination: IPaginationBase = this.getPagination(); + + // Set up smart table settings this.settingsSmartTable = { actions: false, selectedRowIndex: -1, @@ -461,14 +497,14 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O if (!this.organization) { return; } - try { - this.loading = true; - const { tenantId } = this.store.user; - const { id: organizationId } = this.organization; + this.loading = true; + + try { + const { id: organizationId, tenantId } = this.organization; const { startDate, endDate } = getAdjustDateRangeFutureAllowed(this.selectedDateRange); - this.sourceSmartTable = new ServerDataSource(this.httpClient, { + this.sourceSmartTable = new ServerDataSource(this._httpClient, { endPoint: `${API_PREFIX}/time-off-request/pagination`, relations: ['policy', 'document', 'employees.user'], join: { @@ -502,6 +538,9 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O this.loading = false; } }); + } catch (error) { + console.log('Error while retrieving time off requests: ', error); + this._errorHandlingService.handleError(error); } finally { this.loading = false; } @@ -516,13 +555,20 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O if (!this.organization) { return; } - this.setSmartTableSource(); try { + // Set up the Smart Table source + this.setSmartTableSource(); + + // Get pagination settings const { activePage, itemsPerPage } = this.getPagination(); + + // Set paging for the Smart Table source this.sourceSmartTable.setPaging(activePage, itemsPerPage, false); + + // Load additional data for grid layout, if active this._loadGridLayoutData(); } catch (error) { - this.toastrService.danger(error, 'TIME_OFF_PAGE.NOTIFICATIONS.ERR_LOAD_RECORDS'); + this._toastrService.danger(error, 'TIME_OFF_PAGE.NOTIFICATIONS.ERR_LOAD_RECORDS'); } } @@ -566,14 +612,16 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O private _createRecord() { try { if (this.timeOffRequest) { - this.timeOffService + this._timeOffService .createRequest(this.timeOffRequest) .pipe( untilDestroyed(this), first(), - tap(() => this.toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.RECORD_CREATED')), + tap(() => this._toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.RECORD_CREATED')), tap(() => - this.dateRangePickerBuilderService.refreshDateRangePicker(moment(this.timeOffRequest.start)) + this._dateRangePickerBuilderService.refreshDateRangePicker( + moment(this.timeOffRequest.start) + ) ), finalize(() => { this._refresh$.next(true); @@ -583,20 +631,20 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O .subscribe(); } } catch (error) { - this.toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_CREATE_RECORD'); + this._toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_CREATE_RECORD'); } } - private _updateRecord(id: string) { + private _updateRecord(id: ID) { try { - this.timeOffService + this._timeOffService .updateRequest(id, this.timeOffRequest) .pipe( untilDestroyed(this), first(), - tap(() => this.toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.REQUEST_UPDATED')), + tap(() => this._toastrService.success('TIME_OFF_PAGE.NOTIFICATIONS.REQUEST_UPDATED')), tap(() => - this.dateRangePickerBuilderService.refreshDateRangePicker(moment(this.timeOffRequest.start)) + this._dateRangePickerBuilderService.refreshDateRangePicker(moment(this.timeOffRequest.start)) ), finalize(() => { this._refresh$.next(true); @@ -605,7 +653,7 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O ) .subscribe(); } catch (error) { - this.toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_UPDATE_RECORD'); + this._toastrService.danger('TIME_OFF_PAGE.NOTIFICATIONS.ERR_UPDATE_RECORD'); } } @@ -621,10 +669,7 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O * Clear selected item */ clearItem() { - this.selectRecord({ - isSelected: false, - data: null - }); + this.selectTimeOff({ isSelected: false, data: null }); } /** @@ -634,19 +679,28 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O */ navigateToEmployee(row: ITimeOff) { if (row?.employees.length > 0) { - this.router.navigate([`/pages/employees/edit`, row.employees[0].id]); + // Extract the first employee from the employees array + const [employee] = row.employees; + this._router.navigate([`/pages/employees/edit`, employee.id]); } } - private statusMapper(value: any) { - let badgeClass; - if (value) { - badgeClass = [StatusTypesEnum.APPROVED].includes(value.toUpperCase()) - ? 'success' - : [StatusTypesEnum.REQUESTED].includes(value.toUpperCase()) - ? 'warning' - : 'danger'; - } + /** + * Maps a status string to its corresponding badge class and returns an object + * containing the original text and the computed class. + * + * @param {NullableString} value - The status string to map, which can be null or undefined. + * @returns {{ text: NullableString, class: string }} An object containing the status text + * and the associated badge class. + */ + private statusMapper(value: NullableString): { text: NullableString; class: string } { + const badgeClass = value + ? { + [StatusTypesEnum.APPROVED]: 'success', + [StatusTypesEnum.REQUESTED]: 'warning' + }[value.toUpperCase()] || 'danger' + : 'danger'; + return { text: value, class: badgeClass diff --git a/apps/gauzy/src/app/pages/time-off/time-off.routes.ts b/apps/gauzy/src/app/pages/time-off/time-off.routes.ts index 6853205ea16..d3ae949037f 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.routes.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.routes.ts @@ -15,7 +15,7 @@ export const routes: Routes = [ canActivate: [PermissionsGuard], data: { permissions: { - only: [PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_READ], + only: [PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_VIEW], redirectTo: '/pages/dashboard' }, selectors: { diff --git a/packages/contracts/src/role-permission.model.ts b/packages/contracts/src/role-permission.model.ts index 864bb9ac852..03a1841080f 100644 --- a/packages/contracts/src/role-permission.model.ts +++ b/packages/contracts/src/role-permission.model.ts @@ -53,7 +53,6 @@ export enum PermissionsEnum { ORG_TASK_VIEW = 'ORG_TASK_VIEW', ORG_TASK_EDIT = 'ORG_TASK_EDIT', ORG_TASK_DELETE = 'ORG_TASK_DELETE', - ORG_TIME_OFF_VIEW = 'ORG_TIME_OFF_VIEW', // Employee CRUD Permissions ORG_EMPLOYEES_ADD = 'ORG_EMPLOYEES_ADD', ORG_EMPLOYEES_VIEW = 'ORG_EMPLOYEES_VIEW', @@ -80,9 +79,16 @@ export enum PermissionsEnum { ORG_INVITE_EDIT = 'ORG_INVITE_EDIT', ALL_ORG_VIEW = 'ALL_ORG_VIEW', ALL_ORG_EDIT = 'ALL_ORG_EDIT', - POLICY_VIEW = 'POLICY_VIEW', - POLICY_EDIT = 'POLICY_EDIT', + /** Time Off Policy CRUD Permissions */ + TIME_OFF_POLICY_ADD = 'TIME_OFF_POLICY_ADD', + TIME_OFF_POLICY_VIEW = 'TIME_OFF_POLICY_VIEW', + TIME_OFF_POLICY_EDIT = 'TIME_OFF_POLICY_EDIT', + TIME_OFF_POLICY_DELETE = 'TIME_OFF_POLICY_DELETE', + /** Time Off CRUD Permissions */ + TIME_OFF_ADD = 'TIME_OFF_ADD', + TIME_OFF_VIEW = 'TIME_OFF_VIEW', TIME_OFF_EDIT = 'TIME_OFF_EDIT', + TIME_OFF_DELETE = 'TIME_OFF_DELETE', REQUEST_APPROVAL_VIEW = 'REQUEST_APPROVAL_VIEW', REQUEST_APPROVAL_EDIT = 'REQUEST_APPROVAL_EDIT', APPROVAL_POLICY_VIEW = 'APPROVALS_POLICY_VIEW', @@ -165,6 +171,12 @@ export enum PermissionsEnum { ORG_EQUIPMENT_SHARING_EDIT = 'ORG_EQUIPMENT_SHARING_EDIT', EQUIPMENT_MAKE_REQUEST = 'EQUIPMENT_MAKE_REQUEST', EQUIPMENT_APPROVE_REQUEST = 'EQUIPMENT_APPROVE_REQUEST', + /** Equipment Sharing Policy CRUD Permissions Start */ + EQUIPMENT_SHARING_POLICY_ADD = 'EQUIPMENT_SHARING_POLICY_ADD', + EQUIPMENT_SHARING_POLICY_VIEW = 'EQUIPMENT_SHARING_POLICY_VIEW', + EQUIPMENT_SHARING_POLICY_EDIT = 'EQUIPMENT_SHARING_POLICY_EDIT', + EQUIPMENT_SHARING_POLICY_DELETE = 'EQUIPMENT_SHARING_POLICY_DELETE', + /** Equipment Sharing Policy CRUD Permissions End */ ORG_PRODUCT_TYPES_VIEW = 'ORG_PRODUCT_TYPES_VIEW', ORG_PRODUCT_TYPES_EDIT = 'ORG_PRODUCT_TYPES_EDIT', ORG_PRODUCT_CATEGORIES_VIEW = 'ORG_PRODUCT_CATEGORIES_VIEW', @@ -183,7 +195,6 @@ export enum PermissionsEnum { DAILY_PLAN_READ = 'DAILY_PLAN_READ', DAILY_PLAN_UPDATE = 'DAILY_PLAN_UPDATE', DAILY_PLAN_DELETE = 'DAILY_PLAN_DELETE', - /** Project Module */ PROJECT_MODULE_CREATE = 'PROJECT_MODULE_CREATE', PROJECT_MODULE_READ = 'PROJECT_MODULE_READ', @@ -203,14 +214,12 @@ export const PermissionGroups = { PermissionsEnum.CHANGE_SELECTED_EMPLOYEE, PermissionsEnum.CHANGE_SELECTED_CANDIDATE, PermissionsEnum.CHANGE_SELECTED_ORGANIZATION, - /** Integration CRUD Permissions Start */ PermissionsEnum.INTEGRATION_ADD, PermissionsEnum.INTEGRATION_VIEW, PermissionsEnum.INTEGRATION_EDIT, PermissionsEnum.INTEGRATION_DELETE, /** Integration CRUD Permissions End */ - /** Jobs Permissions Start */ PermissionsEnum.ORG_JOB_APPLY, PermissionsEnum.ORG_JOB_SEARCH, @@ -218,7 +227,6 @@ export const PermissionGroups = { PermissionsEnum.ORG_JOB_EMPLOYEE_VIEW, PermissionsEnum.ORG_JOB_MATCHING_VIEW, /** Jobs Permissions End */ - PermissionsEnum.PUBLIC_PAGE_EDIT, PermissionsEnum.ORG_PAYMENT_VIEW, PermissionsEnum.ORG_PAYMENT_ADD_EDIT, @@ -232,26 +240,31 @@ export const PermissionGroups = { PermissionsEnum.ORG_PROPOSALS_VIEW, PermissionsEnum.ORG_PROPOSAL_TEMPLATES_VIEW, PermissionsEnum.ORG_PROPOSAL_TEMPLATES_EDIT, - /** Employee CRUD Permissions Start */ PermissionsEnum.ORG_EMPLOYEES_ADD, PermissionsEnum.ORG_EMPLOYEES_VIEW, PermissionsEnum.ORG_EMPLOYEES_DELETE, /** Employee CRUD Permissions End */ - /** Task CRUD Permissions Start */ PermissionsEnum.ORG_TASK_ADD, PermissionsEnum.ORG_TASK_VIEW, PermissionsEnum.ORG_TASK_EDIT, PermissionsEnum.ORG_TASK_DELETE, /** Task CRUD Permissions End */ - - PermissionsEnum.ORG_TIME_OFF_VIEW, PermissionsEnum.ORG_INVITE_VIEW, PermissionsEnum.ORG_INVITE_EDIT, - PermissionsEnum.POLICY_VIEW, - PermissionsEnum.POLICY_EDIT, + /** Time Off Policy CRUD Permissions Start */ + PermissionsEnum.TIME_OFF_POLICY_ADD, + PermissionsEnum.TIME_OFF_POLICY_VIEW, + PermissionsEnum.TIME_OFF_POLICY_EDIT, + PermissionsEnum.TIME_OFF_POLICY_DELETE, + /** Time Off Policy CRUD Permissions End */ + /** Time Off Permissions Start */ + PermissionsEnum.TIME_OFF_ADD, + PermissionsEnum.TIME_OFF_VIEW, PermissionsEnum.TIME_OFF_EDIT, + PermissionsEnum.TIME_OFF_DELETE, + /** Time Off Permissions End */ PermissionsEnum.APPROVAL_POLICY_EDIT, PermissionsEnum.APPROVAL_POLICY_VIEW, PermissionsEnum.REQUEST_APPROVAL_EDIT, @@ -286,21 +299,18 @@ export const PermissionGroups = { PermissionsEnum.ORG_PROJECT_DELETE, PermissionsEnum.ORG_CONTACT_EDIT, PermissionsEnum.ORG_CONTACT_VIEW, - /** Daily Plan Permissions Start */ PermissionsEnum.DAILY_PLAN_CREATE, PermissionsEnum.DAILY_PLAN_READ, PermissionsEnum.DAILY_PLAN_UPDATE, PermissionsEnum.DAILY_PLAN_DELETE, /** Daily Plan Permissions End */ - /** Project Module Permissions start */ PermissionsEnum.PROJECT_MODULE_CREATE, PermissionsEnum.PROJECT_MODULE_READ, PermissionsEnum.PROJECT_MODULE_UPDATE, PermissionsEnum.PROJECT_MODULE_DELETE, /** Project Module Permissions start */ - /** Organization Team Permissions Start */ PermissionsEnum.ORG_TEAM_ADD, PermissionsEnum.ORG_TEAM_VIEW, @@ -311,7 +321,6 @@ export const PermissionGroups = { PermissionsEnum.ORG_TEAM_JOIN_REQUEST_VIEW, PermissionsEnum.ORG_TEAM_JOIN_REQUEST_EDIT, /** Organization Team Permissions End */ - PermissionsEnum.ORG_TASK_SETTING, PermissionsEnum.ORG_CONTRACT_EDIT, PermissionsEnum.EVENT_TYPES_VIEW, @@ -328,6 +337,12 @@ export const PermissionGroups = { PermissionsEnum.ORG_EQUIPMENT_SHARING_EDIT, PermissionsEnum.EQUIPMENT_MAKE_REQUEST, PermissionsEnum.EQUIPMENT_APPROVE_REQUEST, + /**Equipment Sharing Policy Permissions Start */ + PermissionsEnum.EQUIPMENT_SHARING_POLICY_ADD, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_VIEW, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_EDIT, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_DELETE, + /** Equipment Sharing Policy Permissions End */ PermissionsEnum.ORG_PRODUCT_TYPES_VIEW, PermissionsEnum.ORG_PRODUCT_CATEGORIES_VIEW, PermissionsEnum.ORG_PRODUCT_CATEGORIES_EDIT, diff --git a/packages/core/src/role-permission/default-role-permissions.ts b/packages/core/src/role-permission/default-role-permissions.ts index 13ff04aaecf..2d99d7c127d 100644 --- a/packages/core/src/role-permission/default-role-permissions.ts +++ b/packages/core/src/role-permission/default-role-permissions.ts @@ -26,22 +26,18 @@ export const DEFAULT_ROLE_PERMISSIONS = [ PermissionsEnum.ORG_TASK_VIEW, PermissionsEnum.ORG_TASK_EDIT, PermissionsEnum.ORG_TASK_DELETE, - /** Organization Task Setting Permissions Start */ PermissionsEnum.ORG_TASK_SETTING, /** Organization Task Setting Permissions End */ - /** Employee CRUD Permissions Start */ PermissionsEnum.ORG_EMPLOYEES_ADD, PermissionsEnum.ORG_EMPLOYEES_VIEW, PermissionsEnum.ORG_EMPLOYEES_EDIT, PermissionsEnum.ORG_EMPLOYEES_DELETE, /** Employee CRUD Permissions End */ - /** Member View Permissions Start */ PermissionsEnum.ORG_MEMBERS_VIEW, /** Member View Permissions End */ - PermissionsEnum.ORG_CANDIDATES_VIEW, PermissionsEnum.ORG_CANDIDATES_EDIT, PermissionsEnum.ORG_CANDIDATES_TASK_EDIT, @@ -57,14 +53,22 @@ export const DEFAULT_ROLE_PERMISSIONS = [ PermissionsEnum.ORG_USERS_EDIT, PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.ALL_ORG_EDIT, - PermissionsEnum.POLICY_EDIT, - PermissionsEnum.POLICY_VIEW, + /** Equipment Sharing Policy Permissions Start */ + PermissionsEnum.EQUIPMENT_SHARING_POLICY_ADD, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_VIEW, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_EDIT, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_DELETE, + /** Equipment Sharing Policy Permissions End */ PermissionsEnum.APPROVAL_POLICY_EDIT, PermissionsEnum.APPROVAL_POLICY_VIEW, PermissionsEnum.REQUEST_APPROVAL_EDIT, PermissionsEnum.REQUEST_APPROVAL_VIEW, - PermissionsEnum.ORG_TIME_OFF_VIEW, + /** Time Off Permissions Start */ + PermissionsEnum.TIME_OFF_ADD, + PermissionsEnum.TIME_OFF_VIEW, PermissionsEnum.TIME_OFF_EDIT, + PermissionsEnum.TIME_OFF_DELETE, + /** Time Off Permissions End */ PermissionsEnum.CHANGE_SELECTED_EMPLOYEE, PermissionsEnum.CHANGE_SELECTED_CANDIDATE, PermissionsEnum.CHANGE_SELECTED_ORGANIZATION, @@ -97,21 +101,18 @@ export const DEFAULT_ROLE_PERMISSIONS = [ PermissionsEnum.ORG_PROJECT_DELETE, PermissionsEnum.ORG_CONTACT_EDIT, PermissionsEnum.ORG_CONTACT_VIEW, - /** Daily CRUD Permissions Start */ PermissionsEnum.DAILY_PLAN_CREATE, PermissionsEnum.DAILY_PLAN_READ, PermissionsEnum.DAILY_PLAN_UPDATE, PermissionsEnum.DAILY_PLAN_DELETE, /** Daily CRUD Permissions End */ - /** Project Module Permissions start */ PermissionsEnum.PROJECT_MODULE_CREATE, PermissionsEnum.PROJECT_MODULE_READ, PermissionsEnum.PROJECT_MODULE_UPDATE, PermissionsEnum.PROJECT_MODULE_DELETE, /** Project Module Permissions start */ - /** Organization Team */ PermissionsEnum.ORG_TEAM_ADD, PermissionsEnum.ORG_TEAM_VIEW, @@ -124,14 +125,12 @@ export const DEFAULT_ROLE_PERMISSIONS = [ PermissionsEnum.ORG_CONTRACT_EDIT, PermissionsEnum.EVENT_TYPES_VIEW, PermissionsEnum.TENANT_ADD_EXISTING_USER, - /** Integration CRUD Permissions Start */ PermissionsEnum.INTEGRATION_ADD, PermissionsEnum.INTEGRATION_VIEW, PermissionsEnum.INTEGRATION_EDIT, PermissionsEnum.INTEGRATION_DELETE, /** Integration CRUD Permissions End */ - PermissionsEnum.IMPORT_ADD, PermissionsEnum.EXPORT_ADD, PermissionsEnum.FILE_STORAGE_VIEW, @@ -229,14 +228,22 @@ export const DEFAULT_ROLE_PERMISSIONS = [ PermissionsEnum.ORG_USERS_EDIT, PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.ALL_ORG_EDIT, - PermissionsEnum.POLICY_EDIT, - PermissionsEnum.POLICY_VIEW, + /** Equipment Sharing Policy Permissions Start */ + PermissionsEnum.EQUIPMENT_SHARING_POLICY_ADD, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_VIEW, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_EDIT, + PermissionsEnum.EQUIPMENT_SHARING_POLICY_DELETE, + /** Equipment Sharing Policy Permissions End */ PermissionsEnum.APPROVAL_POLICY_EDIT, PermissionsEnum.APPROVAL_POLICY_VIEW, PermissionsEnum.REQUEST_APPROVAL_EDIT, PermissionsEnum.REQUEST_APPROVAL_VIEW, - PermissionsEnum.ORG_TIME_OFF_VIEW, + /** Time Off Permissions Start */ + PermissionsEnum.TIME_OFF_ADD, + PermissionsEnum.TIME_OFF_VIEW, PermissionsEnum.TIME_OFF_EDIT, + PermissionsEnum.TIME_OFF_DELETE, + /** Time Off Permissions End */ PermissionsEnum.CHANGE_SELECTED_EMPLOYEE, PermissionsEnum.CHANGE_SELECTED_CANDIDATE, PermissionsEnum.CHANGE_SELECTED_ORGANIZATION, @@ -391,10 +398,14 @@ export const DEFAULT_ROLE_PERMISSIONS = [ PermissionsEnum.ORG_PROPOSALS_EDIT, PermissionsEnum.ORG_PROPOSAL_TEMPLATES_VIEW, PermissionsEnum.ORG_PROPOSAL_TEMPLATES_EDIT, - PermissionsEnum.ORG_TIME_OFF_VIEW, + /** Time Off Permissions Start */ + PermissionsEnum.TIME_OFF_VIEW, + /** Time Off Permissions End */ PermissionsEnum.ORG_INVITE_VIEW, PermissionsEnum.ORG_INVITE_EDIT, - PermissionsEnum.POLICY_VIEW, + /** Equipment Sharing Policy Permissions Start */ + PermissionsEnum.EQUIPMENT_SHARING_POLICY_VIEW, + /** Equipment Sharing Policy Permissions End */ PermissionsEnum.APPROVAL_POLICY_EDIT, PermissionsEnum.APPROVAL_POLICY_VIEW, PermissionsEnum.REQUEST_APPROVAL_EDIT, diff --git a/packages/core/src/time-off-policy/repository/index.ts b/packages/core/src/time-off-policy/repository/index.ts new file mode 100644 index 00000000000..cf2f204be0d --- /dev/null +++ b/packages/core/src/time-off-policy/repository/index.ts @@ -0,0 +1,2 @@ +export * from './mikro-orm-time-off-policy.repository'; +export * from './type-orm-time-off-policy.repository'; diff --git a/packages/core/src/time-off-policy/repository/mikro-orm-time-off-policy.repository.ts b/packages/core/src/time-off-policy/repository/mikro-orm-time-off-policy.repository.ts index 7dfbeba4329..805f831dfff 100644 --- a/packages/core/src/time-off-policy/repository/mikro-orm-time-off-policy.repository.ts +++ b/packages/core/src/time-off-policy/repository/mikro-orm-time-off-policy.repository.ts @@ -1,4 +1,4 @@ import { MikroOrmBaseEntityRepository } from '../../core/repository/mikro-orm-base-entity.repository'; import { TimeOffPolicy } from '../time-off-policy.entity'; -export class MikroOrmTimeOffPolicyRepository extends MikroOrmBaseEntityRepository { } +export class MikroOrmTimeOffPolicyRepository extends MikroOrmBaseEntityRepository {} diff --git a/packages/core/src/time-off-policy/time-off-policy.controller.ts b/packages/core/src/time-off-policy/time-off-policy.controller.ts index 0c987b03f8c..ab941468f02 100644 --- a/packages/core/src/time-off-policy/time-off-policy.controller.ts +++ b/packages/core/src/time-off-policy/time-off-policy.controller.ts @@ -1,22 +1,12 @@ -import { - Controller, - HttpStatus, - Post, - Body, - Get, - Query, - Put, - Param, - HttpCode, - UseGuards -} from '@nestjs/common'; +import { Controller, HttpStatus, Post, Body, Get, Query, Put, Param, HttpCode, UseGuards } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; import { ITimeOffPolicyCreateInput, ITimeOffPolicyUpdateInput, ITimeOffPolicy, PermissionsEnum, - IPagination + IPagination, + ID } from '@gauzy/contracts'; import { CrudController, PaginationParams } from './../core/crud'; import { Permissions } from './../shared/decorators'; @@ -26,8 +16,9 @@ import { TimeOffPolicy } from './time-off-policy.entity'; import { TimeOffPolicyService } from './time-off-policy.service'; @ApiTags('TimeOffPolicy') -@UseGuards(TenantPermissionGuard) -@Controller() +@UseGuards(TenantPermissionGuard, PermissionGuard) +@Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.TIME_OFF_POLICY_EDIT) +@Controller('/time-off-policy') export class TimeOffPolicyController extends CrudController { constructor(private readonly timeOffPolicyService: TimeOffPolicyService) { super(timeOffPolicyService); @@ -38,7 +29,7 @@ export class TimeOffPolicyController extends CrudController { * */ @UseGuards(PermissionGuard) - @Permissions(PermissionsEnum.POLICY_VIEW) + @Permissions(PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_POLICY_VIEW) @Get('pagination') @UseValidationPipe({ transform: true }) async pagination(@Query() filter: PaginationParams): Promise> { @@ -62,7 +53,7 @@ export class TimeOffPolicyController extends CrudController { description: 'Record not found' }) @UseGuards(PermissionGuard) - @Permissions(PermissionsEnum.POLICY_VIEW) + @Permissions(PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_POLICY_VIEW) @Get() async findAll(@Query('data', ParseJsonPipe) data: any): Promise> { const { relations, findInput } = data; @@ -88,7 +79,7 @@ export class TimeOffPolicyController extends CrudController { description: 'Invalid input, The response body may contain clues as to what went wrong' }) @UseGuards(PermissionGuard) - @Permissions(PermissionsEnum.POLICY_EDIT) + @Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.TIME_OFF_POLICY_ADD) @Post() async create(@Body() entity: ITimeOffPolicyCreateInput): Promise { return await this.timeOffPolicyService.create(entity); @@ -116,10 +107,10 @@ export class TimeOffPolicyController extends CrudController { }) @HttpCode(HttpStatus.ACCEPTED) @UseGuards(PermissionGuard) - @Permissions(PermissionsEnum.POLICY_EDIT) + @Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.TIME_OFF_POLICY_EDIT) @Put(':id') async update( - @Param('id', UUIDValidationPipe) id: ITimeOffPolicy['id'], + @Param('id', UUIDValidationPipe) id: ID, @Body() entity: ITimeOffPolicyUpdateInput ): Promise { return await this.timeOffPolicyService.update(id, entity); diff --git a/packages/core/src/time-off-policy/time-off-policy.entity.ts b/packages/core/src/time-off-policy/time-off-policy.entity.ts index 38c61e0817e..b4a0f7ab11b 100644 --- a/packages/core/src/time-off-policy/time-off-policy.entity.ts +++ b/packages/core/src/time-off-policy/time-off-policy.entity.ts @@ -1,24 +1,21 @@ -import { - IEmployee, - ITimeOff as ITimeOffRequest, - ITimeOffPolicy -} from '@gauzy/contracts'; -import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; +import { IEmployee, ITimeOff as ITimeOffRequest, ITimeOffPolicy } from '@gauzy/contracts'; +import { ApiProperty } from '@nestjs/swagger'; import { IsString, IsNotEmpty, IsBoolean } from 'class-validator'; +import { Employee, TenantOrganizationBaseEntity, TimeOffRequest } from '../core/entities/internal'; import { - Employee, - TenantOrganizationBaseEntity, - TimeOffRequest -} from '../core/entities/internal'; -import { ColumnIndex, MultiORMColumn, MultiORMEntity, MultiORMManyToMany, MultiORMOneToMany } from './../core/decorators/entity'; + ColumnIndex, + MultiORMColumn, + MultiORMEntity, + MultiORMManyToMany, + MultiORMOneToMany +} from './../core/decorators/entity'; import { MikroOrmTimeOffPolicyRepository } from './repository/mikro-orm-time-off-policy.repository'; @MultiORMEntity('time_off_policy', { mikroOrmRepository: () => MikroOrmTimeOffPolicyRepository }) export class TimeOffPolicy extends TenantOrganizationBaseEntity implements ITimeOffPolicy { - @ApiProperty({ type: () => String }) - @IsString() @IsNotEmpty() + @IsString() @ColumnIndex() @MultiORMColumn() name: string; @@ -36,7 +33,6 @@ export class TimeOffPolicy extends TenantOrganizationBaseEntity implements ITime /** * TimeOffRequest */ - @ApiPropertyOptional({ type: () => TimeOffRequest, isArray: true }) @MultiORMOneToMany(() => TimeOffRequest, (it) => it.policy, { onDelete: 'SET NULL' }) @@ -47,9 +43,10 @@ export class TimeOffPolicy extends TenantOrganizationBaseEntity implements ITime | @ManyToMany |-------------------------------------------------------------------------- */ - @ApiProperty({ type: () => Employee }) @MultiORMManyToMany(() => Employee, (employee) => employee.timeOffPolicies, { + // Defines the database action to perform on update. onUpdate: 'CASCADE', + // Defines the database cascade action on delete. onDelete: 'CASCADE' }) employees?: IEmployee[]; diff --git a/packages/core/src/time-off-policy/time-off-policy.module.ts b/packages/core/src/time-off-policy/time-off-policy.module.ts index 2012e553e5a..88846301623 100644 --- a/packages/core/src/time-off-policy/time-off-policy.module.ts +++ b/packages/core/src/time-off-policy/time-off-policy.module.ts @@ -1,5 +1,4 @@ import { Module } from '@nestjs/common'; -import { RouterModule } from '@nestjs/core'; import { TypeOrmModule } from '@nestjs/typeorm'; import { MikroOrmModule } from '@mikro-orm/nestjs'; import { TimeOffPolicyService } from './time-off-policy.service'; @@ -7,21 +6,17 @@ import { TimeOffPolicy } from './time-off-policy.entity'; import { TimeOffPolicyController } from './time-off-policy.controller'; import { EmployeeModule } from './../employee/employee.module'; import { RolePermissionModule } from '../role-permission/role-permission.module'; -import { TaskModule } from '../tasks/task.module'; +import { TypeOrmTimeOffPolicyRepository } from './repository/type-orm-time-off-policy.repository'; @Module({ imports: [ - RouterModule.register([ - { path: 'time-off-policy', module: TimeOffPolicyModule } - ]), TypeOrmModule.forFeature([TimeOffPolicy]), MikroOrmModule.forFeature([TimeOffPolicy]), RolePermissionModule, - EmployeeModule, - TaskModule + EmployeeModule ], controllers: [TimeOffPolicyController], - providers: [TimeOffPolicyService], - exports: [TypeOrmModule, MikroOrmModule, TimeOffPolicyService] + providers: [TimeOffPolicyService, TypeOrmTimeOffPolicyRepository], + exports: [TypeOrmModule, MikroOrmModule, TimeOffPolicyService, TypeOrmTimeOffPolicyRepository] }) -export class TimeOffPolicyModule { } +export class TimeOffPolicyModule {} diff --git a/packages/core/src/time-off-policy/time-off-policy.service.ts b/packages/core/src/time-off-policy/time-off-policy.service.ts index cfa3e0537ba..8414fcb3e60 100644 --- a/packages/core/src/time-off-policy/time-off-policy.service.ts +++ b/packages/core/src/time-off-policy/time-off-policy.service.ts @@ -1,75 +1,91 @@ -import { Injectable, BadRequestException } from '@nestjs/common'; -import { InjectRepository } from '@nestjs/typeorm'; +import { Injectable, BadRequestException, HttpException, HttpStatus } from '@nestjs/common'; import { In } from 'typeorm'; -import { ITimeOffPolicyCreateInput, ITimeOffPolicyUpdateInput } from '@gauzy/contracts'; +import { ID, ITimeOffPolicyCreateInput, ITimeOffPolicyUpdateInput } from '@gauzy/contracts'; +import { TenantAwareCrudService } from '../core/crud'; +import { RequestContext } from '../core/context'; +import { MikroOrmEmployeeRepository, TypeOrmEmployeeRepository } from '../employee/repository'; import { TimeOffPolicy } from './time-off-policy.entity'; -import { TenantAwareCrudService } from './../core/crud'; -import { Employee } from '../employee/employee.entity'; -import { TypeOrmTimeOffPolicyRepository } from './repository/type-orm-time-off-policy.repository'; -import { MikroOrmTimeOffPolicyRepository } from './repository/mikro-orm-time-off-policy.repository'; -import { TypeOrmEmployeeRepository } from '../employee/repository/type-orm-employee.repository'; -import { MikroOrmEmployeeRepository } from '../employee/repository/mikro-orm-employee.repository'; +import { MikroOrmTimeOffPolicyRepository, TypeOrmTimeOffPolicyRepository } from './repository'; @Injectable() export class TimeOffPolicyService extends TenantAwareCrudService { constructor( - @InjectRepository(TimeOffPolicy) - typeOrmTimeOffPolicyRepository: TypeOrmTimeOffPolicyRepository, - - mikroOrmTimeOffPolicyRepository: MikroOrmTimeOffPolicyRepository, - - @InjectRepository(Employee) - private typeOrmEmployeeRepository: TypeOrmEmployeeRepository, - - mikroOrmEmployeeRepository: MikroOrmEmployeeRepository + readonly typeOrmTimeOffPolicyRepository: TypeOrmTimeOffPolicyRepository, + readonly mikroOrmTimeOffPolicyRepository: MikroOrmTimeOffPolicyRepository, + readonly typeOrmEmployeeRepository: TypeOrmEmployeeRepository, + readonly mikroOrmEmployeeRepository: MikroOrmEmployeeRepository ) { super(typeOrmTimeOffPolicyRepository, mikroOrmTimeOffPolicyRepository); } + /** + * Create Time Off Policy + * + * @param entity + * @returns + */ async create(entity: ITimeOffPolicyCreateInput): Promise { - const policy = new TimeOffPolicy(); + try { + const tenantId = RequestContext.currentTenantId() || entity.tenantId; + const organizationId = entity.organizationId; + + const policy = new TimeOffPolicy(); + policy.name = entity.name; + policy.organizationId = organizationId; + policy.tenantId = tenantId; + policy.requiresApproval = entity.requiresApproval; + policy.paid = entity.paid; - policy.name = entity.name; - policy.organizationId = entity.organizationId; - policy.tenantId = entity.tenantId; - policy.requiresApproval = entity.requiresApproval; - policy.paid = entity.paid; + // Find employees + const employees = await this.typeOrmEmployeeRepository.find({ + where: { id: In(entity.employees), tenantId, organizationId }, + relations: { user: true } + }); + policy.employees = employees; - const employees = await this.typeOrmEmployeeRepository.find({ - where: { - id: In(entity.employees) - }, - relations: { - user: true - } - }); - policy.employees = employees; - return this.typeOrmRepository.save(policy); + // Save the policy + return await this.save(policy); + } catch (error) { + throw new HttpException(`Error while creating time-off policy: ${error.message}`, HttpStatus.BAD_REQUEST); + } } - async update(id: string, entity: ITimeOffPolicyUpdateInput): Promise { + /** + * Update Time Off Policy + * + * @param id + * @param entity + * @returns + */ + async update(id: ID, entity: ITimeOffPolicyUpdateInput): Promise { try { - await this.typeOrmRepository.delete(id); - const policy = new TimeOffPolicy(); + const tenantId = RequestContext.currentTenantId() || entity.tenantId; + const organizationId = entity.organizationId; + // Delete the policy + await this.typeOrmRepository.delete({ + id, + tenantId, + organizationId + }); + + const policy = new TimeOffPolicy(); policy.name = entity.name; - policy.organizationId = entity.organizationId; - policy.tenantId = entity.tenantId; + policy.organizationId = organizationId; + policy.tenantId = tenantId; policy.requiresApproval = entity.requiresApproval; policy.paid = entity.paid; const employees = await this.typeOrmEmployeeRepository.find({ - where: { - id: In(entity.employees) - }, - relations: { - user: true - } + where: { id: In(entity.employees) }, + relations: { user: true } }); policy.employees = employees; - return this.typeOrmRepository.save(policy); - } catch (err /*: WriteError*/) { - throw new BadRequestException(err); + + // Save the policy + return await this.save(policy); + } catch (error) { + throw new HttpException(`Error while updating time-off policy: ${error.message}`, HttpStatus.BAD_REQUEST); } } } diff --git a/packages/core/src/time-off-request/time-off-request.controller.ts b/packages/core/src/time-off-request/time-off-request.controller.ts index c5cb6a0bea5..4e4f0c026f8 100644 --- a/packages/core/src/time-off-request/time-off-request.controller.ts +++ b/packages/core/src/time-off-request/time-off-request.controller.ts @@ -1,17 +1,4 @@ -import { - Controller, - UseGuards, - HttpStatus, - Post, - Body, - Get, - Query, - Put, - Param, - HttpCode, - ValidationPipe, - UsePipes -} from '@nestjs/common'; +import { Controller, UseGuards, HttpStatus, Post, Body, Get, Query, Put, Param, HttpCode } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; import { CommandBus } from '@nestjs/cqrs'; import { @@ -21,7 +8,8 @@ import { ITimeOffUpdateInput, PermissionsEnum, RolesEnum, - StatusTypesEnum + StatusTypesEnum, + ID } from '@gauzy/contracts'; import { CrudController, PaginationParams } from './../core/crud'; import { TimeOffRequest } from './time-off-request.entity'; @@ -32,7 +20,8 @@ import { Permissions, Roles } from './../shared/decorators'; import { ParseJsonPipe, UUIDValidationPipe, UseValidationPipe } from './../shared/pipes'; @ApiTags('TimeOffRequest') -@UseGuards(TenantPermissionGuard) +@UseGuards(TenantPermissionGuard, PermissionGuard) +@Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.TIME_OFF_EDIT) @Controller() export class TimeOffRequestController extends CrudController { constructor( @@ -42,8 +31,7 @@ export class TimeOffRequestController extends CrudController { super(timeOffRequestService); } - @UseGuards(PermissionGuard) - @Permissions(PermissionsEnum.ORG_TIME_OFF_VIEW) + @Permissions(PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_VIEW) @Get('pagination') @UseValidationPipe({ transform: true }) async pagination(@Query() options: PaginationParams): Promise> { @@ -67,11 +55,11 @@ export class TimeOffRequestController extends CrudController { description: 'Record not found' }) @HttpCode(HttpStatus.ACCEPTED) - @UseGuards(RoleGuard, PermissionGuard) + @UseGuards(RoleGuard) @Roles(RolesEnum.SUPER_ADMIN, RolesEnum.ADMIN) - @Permissions(PermissionsEnum.TIME_OFF_EDIT) + @Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.TIME_OFF_EDIT) @Put('approval/:id') - async timeOffRequestApproved(@Param('id', UUIDValidationPipe) id: string): Promise { + async timeOffRequestApproved(@Param('id', UUIDValidationPipe) id: ID): Promise { return this.commandBus.execute(new TimeOffStatusCommand(id, StatusTypesEnum.APPROVED)); } @@ -92,11 +80,11 @@ export class TimeOffRequestController extends CrudController { description: 'Record not found' }) @HttpCode(HttpStatus.ACCEPTED) - @UseGuards(RoleGuard, PermissionGuard) + @UseGuards(RoleGuard) @Roles(RolesEnum.SUPER_ADMIN, RolesEnum.ADMIN) - @Permissions(PermissionsEnum.TIME_OFF_EDIT) + @Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.TIME_OFF_EDIT) @Put('denied/:id') - async timeOffRequestDenied(@Param('id', UUIDValidationPipe) id: string): Promise { + async timeOffRequestDenied(@Param('id', UUIDValidationPipe) id: ID): Promise { return this.commandBus.execute(new TimeOffStatusCommand(id, StatusTypesEnum.DENIED)); } @@ -116,12 +104,11 @@ export class TimeOffRequestController extends CrudController { status: HttpStatus.NOT_FOUND, description: 'Record not found' }) - @UseGuards(PermissionGuard) - @Permissions(PermissionsEnum.ORG_TIME_OFF_VIEW) + @Permissions(PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_VIEW) @Get() async findAll(@Query('data', ParseJsonPipe) data: any): Promise> { const { relations, findInput } = data; - return this.timeOffRequestService.getAllTimeOffRequests(relations, findInput); + return await this.timeOffRequestService.getAllTimeOffRequests(relations, findInput); } /** @@ -138,10 +125,10 @@ export class TimeOffRequestController extends CrudController { }) @HttpCode(HttpStatus.ACCEPTED) @UseGuards(PermissionGuard) - @Permissions(PermissionsEnum.TIME_OFF_EDIT) + @Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.TIME_OFF_ADD) @Post() async create(@Body() entity: ITimeOffCreateInput): Promise { - return this.timeOffRequestService.create(entity); + return await this.timeOffRequestService.create(entity); } /** @@ -162,13 +149,12 @@ export class TimeOffRequestController extends CrudController { description: 'Record not found' }) @HttpCode(HttpStatus.ACCEPTED) - @UseGuards(PermissionGuard) - @Permissions(PermissionsEnum.TIME_OFF_EDIT) + @Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.TIME_OFF_DELETE) @Put(':id') async update( - @Param('id', UUIDValidationPipe) id: string, + @Param('id', UUIDValidationPipe) id: ID, @Body() entity: ITimeOffUpdateInput ): Promise { - return this.timeOffRequestService.updateTimeOffByAdmin(id, entity); + return await this.timeOffRequestService.updateTimeOffByAdmin(id, entity); } } diff --git a/packages/ui-core/core/src/lib/components/base-nav-menu/base-nav-menu.component.ts b/packages/ui-core/core/src/lib/components/base-nav-menu/base-nav-menu.component.ts index 17877065341..3e05dc0679a 100644 --- a/packages/ui-core/core/src/lib/components/base-nav-menu/base-nav-menu.component.ts +++ b/packages/ui-core/core/src/lib/components/base-nav-menu/base-nav-menu.component.ts @@ -27,7 +27,7 @@ export class BaseNavMenuComponent extends TranslationBaseComponent implements On } ngAfterViewInit() { - merge( + const merge$ = merge( this._translateService.onLangChange.pipe(tap(() => this.defineBaseNavMenus())), this._store.selectedOrganization$.pipe( filter((organization: IOrganization) => !!organization), @@ -37,9 +37,8 @@ export class BaseNavMenuComponent extends TranslationBaseComponent implements On this._store.featureOrganizations$.pipe(tap(() => this.defineBaseNavMenus())), this._store.featureTenant$.pipe(tap(() => this.defineBaseNavMenus())), this._store.userRolePermissions$.pipe(tap(() => this.defineBaseNavMenus())) - ) - .pipe(untilDestroyed(this)) - .subscribe(); + ); + merge$.pipe(untilDestroyed(this)).subscribe(); } /** @@ -525,11 +524,11 @@ export class BaseNavMenuComponent extends TranslationBaseComponent implements On link: '/pages/employees/time-off', data: { translationKey: 'MENU.TIME_OFF', - permissionKeys: [PermissionsEnum.ORG_TIME_OFF_VIEW], + permissionKeys: [PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_VIEW], featureKey: FeatureEnum.FEATURE_EMPLOYEE_TIMEOFF, ...(this._store.hasAnyPermission( - PermissionsEnum.ALL_ORG_EDIT, - PermissionsEnum.ORG_TIME_OFF_VIEW + PermissionsEnum.ALL_ORG_VIEW, + PermissionsEnum.TIME_OFF_VIEW ) && { add: '/pages/employees/time-off?openAddDialog=true' }) From b664d0d62108a14107a9411a653cbc7cb105880f Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Mon, 2 Sep 2024 17:18:08 +0530 Subject: [PATCH 07/13] fix: equipment sharing policy crud permission definition --- ...equipment-sharing-policy.routing.module.ts | 2 +- .../equipment-sharing.component.html | 99 ++++++++++--------- .../equipment-sharing-policy.controller.ts | 72 +++++++------- .../equipment-sharing-policy.entity.ts | 16 ++- .../equipment-sharing-policy.module.ts | 16 +-- .../equipment-sharing-policy.service.ts | 42 +------- .../repository/index.ts | 2 + 7 files changed, 101 insertions(+), 148 deletions(-) create mode 100644 packages/core/src/equipment-sharing-policy/repository/index.ts diff --git a/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.routing.module.ts b/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.routing.module.ts index c56703a7767..58098afa6c6 100644 --- a/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.routing.module.ts +++ b/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.routing.module.ts @@ -11,7 +11,7 @@ const routes: Routes = [ canActivate: [PermissionsGuard], data: { permissions: { - only: [PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.POLICY_VIEW], + only: [PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.EQUIPMENT_SHARING_POLICY_VIEW], redirectTo: '/pages/dashboard' } } diff --git a/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.html b/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.html index 159096cfe36..b9d74a6dac6 100644 --- a/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.html +++ b/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.html @@ -1,8 +1,4 @@ - +
@@ -13,11 +9,12 @@

- +
- - -
- -
-
- - + + + +
+ - -
-
- - + (userRowSelect)="selectEquipmentSharing($event)" + > +
+
+ + + +
+
+ + + + + + + + +

{{ 'SETTINGS_MENU.NO_LAYOUT' | translate }}

+
+ + - - - + + +
- + @@ -110,31 +110,34 @@

(click)="refuse(selectedEquipmentSharing)" size="small" class="action" + type="button" > {{ 'EQUIPMENT_SHARING_PAGE.REFUSE' | translate }} - + diff --git a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.controller.ts b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.controller.ts index 4c91b6fb589..2e4f5c2a00a 100644 --- a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.controller.ts +++ b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.controller.ts @@ -1,29 +1,20 @@ import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; -import { - Controller, - HttpStatus, - Get, - HttpCode, - UseGuards, - Put, - Param, - Body, - Query, - Post -} from '@nestjs/common'; -import { IEquipmentSharingPolicy, IPagination, PermissionsEnum } from '@gauzy/contracts'; +import { Controller, HttpStatus, Get, UseGuards, Put, Param, Body, Query, Post } from '@nestjs/common'; +import { UpdateResult } from 'typeorm'; +import { ID, IEquipmentSharingPolicy, IPagination, PermissionsEnum } from '@gauzy/contracts'; import { CrudController, PaginationParams } from './../core/crud'; -import { EquipmentSharingPolicy } from './equipment-sharing-policy.entity'; -import { EquipmentSharingPolicyService } from './equipment-sharing-policy.service'; import { PermissionGuard, TenantPermissionGuard } from './../shared/guards'; import { ParseJsonPipe, UUIDValidationPipe, UseValidationPipe } from './../shared/pipes'; import { Permissions } from './../shared/decorators'; +import { EquipmentSharingPolicy } from './equipment-sharing-policy.entity'; +import { EquipmentSharingPolicyService } from './equipment-sharing-policy.service'; @ApiTags('EquipmentSharingPolicy') -@UseGuards(TenantPermissionGuard) -@Controller() +@UseGuards(TenantPermissionGuard, PermissionGuard) +@Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.EQUIPMENT_SHARING_POLICY_EDIT) +@Controller('/equipment-sharing-policy') export class EquipmentSharingPolicyController extends CrudController { - constructor(private readonly equipmentSharingPolicyService: EquipmentSharingPolicyService) { + constructor(readonly equipmentSharingPolicyService: EquipmentSharingPolicyService) { super(equipmentSharingPolicyService); } @@ -33,9 +24,8 @@ export class EquipmentSharingPolicyController extends CrudController @@ -53,8 +43,8 @@ export class EquipmentSharingPolicyController extends CrudController> { const { findInput, relations } = data; return this.equipmentSharingPolicyService.findAll({ @@ -63,6 +53,11 @@ export class EquipmentSharingPolicyController extends CrudController { - return this.equipmentSharingPolicyService.create(entity); + @Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.EQUIPMENT_SHARING_POLICY_ADD) + @Post('/') + async create(@Body() entity: EquipmentSharingPolicy): Promise { + return await this.equipmentSharingPolicyService.create(entity); } + /** + * + * @param id + * @param entity + * @returns + */ @ApiOperation({ summary: 'Update record' }) @ApiResponse({ status: HttpStatus.CREATED, description: 'The record has been successfully edited.' }) - @ApiResponse({ - status: HttpStatus.NOT_FOUND, - description: 'Record not found' - }) @ApiResponse({ status: HttpStatus.BAD_REQUEST, description: 'Invalid input, The response body may contain clues as to what went wrong' }) - @HttpCode(HttpStatus.ACCEPTED) - @UseGuards(PermissionGuard) - @Put(':id') + @Permissions(PermissionsEnum.ALL_ORG_EDIT, PermissionsEnum.EQUIPMENT_SHARING_POLICY_EDIT) + @Put('/:id') async update( - @Param('id', UUIDValidationPipe) id: string, - @Body() entity: IEquipmentSharingPolicy - ): Promise { - return this.equipmentSharingPolicyService.update(id, entity); + @Param('id', UUIDValidationPipe) id: ID, + @Body() entity: EquipmentSharingPolicy + ): Promise { + return await this.equipmentSharingPolicyService.update(id, entity); } } diff --git a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.entity.ts b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.entity.ts index a64f60ea2b3..4497d398162 100644 --- a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.entity.ts +++ b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.entity.ts @@ -4,23 +4,23 @@ * Approval Policy table has the many to one relationship to the Organization table and Tenant by organizationId and tenantId */ import { IEquipmentSharing, IEquipmentSharingPolicy } from '@gauzy/contracts'; -import { ApiProperty } from '@nestjs/swagger'; -import { IsString, IsNotEmpty } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; +import { IsString, IsNotEmpty, IsOptional } from 'class-validator'; import { EquipmentSharing, TenantOrganizationBaseEntity } from '../core/entities/internal'; import { ColumnIndex, MultiORMColumn, MultiORMEntity, MultiORMOneToMany } from './../core/decorators/entity'; import { MikroOrmEquipmentSharingPolicyRepository } from './repository/mikro-orm-equipment-sharing-policy.repository'; @MultiORMEntity('equipment_sharing_policy', { mikroOrmRepository: () => MikroOrmEquipmentSharingPolicyRepository }) export class EquipmentSharingPolicy extends TenantOrganizationBaseEntity implements IEquipmentSharingPolicy { - @ApiProperty({ type: () => String }) - @IsString() @IsNotEmpty() + @IsString() @ColumnIndex() @MultiORMColumn() name: string; - @ApiProperty({ type: () => String }) + @ApiPropertyOptional({ type: () => String }) + @IsOptional() @IsString() @MultiORMColumn({ nullable: true }) description: string; @@ -30,11 +30,9 @@ export class EquipmentSharingPolicy extends TenantOrganizationBaseEntity impleme | @OneToMany |-------------------------------------------------------------------------- */ - /** - * EquipmentSharing - */ - @ApiProperty({ type: () => EquipmentSharing, isArray: true }) + * EquipmentSharing + */ @MultiORMOneToMany(() => EquipmentSharing, (it) => it.equipmentSharingPolicy, { onDelete: 'CASCADE' }) diff --git a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.module.ts b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.module.ts index 28431bd22e6..54c344c0eb9 100644 --- a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.module.ts +++ b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.module.ts @@ -1,26 +1,20 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { RouterModule } from '@nestjs/core'; import { MikroOrmModule } from '@mikro-orm/nestjs'; +import { RolePermissionModule } from '../role-permission/role-permission.module'; +import { TypeOrmEquipmentSharingPolicyRepository } from './repository'; import { EquipmentSharingPolicyController } from './equipment-sharing-policy.controller'; import { EquipmentSharingPolicyService } from './equipment-sharing-policy.service'; import { EquipmentSharingPolicy } from './equipment-sharing-policy.entity'; -import { RolePermissionModule } from '../role-permission/role-permission.module'; @Module({ imports: [ - RouterModule.register([ - { - path: '/equipment-sharing-policy', - module: EquipmentSharingPolicyModule - } - ]), TypeOrmModule.forFeature([EquipmentSharingPolicy]), MikroOrmModule.forFeature([EquipmentSharingPolicy]), RolePermissionModule ], controllers: [EquipmentSharingPolicyController], - providers: [EquipmentSharingPolicyService], - exports: [TypeOrmModule, MikroOrmModule, EquipmentSharingPolicyService] + providers: [EquipmentSharingPolicyService, TypeOrmEquipmentSharingPolicyRepository], + exports: [TypeOrmModule, MikroOrmModule, EquipmentSharingPolicyService, TypeOrmEquipmentSharingPolicyRepository] }) -export class EquipmentSharingPolicyModule { } +export class EquipmentSharingPolicyModule {} diff --git a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.service.ts b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.service.ts index 4072f80dc7d..2d8c5108211 100644 --- a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.service.ts +++ b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.service.ts @@ -1,7 +1,5 @@ import { TenantAwareCrudService } from './../core/crud'; -import { BadRequestException, Injectable } from '@nestjs/common'; -import { InjectRepository } from '@nestjs/typeorm'; -import { IEquipmentSharingPolicy } from '@gauzy/contracts'; +import { Injectable } from '@nestjs/common'; import { EquipmentSharingPolicy } from './equipment-sharing-policy.entity'; import { TypeOrmEquipmentSharingPolicyRepository } from './repository/type-orm-equipment-sharing-policy.repository'; import { MikroOrmEquipmentSharingPolicyRepository } from './repository/mikro-orm-equipment-sharing-policy.repository'; @@ -9,47 +7,9 @@ import { MikroOrmEquipmentSharingPolicyRepository } from './repository/mikro-orm @Injectable() export class EquipmentSharingPolicyService extends TenantAwareCrudService { constructor( - @InjectRepository(EquipmentSharingPolicy) typeOrmEquipmentSharingPolicyRepository: TypeOrmEquipmentSharingPolicyRepository, - mikroOrmEquipmentSharingPolicyRepository: MikroOrmEquipmentSharingPolicyRepository ) { super(typeOrmEquipmentSharingPolicyRepository, mikroOrmEquipmentSharingPolicyRepository); } - - /** - * - * @param entity - * @returns - */ - async create(entity: IEquipmentSharingPolicy): Promise { - try { - const policy = new EquipmentSharingPolicy(); - policy.name = entity.name; - policy.organizationId = entity.organizationId; - policy.tenantId = entity.tenantId; - policy.description = entity.description; - return this.typeOrmRepository.save(policy); - } catch (error) { - throw new BadRequestException(error); - } - } - - /** - * - * @param id - * @param entity - * @returns - */ - async update(id: string, entity: IEquipmentSharingPolicy): Promise { - try { - const policy = await this.typeOrmRepository.findOneBy({ id }); - policy.name = entity.name; - policy.organizationId = entity.organizationId; - policy.description = entity.description; - return this.typeOrmRepository.save(policy); - } catch (err /*: WriteError*/) { - throw new BadRequestException(err); - } - } } diff --git a/packages/core/src/equipment-sharing-policy/repository/index.ts b/packages/core/src/equipment-sharing-policy/repository/index.ts new file mode 100644 index 00000000000..93c68f6cc8b --- /dev/null +++ b/packages/core/src/equipment-sharing-policy/repository/index.ts @@ -0,0 +1,2 @@ +export * from './mikro-orm-equipment-sharing-policy.repository'; +export * from './type-orm-equipment-sharing-policy.repository'; From 065a97bdd638b0bf535b94238315a4b22bfe7312 Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Mon, 2 Sep 2024 18:35:02 +0530 Subject: [PATCH 08/13] fix: added new translation for equipment sharing policy permissions --- .../lib/components/base-nav-menu/base-nav-menu.component.ts | 4 ++-- packages/ui-core/i18n/assets/i18n/ar.json | 4 ++++ packages/ui-core/i18n/assets/i18n/bg.json | 4 ++++ packages/ui-core/i18n/assets/i18n/de.json | 4 ++++ packages/ui-core/i18n/assets/i18n/en.json | 4 ++++ packages/ui-core/i18n/assets/i18n/es.json | 4 ++++ packages/ui-core/i18n/assets/i18n/fr.json | 4 ++++ packages/ui-core/i18n/assets/i18n/he.json | 4 ++++ packages/ui-core/i18n/assets/i18n/it.json | 4 ++++ packages/ui-core/i18n/assets/i18n/nl.json | 4 ++++ packages/ui-core/i18n/assets/i18n/pl.json | 4 ++++ packages/ui-core/i18n/assets/i18n/pt.json | 4 ++++ packages/ui-core/i18n/assets/i18n/ru.json | 4 ++++ packages/ui-core/i18n/assets/i18n/zh.json | 4 ++++ 14 files changed, 54 insertions(+), 2 deletions(-) diff --git a/packages/ui-core/core/src/lib/components/base-nav-menu/base-nav-menu.component.ts b/packages/ui-core/core/src/lib/components/base-nav-menu/base-nav-menu.component.ts index 3e05dc0679a..2c34b3ad464 100644 --- a/packages/ui-core/core/src/lib/components/base-nav-menu/base-nav-menu.component.ts +++ b/packages/ui-core/core/src/lib/components/base-nav-menu/base-nav-menu.component.ts @@ -527,8 +527,8 @@ export class BaseNavMenuComponent extends TranslationBaseComponent implements On permissionKeys: [PermissionsEnum.ALL_ORG_VIEW, PermissionsEnum.TIME_OFF_VIEW], featureKey: FeatureEnum.FEATURE_EMPLOYEE_TIMEOFF, ...(this._store.hasAnyPermission( - PermissionsEnum.ALL_ORG_VIEW, - PermissionsEnum.TIME_OFF_VIEW + PermissionsEnum.ALL_ORG_EDIT, + PermissionsEnum.TIME_OFF_ADD ) && { add: '/pages/employees/time-off?openAddDialog=true' }) diff --git a/packages/ui-core/i18n/assets/i18n/ar.json b/packages/ui-core/i18n/assets/i18n/ar.json index 7345f8c60a7..dd52a8cbf55 100644 --- a/packages/ui-core/i18n/assets/i18n/ar.json +++ b/packages/ui-core/i18n/assets/i18n/ar.json @@ -2059,6 +2059,10 @@ "MEDIA_GALLERY_VIEW": "عرض معرض الوسائط", "MEDIA_GALLERY_EDIT": "تعديل معرض الوسائط", "MEDIA_GALLERY_DELETE": "حذف معرض الوسائط", + "EQUIPMENT_SHARING_POLICY_ADD": "إضافة سياسة مشاركة المعدات", + "EQUIPMENT_SHARING_POLICY_VIEW": "عرض سياسة مشاركة المعدات", + "EQUIPMENT_SHARING_POLICY_EDIT": "تعديل سياسة مشاركة المعدات", + "EQUIPMENT_SHARING_POLICY_DELETE": "حذف سياسة مشاركة المعدات", "ORG_EQUIPMENT_VIEW": "عرض معدات المنظمة", "ORG_EQUIPMENT_EDIT": "تعديل معدات المنظمة", "ORG_EQUIPMENT_SHARING_VIEW": "عرض مشاركة معدات المنظمة", diff --git a/packages/ui-core/i18n/assets/i18n/bg.json b/packages/ui-core/i18n/assets/i18n/bg.json index bd827cf6f4b..eac15abd7e3 100644 --- a/packages/ui-core/i18n/assets/i18n/bg.json +++ b/packages/ui-core/i18n/assets/i18n/bg.json @@ -2094,6 +2094,10 @@ "ORG_INVENTORY_VIEW": "View Organization Inventory", "INVENTORY_GALLERY_VIEW": "View Inventory Gallery", "INVENTORY_GALLERY_EDIT": "Edit Inventory Gallery", + "EQUIPMENT_SHARING_POLICY_ADD": "Добавяне на политика за споделяне на оборудване", + "EQUIPMENT_SHARING_POLICY_VIEW": "Преглед на политика за споделяне на оборудване", + "EQUIPMENT_SHARING_POLICY_EDIT": "Редактиране на политика за споделяне на оборудване", + "EQUIPMENT_SHARING_POLICY_DELETE": "Изтриване на политика за споделяне на оборудване", "ORG_EQUIPMENT_VIEW": "View Organization Equipment", "ORG_EQUIPMENT_EDIT": "Edit Organization Equipment", "ORG_EQUIPMENT_SHARING_VIEW": "View Organization Equipment Sharing", diff --git a/packages/ui-core/i18n/assets/i18n/de.json b/packages/ui-core/i18n/assets/i18n/de.json index 51cad471946..ebeec7578a6 100644 --- a/packages/ui-core/i18n/assets/i18n/de.json +++ b/packages/ui-core/i18n/assets/i18n/de.json @@ -2057,6 +2057,10 @@ "MEDIA_GALLERY_VIEW": "Mediengalerie anzeigen", "MEDIA_GALLERY_EDIT": "Mediengalerie bearbeiten", "MEDIA_GALLERY_DELETE": "Löschen Sie die Medienbibliothek.", + "EQUIPMENT_SHARING_POLICY_ADD": "Ausrüstungsverleihrichtlinie hinzufügen", + "EQUIPMENT_SHARING_POLICY_VIEW": "Ausrüstungsverleihrichtlinie anzeigen", + "EQUIPMENT_SHARING_POLICY_EDIT": "Ausrüstungsverleihrichtlinie bearbeiten", + "EQUIPMENT_SHARING_POLICY_DELETE": "Ausrüstungsverleihrichtlinie löschen", "ORG_EQUIPMENT_VIEW": "Organisationsausrüstung anzeigen", "ORG_EQUIPMENT_EDIT": "Ausrüstung der Organisation bearbeiten", "ORG_EQUIPMENT_SHARING_VIEW": "Organisations-Ausrüstungsaustausch anzeigen", diff --git a/packages/ui-core/i18n/assets/i18n/en.json b/packages/ui-core/i18n/assets/i18n/en.json index 9e712c8d96f..3ba0290c423 100644 --- a/packages/ui-core/i18n/assets/i18n/en.json +++ b/packages/ui-core/i18n/assets/i18n/en.json @@ -2170,6 +2170,10 @@ "MEDIA_GALLERY_VIEW": "View media gallery", "MEDIA_GALLERY_EDIT": "Edit media gallery", "MEDIA_GALLERY_DELETE": "Delete media gallery", + "EQUIPMENT_SHARING_POLICY_ADD": "Add Equipment Sharing Policy", + "EQUIPMENT_SHARING_POLICY_VIEW": "View Equipment Sharing Policy", + "EQUIPMENT_SHARING_POLICY_EDIT": "Edit Equipment Sharing Policy", + "EQUIPMENT_SHARING_POLICY_DELETE": "Delete Equipment Sharing Policy", "ORG_EQUIPMENT_VIEW": "View Organization Equipment", "ORG_EQUIPMENT_EDIT": "Edit Organization Equipment", "ORG_EQUIPMENT_SHARING_VIEW": "View Organization Equipment Sharing", diff --git a/packages/ui-core/i18n/assets/i18n/es.json b/packages/ui-core/i18n/assets/i18n/es.json index 4d44a151b80..d7941f96cf8 100644 --- a/packages/ui-core/i18n/assets/i18n/es.json +++ b/packages/ui-core/i18n/assets/i18n/es.json @@ -2063,6 +2063,10 @@ "MEDIA_GALLERY_VIEW": "Ver galería de medios", "MEDIA_GALLERY_EDIT": "Editar galería multimedia", "MEDIA_GALLERY_DELETE": "Borrar la galería multimedia", + "EQUIPMENT_SHARING_POLICY_ADD": "Agregar política de compartición de equipo", + "EQUIPMENT_SHARING_POLICY_VIEW": "Ver política de compartición de equipo", + "EQUIPMENT_SHARING_POLICY_EDIT": "Editar política de compartición de equipo", + "EQUIPMENT_SHARING_POLICY_DELETE": "Eliminar política de compartición de equipo", "ORG_EQUIPMENT_VIEW": "Ver equipamiento de la organización.", "ORG_EQUIPMENT_EDIT": "Editar Equipamiento de la Organización", "ORG_EQUIPMENT_SHARING_VIEW": "Ver Organización de Compartir Equipos.", diff --git a/packages/ui-core/i18n/assets/i18n/fr.json b/packages/ui-core/i18n/assets/i18n/fr.json index 69919648f6a..36cd893fb05 100644 --- a/packages/ui-core/i18n/assets/i18n/fr.json +++ b/packages/ui-core/i18n/assets/i18n/fr.json @@ -2062,6 +2062,10 @@ "MEDIA_GALLERY_VIEW": "Voir la galerie multimédia", "MEDIA_GALLERY_EDIT": "Modifier la galerie multimédia", "MEDIA_GALLERY_DELETE": "Supprimer la galerie multimédia", + "EQUIPMENT_SHARING_POLICY_ADD": "Ajouter une politique de partage d'équipement", + "EQUIPMENT_SHARING_POLICY_VIEW": "Voir la politique de partage d'équipement", + "EQUIPMENT_SHARING_POLICY_EDIT": "Modifier la politique de partage d'équipement", + "EQUIPMENT_SHARING_POLICY_DELETE": "Supprimer la politique de partage d'équipement", "ORG_EQUIPMENT_VIEW": "Voir l'équipement de l'organisation", "ORG_EQUIPMENT_EDIT": "Modifier l'équipement de l'organisation", "ORG_EQUIPMENT_SHARING_VIEW": "Voir partage d'équipement organisationnel.", diff --git a/packages/ui-core/i18n/assets/i18n/he.json b/packages/ui-core/i18n/assets/i18n/he.json index 065023454e2..b0a382f2c07 100644 --- a/packages/ui-core/i18n/assets/i18n/he.json +++ b/packages/ui-core/i18n/assets/i18n/he.json @@ -2087,6 +2087,10 @@ "ORG_INVENTORY_VIEW": "View Organization Inventory", "INVENTORY_GALLERY_VIEW": "View Inventory Gallery", "INVENTORY_GALLERY_EDIT": "Edit Inventory Gallery", + "EQUIPMENT_SHARING_POLICY_ADD": "הוסף מדיניות שיתוף ציוד", + "EQUIPMENT_SHARING_POLICY_VIEW": "צפה במדיניות שיתוף ציוד", + "EQUIPMENT_SHARING_POLICY_EDIT": "ערוך מדיניות שיתוף ציוד", + "EQUIPMENT_SHARING_POLICY_DELETE": "מחק מדיניות שיתוף ציוד", "ORG_EQUIPMENT_VIEW": "View Organization Equipment", "ORG_EQUIPMENT_EDIT": "Edit Organization Equipment", "ORG_EQUIPMENT_SHARING_VIEW": "View Organization Equipment Sharing", diff --git a/packages/ui-core/i18n/assets/i18n/it.json b/packages/ui-core/i18n/assets/i18n/it.json index 103b712b665..bda8950374c 100644 --- a/packages/ui-core/i18n/assets/i18n/it.json +++ b/packages/ui-core/i18n/assets/i18n/it.json @@ -2061,6 +2061,10 @@ "MEDIA_GALLERY_VIEW": "Visualizza la galleria multimediale", "MEDIA_GALLERY_EDIT": "Modifica galleria media", "MEDIA_GALLERY_DELETE": "Elimina galleria di media", + "EQUIPMENT_SHARING_POLICY_ADD": "Aggiungi politica di condivisione dell'attrezzatura", + "EQUIPMENT_SHARING_POLICY_VIEW": "Visualizza politica di condivisione dell'attrezzatura", + "EQUIPMENT_SHARING_POLICY_EDIT": "Modifica politica di condivisione dell'attrezzatura", + "EQUIPMENT_SHARING_POLICY_DELETE": "Elimina politica di condivisione dell'attrezzatura", "ORG_EQUIPMENT_VIEW": "Visualizza Attrezzature dell'Organizzazione", "ORG_EQUIPMENT_EDIT": "Modifica Attributi Organizzazione", "ORG_EQUIPMENT_SHARING_VIEW": "Visualizza la condivisione di attrezzature dell'organizzazione", diff --git a/packages/ui-core/i18n/assets/i18n/nl.json b/packages/ui-core/i18n/assets/i18n/nl.json index b79c9f060dc..3e51d456873 100644 --- a/packages/ui-core/i18n/assets/i18n/nl.json +++ b/packages/ui-core/i18n/assets/i18n/nl.json @@ -2061,6 +2061,10 @@ "MEDIA_GALLERY_VIEW": "Bekijk mediagalerij", "MEDIA_GALLERY_EDIT": "Bewerk mediagalerij", "MEDIA_GALLERY_DELETE": "Verwijder mediagalerij", + "EQUIPMENT_SHARING_POLICY_ADD": "Apparatuurdeelbeleid toevoegen", + "EQUIPMENT_SHARING_POLICY_VIEW": "Apparatuurdeelbeleid bekijken", + "EQUIPMENT_SHARING_POLICY_EDIT": "Apparatuurdeelbeleid bewerken", + "EQUIPMENT_SHARING_POLICY_DELETE": "Apparatuurdeelbeleid verwijderen", "ORG_EQUIPMENT_VIEW": "Bekijk organisatieapparatuur", "ORG_EQUIPMENT_EDIT": "Bewerk Organisatie Apparatuur", "ORG_EQUIPMENT_SHARING_VIEW": "Bekijk het delen van organisatie-uitrusting.", diff --git a/packages/ui-core/i18n/assets/i18n/pl.json b/packages/ui-core/i18n/assets/i18n/pl.json index ab8c7b64743..b9c5c90acc0 100644 --- a/packages/ui-core/i18n/assets/i18n/pl.json +++ b/packages/ui-core/i18n/assets/i18n/pl.json @@ -2061,6 +2061,10 @@ "MEDIA_GALLERY_VIEW": "Zobacz galerię mediów", "MEDIA_GALLERY_EDIT": "Edytuj galerię mediów", "MEDIA_GALLERY_DELETE": "Usuń galerię mediów", + "EQUIPMENT_SHARING_POLICY_ADD": "Dodaj politykę udostępniania sprzętu", + "EQUIPMENT_SHARING_POLICY_VIEW": "Wyświetl politykę udostępniania sprzętu", + "EQUIPMENT_SHARING_POLICY_EDIT": "Edytuj politykę udostępniania sprzętu", + "EQUIPMENT_SHARING_POLICY_DELETE": "Usuń politykę udostępniania sprzętu", "ORG_EQUIPMENT_VIEW": "Wyświetl sprzęt organizacji", "ORG_EQUIPMENT_EDIT": "Edytuj wyposażenie organizacji", "ORG_EQUIPMENT_SHARING_VIEW": "Wyświetl udostępnianie sprzętu organizacji", diff --git a/packages/ui-core/i18n/assets/i18n/pt.json b/packages/ui-core/i18n/assets/i18n/pt.json index 26e4c2bdbcc..52562088fb1 100644 --- a/packages/ui-core/i18n/assets/i18n/pt.json +++ b/packages/ui-core/i18n/assets/i18n/pt.json @@ -2061,6 +2061,10 @@ "MEDIA_GALLERY_VIEW": "Ver galeria de mídia.", "MEDIA_GALLERY_EDIT": "Editar galeria de mídia", "MEDIA_GALLERY_DELETE": "Excluir galeria de mídia", + "EQUIPMENT_SHARING_POLICY_ADD": "Adicionar Política de Compartilhamento de Equipamentos", + "EQUIPMENT_SHARING_POLICY_VIEW": "Visualizar Política de Compartilhamento de Equipamentos", + "EQUIPMENT_SHARING_POLICY_EDIT": "Editar Política de Compartilhamento de Equipamentos", + "EQUIPMENT_SHARING_POLICY_DELETE": "Excluir Política de Compartilhamento de Equipamentos", "ORG_EQUIPMENT_VIEW": "Visualizar Equipamentos da Organização", "ORG_EQUIPMENT_EDIT": "Editar Equipamento da Organização", "ORG_EQUIPMENT_SHARING_VIEW": "Visualizar Compartilhamento de Equipamentos da Organização", diff --git a/packages/ui-core/i18n/assets/i18n/ru.json b/packages/ui-core/i18n/assets/i18n/ru.json index 00131a760c4..b23e4cfb5b6 100644 --- a/packages/ui-core/i18n/assets/i18n/ru.json +++ b/packages/ui-core/i18n/assets/i18n/ru.json @@ -2093,6 +2093,10 @@ "ORG_INVENTORY_VIEW": "Просмотр инвентаризации организации", "INVENTORY_GALLERY_VIEW": "Просмотреть галерею инвентаря", "INVENTORY_GALLERY_EDIT": "Изменить галерею инвентаря", + "EQUIPMENT_SHARING_POLICY_ADD": "Добавить политику совместного использования оборудования", + "EQUIPMENT_SHARING_POLICY_VIEW": "Просмотр политики совместного использования оборудования", + "EQUIPMENT_SHARING_POLICY_EDIT": "Редактировать политику совместного использования оборудования", + "EQUIPMENT_SHARING_POLICY_DELETE": "Удалить политику совместного использования оборудования", "ORG_EQUIPMENT_VIEW": "Просмотреть снаряжение организации", "ORG_EQUIPMENT_EDIT": "Изменить снаряжение организации", "ORG_EQUIPMENT_SHARING_VIEW": "Просмотр обмена снаряжением организации", diff --git a/packages/ui-core/i18n/assets/i18n/zh.json b/packages/ui-core/i18n/assets/i18n/zh.json index abab41a0ac5..9d2046b29f0 100644 --- a/packages/ui-core/i18n/assets/i18n/zh.json +++ b/packages/ui-core/i18n/assets/i18n/zh.json @@ -2061,6 +2061,10 @@ "MEDIA_GALLERY_VIEW": "查看媒体画廊", "MEDIA_GALLERY_EDIT": "编辑媒体库", "MEDIA_GALLERY_DELETE": "删除媒体库", + "EQUIPMENT_SHARING_POLICY_ADD": "添加设备共享政策", + "EQUIPMENT_SHARING_POLICY_VIEW": "查看设备共享政策", + "EQUIPMENT_SHARING_POLICY_EDIT": "编辑设备共享政策", + "EQUIPMENT_SHARING_POLICY_DELETE": "删除设备共享政策", "ORG_EQUIPMENT_VIEW": "查看组织设备", "ORG_EQUIPMENT_EDIT": "编辑组织设备", "ORG_EQUIPMENT_SHARING_VIEW": "查看组织设备共享", From 0edde570a3c444ffc4ce27e5eb54b7bf73359440 Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Mon, 2 Sep 2024 19:01:01 +0530 Subject: [PATCH 09/13] fix: moved payments scss to page card scss --- .../approval-policy.component.scss | 2 +- .../pages/approvals/approvals.component.scss | 2 +- .../candidates/candidates.component.scss | 2 +- .../pages/contacts/contacts.component.scss | 2 +- .../departments/departments.component.scss | 2 +- .../pages/employees/employees.component.scss | 2 +- .../availability-slots.component.scss | 8 ++---- .../calendar/calendar/calendar.component.scss | 2 +- .../equipment-sharing-policy.component.scss | 2 +- .../equipment-sharing.component.scss | 2 +- .../pages/equipment/equipment.component.scss | 2 +- .../pages/expenses/expenses.component.scss | 23 ++++++++--------- .../app/pages/income/income.component.scss | 2 +- .../product-types.component.scss | 2 +- .../invoices-received.component.scss | 2 +- .../organizations.component.scss | 2 +- .../pages/payments/payments.component.scss | 2 +- .../pipeline-deals.component.scss | 2 +- .../pages/pipelines/pipelines.component.scss | 2 +- .../project-create/create.component.scss | 25 ++++++++++--------- .../project-edit/edit.component.scss | 25 ++++++++++--------- .../project-list/list.component.scss | 21 ++++++++-------- .../tasks/components/task/task.component.scss | 2 +- .../src/app/pages/teams/teams.component.scss | 2 +- .../pages/time-off/time-off.component.scss | 2 +- .../src/app/pages/users/users.component.scss | 2 +- .../proposal/proposal.component.scss | 2 +- .../appointment-calendar.component.scss | 2 +- .../lib/invite/invites/invites.component.scss | 2 +- .../@shared/{_payments.scss => _pg-card.scss} | 0 30 files changed, 74 insertions(+), 76 deletions(-) rename packages/ui-core/static/styles/@shared/{_payments.scss => _pg-card.scss} (100%) diff --git a/apps/gauzy/src/app/pages/approval-policy/approval-policy.component.scss b/apps/gauzy/src/app/pages/approval-policy/approval-policy.component.scss index 2ad4399c465..b7b68f47d66 100644 --- a/apps/gauzy/src/app/pages/approval-policy/approval-policy.component.scss +++ b/apps/gauzy/src/app/pages/approval-policy/approval-policy.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; .gauzy-button-container { align-self: flex-end; diff --git a/apps/gauzy/src/app/pages/approvals/approvals.component.scss b/apps/gauzy/src/app/pages/approvals/approvals.component.scss index a54331afdca..d593b3862a2 100644 --- a/apps/gauzy/src/app/pages/approvals/approvals.component.scss +++ b/apps/gauzy/src/app/pages/approvals/approvals.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; :host { nb-card-body { diff --git a/apps/gauzy/src/app/pages/candidates/candidates.component.scss b/apps/gauzy/src/app/pages/candidates/candidates.component.scss index 28c61d67d57..ef3a2adb035 100644 --- a/apps/gauzy/src/app/pages/candidates/candidates.component.scss +++ b/apps/gauzy/src/app/pages/candidates/candidates.component.scss @@ -1,6 +1,6 @@ @import 'gauzy/_gauzy-table'; @import 'gauzy/_gauzy-cards'; -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; .manage-btn { display: flex; diff --git a/apps/gauzy/src/app/pages/contacts/contacts.component.scss b/apps/gauzy/src/app/pages/contacts/contacts.component.scss index 70b2d394582..74822fbe821 100644 --- a/apps/gauzy/src/app/pages/contacts/contacts.component.scss +++ b/apps/gauzy/src/app/pages/contacts/contacts.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; .contact-list { display: flex; diff --git a/apps/gauzy/src/app/pages/departments/departments.component.scss b/apps/gauzy/src/app/pages/departments/departments.component.scss index 25b0f5c3fc2..df91f07792a 100644 --- a/apps/gauzy/src/app/pages/departments/departments.component.scss +++ b/apps/gauzy/src/app/pages/departments/departments.component.scss @@ -1 +1 @@ -@import '../payments/payments.component.scss'; \ No newline at end of file +@import '@shared/_pg-card'; diff --git a/apps/gauzy/src/app/pages/employees/employees.component.scss b/apps/gauzy/src/app/pages/employees/employees.component.scss index 88cf6e52cf8..eba4cdbdab2 100644 --- a/apps/gauzy/src/app/pages/employees/employees.component.scss +++ b/apps/gauzy/src/app/pages/employees/employees.component.scss @@ -1,5 +1,5 @@ @import 'gauzy/_gauzy-overrides'; -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; nb-card { background-color: var(--gauzy-card-2); diff --git a/apps/gauzy/src/app/pages/employees/schedules/availability-slots/availability-slots.component.scss b/apps/gauzy/src/app/pages/employees/schedules/availability-slots/availability-slots.component.scss index 7269ef7ccac..48848401341 100644 --- a/apps/gauzy/src/app/pages/employees/schedules/availability-slots/availability-slots.component.scss +++ b/apps/gauzy/src/app/pages/employees/schedules/availability-slots/availability-slots.component.scss @@ -1,5 +1,5 @@ @import 'gauzy/_gauzy-overrides'; -@import '../../../payments/payments.component.scss'; +@import '@shared/_pg-card'; .custom-header { display: flex; @@ -35,11 +35,7 @@ } .time-range ::ng-deep ga-timer-picker { text-transform: lowercase; - @include ng-select-overrides( - 2rem, - $default-button-radius, - $default-box-shadow - ); + @include ng-select-overrides(2rem, $default-button-radius, $default-box-shadow); } } :host .custom-calendar { diff --git a/apps/gauzy/src/app/pages/employees/timesheet/calendar/calendar/calendar.component.scss b/apps/gauzy/src/app/pages/employees/timesheet/calendar/calendar/calendar.component.scss index d9d5f63c74a..1545fee0c24 100644 --- a/apps/gauzy/src/app/pages/employees/timesheet/calendar/calendar/calendar.component.scss +++ b/apps/gauzy/src/app/pages/employees/timesheet/calendar/calendar/calendar.component.scss @@ -1,4 +1,4 @@ -@import '../../../../payments/payments.component.scss'; +@import '@shared/_pg-card'; :host nb-card { background-color: var(--gauzy-card-2); diff --git a/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.component.scss b/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.component.scss index 9e5665aa16e..df91f07792a 100644 --- a/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.component.scss +++ b/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.component.scss @@ -1 +1 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; diff --git a/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.scss b/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.scss index 9b2f33b9e4e..fdf870c37d7 100644 --- a/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.scss +++ b/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; /* Card grid */ diff --git a/apps/gauzy/src/app/pages/equipment/equipment.component.scss b/apps/gauzy/src/app/pages/equipment/equipment.component.scss index 732725418d5..d6febad9e57 100644 --- a/apps/gauzy/src/app/pages/equipment/equipment.component.scss +++ b/apps/gauzy/src/app/pages/equipment/equipment.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; [nbButton].sharing.appearance-filled.status-primary { color: nb-theme(text-primary-color); diff --git a/apps/gauzy/src/app/pages/expenses/expenses.component.scss b/apps/gauzy/src/app/pages/expenses/expenses.component.scss index dfa999a54cb..ccfc26f034e 100644 --- a/apps/gauzy/src/app/pages/expenses/expenses.component.scss +++ b/apps/gauzy/src/app/pages/expenses/expenses.component.scss @@ -1,5 +1,4 @@ -@import '../payments/payments.component.scss'; - +@import '@shared/_pg-card'; .action { box-shadow: var(--gauzy-shadow); @@ -12,10 +11,10 @@ &.secondary { color: #7e7e8f; } - &.success{ + &.success { color: rgba(37, 184, 105, 1); } - &.warning{ + &.warning { color: rgba(245, 109, 88, 1); } &.primary { @@ -23,7 +22,7 @@ .appearance-filled.status-basic[nbButtonToggle] { color: nb-theme(text-primary-color); } - &.soft{ + &.soft { &[nbButton].appearance-filled.status-basic { background-color: rgba(110, 73, 232, 0.1); } @@ -49,21 +48,21 @@ button { margin-right: 20px; } -.gauzy-button-container{ +.gauzy-button-container { display: flex; justify-content: flex-end; width: 100%; padding-bottom: 0; } -.card-custom-header{ - display: flex; - flex-direction: column; - width: 100%; - padding-bottom: 0; +.card-custom-header { + display: flex; + flex-direction: column; + width: 100%; + padding-bottom: 0; } -:host nb-card-body{ +:host nb-card-body { overflow: unset; height: calc(100vh - 17.5rem) !important; } diff --git a/apps/gauzy/src/app/pages/income/income.component.scss b/apps/gauzy/src/app/pages/income/income.component.scss index 9e5665aa16e..df91f07792a 100644 --- a/apps/gauzy/src/app/pages/income/income.component.scss +++ b/apps/gauzy/src/app/pages/income/income.component.scss @@ -1 +1 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; diff --git a/apps/gauzy/src/app/pages/inventory/components/manage-product-types/product-types.component.scss b/apps/gauzy/src/app/pages/inventory/components/manage-product-types/product-types.component.scss index abfee707a5c..edf1b77bf43 100644 --- a/apps/gauzy/src/app/pages/inventory/components/manage-product-types/product-types.component.scss +++ b/apps/gauzy/src/app/pages/inventory/components/manage-product-types/product-types.component.scss @@ -1,4 +1,4 @@ -@import '../../../payments/payments.component.scss'; +@import '@shared/_pg-card'; .action { box-shadow: var(--gauzy-shadow); diff --git a/apps/gauzy/src/app/pages/invoices/invoices-received/invoices-received.component.scss b/apps/gauzy/src/app/pages/invoices/invoices-received/invoices-received.component.scss index 38c72d42fec..df91f07792a 100644 --- a/apps/gauzy/src/app/pages/invoices/invoices-received/invoices-received.component.scss +++ b/apps/gauzy/src/app/pages/invoices/invoices-received/invoices-received.component.scss @@ -1 +1 @@ -@import '../../payments/payments.component.scss'; +@import '@shared/_pg-card'; diff --git a/apps/gauzy/src/app/pages/organizations/organizations.component.scss b/apps/gauzy/src/app/pages/organizations/organizations.component.scss index d746967fe93..732e0ca9a19 100644 --- a/apps/gauzy/src/app/pages/organizations/organizations.component.scss +++ b/apps/gauzy/src/app/pages/organizations/organizations.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; h4 { font-size: 24px; diff --git a/apps/gauzy/src/app/pages/payments/payments.component.scss b/apps/gauzy/src/app/pages/payments/payments.component.scss index 0e0125d2e88..df91f07792a 100644 --- a/apps/gauzy/src/app/pages/payments/payments.component.scss +++ b/apps/gauzy/src/app/pages/payments/payments.component.scss @@ -1 +1 @@ -@import '@shared/_payments'; +@import '@shared/_pg-card'; diff --git a/apps/gauzy/src/app/pages/pipelines/pipeline-deals/pipeline-deals.component.scss b/apps/gauzy/src/app/pages/pipelines/pipeline-deals/pipeline-deals.component.scss index ad1637a45ab..610004c0db3 100644 --- a/apps/gauzy/src/app/pages/pipelines/pipeline-deals/pipeline-deals.component.scss +++ b/apps/gauzy/src/app/pages/pipelines/pipeline-deals/pipeline-deals.component.scss @@ -1,4 +1,4 @@ -@import '../../payments/payments.component.scss'; +@import '@shared/_pg-card'; :host { .card-header-title { diff --git a/apps/gauzy/src/app/pages/pipelines/pipelines.component.scss b/apps/gauzy/src/app/pages/pipelines/pipelines.component.scss index 9fffd85eed1..4bdb04788b9 100644 --- a/apps/gauzy/src/app/pages/pipelines/pipelines.component.scss +++ b/apps/gauzy/src/app/pages/pipelines/pipelines.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; :host { height: 100%; diff --git a/apps/gauzy/src/app/pages/projects/components/project-create/create.component.scss b/apps/gauzy/src/app/pages/projects/components/project-create/create.component.scss index 34122cb1043..373c7ed7023 100644 --- a/apps/gauzy/src/app/pages/projects/components/project-create/create.component.scss +++ b/apps/gauzy/src/app/pages/projects/components/project-create/create.component.scss @@ -1,14 +1,15 @@ -@import './../../../payments/payments.component.scss'; +@import '@shared/_pg-card'; + :host { - h4 { - font-size: 24px; - font-weight: 600; - line-height: 30px; - letter-spacing: 0em; - } - .custom-body-content { - background-color: unset; - padding-bottom: 0; - height: calc(100vh - 15.25rem) !important; - } + h4 { + font-size: 24px; + font-weight: 600; + line-height: 30px; + letter-spacing: 0em; + } + .custom-body-content { + background-color: unset; + padding-bottom: 0; + height: calc(100vh - 15.25rem) !important; + } } diff --git a/apps/gauzy/src/app/pages/projects/components/project-edit/edit.component.scss b/apps/gauzy/src/app/pages/projects/components/project-edit/edit.component.scss index 34122cb1043..373c7ed7023 100644 --- a/apps/gauzy/src/app/pages/projects/components/project-edit/edit.component.scss +++ b/apps/gauzy/src/app/pages/projects/components/project-edit/edit.component.scss @@ -1,14 +1,15 @@ -@import './../../../payments/payments.component.scss'; +@import '@shared/_pg-card'; + :host { - h4 { - font-size: 24px; - font-weight: 600; - line-height: 30px; - letter-spacing: 0em; - } - .custom-body-content { - background-color: unset; - padding-bottom: 0; - height: calc(100vh - 15.25rem) !important; - } + h4 { + font-size: 24px; + font-weight: 600; + line-height: 30px; + letter-spacing: 0em; + } + .custom-body-content { + background-color: unset; + padding-bottom: 0; + height: calc(100vh - 15.25rem) !important; + } } diff --git a/apps/gauzy/src/app/pages/projects/components/project-list/list.component.scss b/apps/gauzy/src/app/pages/projects/components/project-list/list.component.scss index 99540197dd8..154d2e882d6 100644 --- a/apps/gauzy/src/app/pages/projects/components/project-list/list.component.scss +++ b/apps/gauzy/src/app/pages/projects/components/project-list/list.component.scss @@ -1,14 +1,15 @@ -@import '../../../payments/payments.component.scss'; +@import '@shared/_pg-card'; + h4 { - font-size: 24px; - font-weight: 600; - line-height: 30px; - letter-spacing: 0em; + font-size: 24px; + font-weight: 600; + line-height: 30px; + letter-spacing: 0em; } :host { - .custom-body-content { - background-color: unset; - padding-bottom: 0; - height: calc(100vh - 15.25rem) !important; - } + .custom-body-content { + background-color: unset; + padding-bottom: 0; + height: calc(100vh - 15.25rem) !important; + } } diff --git a/apps/gauzy/src/app/pages/tasks/components/task/task.component.scss b/apps/gauzy/src/app/pages/tasks/components/task/task.component.scss index 7e5c4b4030c..5e624dea674 100644 --- a/apps/gauzy/src/app/pages/tasks/components/task/task.component.scss +++ b/apps/gauzy/src/app/pages/tasks/components/task/task.component.scss @@ -1,4 +1,4 @@ -@import '../../../payments/payments.component.scss'; +@import '@shared/_pg-card'; .tasks-component { &__settings { diff --git a/apps/gauzy/src/app/pages/teams/teams.component.scss b/apps/gauzy/src/app/pages/teams/teams.component.scss index 25b0f5c3fc2..df91f07792a 100644 --- a/apps/gauzy/src/app/pages/teams/teams.component.scss +++ b/apps/gauzy/src/app/pages/teams/teams.component.scss @@ -1 +1 @@ -@import '../payments/payments.component.scss'; \ No newline at end of file +@import '@shared/_pg-card'; diff --git a/apps/gauzy/src/app/pages/time-off/time-off.component.scss b/apps/gauzy/src/app/pages/time-off/time-off.component.scss index e87db220c6a..4e76a145bfe 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.component.scss +++ b/apps/gauzy/src/app/pages/time-off/time-off.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; nb-radio-group { display: flex; diff --git a/apps/gauzy/src/app/pages/users/users.component.scss b/apps/gauzy/src/app/pages/users/users.component.scss index e8c10a19d05..54eeccf9cb4 100644 --- a/apps/gauzy/src/app/pages/users/users.component.scss +++ b/apps/gauzy/src/app/pages/users/users.component.scss @@ -1,4 +1,4 @@ -@import '../payments/payments.component.scss'; +@import '@shared/_pg-card'; :host { nb-card-body { diff --git a/packages/plugins/job-proposal-ui/src/lib/proposal/components/proposal/proposal.component.scss b/packages/plugins/job-proposal-ui/src/lib/proposal/components/proposal/proposal.component.scss index 0e685b65c29..60e40264033 100644 --- a/packages/plugins/job-proposal-ui/src/lib/proposal/components/proposal/proposal.component.scss +++ b/packages/plugins/job-proposal-ui/src/lib/proposal/components/proposal/proposal.component.scss @@ -1,4 +1,4 @@ -@import '@shared/_payments'; +@import '@shared/_pg-card'; .statistics { display: flex; diff --git a/packages/ui-core/shared/src/lib/appointments/appointment-calendar/appointment-calendar.component.scss b/packages/ui-core/shared/src/lib/appointments/appointment-calendar/appointment-calendar.component.scss index 26e8c965613..223cd116123 100644 --- a/packages/ui-core/shared/src/lib/appointments/appointment-calendar/appointment-calendar.component.scss +++ b/packages/ui-core/shared/src/lib/appointments/appointment-calendar/appointment-calendar.component.scss @@ -1,4 +1,4 @@ -@import '@shared/_payments'; +@import '@shared/_pg-card'; .main-header { display: flex; diff --git a/packages/ui-core/shared/src/lib/invite/invites/invites.component.scss b/packages/ui-core/shared/src/lib/invite/invites/invites.component.scss index 50f72d4a723..221092cce16 100644 --- a/packages/ui-core/shared/src/lib/invite/invites/invites.component.scss +++ b/packages/ui-core/shared/src/lib/invite/invites/invites.component.scss @@ -1,6 +1,6 @@ @import 'gauzy/_gauzy-table'; @import 'gauzy/_gauzy-cards'; -@import '@shared/_payments'; +@import '@shared/_pg-card'; :host { .header-title-with-back { diff --git a/packages/ui-core/static/styles/@shared/_payments.scss b/packages/ui-core/static/styles/@shared/_pg-card.scss similarity index 100% rename from packages/ui-core/static/styles/@shared/_payments.scss rename to packages/ui-core/static/styles/@shared/_pg-card.scss From 74a68777086926459bfd5ff463db79ece4a09807 Mon Sep 17 00:00:00 2001 From: samuelmbabhazi Date: Mon, 2 Sep 2024 16:16:22 +0200 Subject: [PATCH 10/13] fix:source display --- .../view-screenshots-modal/view-screenshots-modal.module.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/ui-core/shared/src/lib/timesheet/screenshots/view-screenshots-modal/view-screenshots-modal.module.ts b/packages/ui-core/shared/src/lib/timesheet/screenshots/view-screenshots-modal/view-screenshots-modal.module.ts index 950275c58c9..d80ac4349eb 100644 --- a/packages/ui-core/shared/src/lib/timesheet/screenshots/view-screenshots-modal/view-screenshots-modal.module.ts +++ b/packages/ui-core/shared/src/lib/timesheet/screenshots/view-screenshots-modal/view-screenshots-modal.module.ts @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { NbAlertModule, + NbBadgeModule, NbButtonModule, NbCardModule, NbDialogModule, @@ -32,6 +33,7 @@ import { ViewScreenshotsModalComponent } from './view-screenshots-modal.componen NbTooltipModule, MomentModule, SharedModule, + NbBadgeModule, NgxPermissionsModule.forChild(), TranslateModule.forChild(), DialogsModule, From 2262f3f9408ec5abaeaf9d1a07ab297e546fc3ff Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Mon, 2 Sep 2024 19:53:43 +0530 Subject: [PATCH 11/13] fix: equipment sharing policy crud permission definition --- .../equipment-sharing-policy.component.ts | 2 +- .../equipment-sharing.component.html | 4 +- .../equipment-sharing.component.ts | 3 +- .../time-off-settings.component.html | 4 +- .../src/core/entities/tenant-base.entity.ts | 11 ++- .../tenant-organization-base.entity.ts | 17 ++-- .../dto/update-or-create.dto.ts | 14 ++++ .../equipment-sharing-policy.controller.ts | 82 ++++++++++++------- .../equipment-sharing-policy.service.ts | 66 +++++++++------ ...ent-sharing-policy-mutation.component.html | 51 +++--------- ...pment-sharing-policy-mutation.component.ts | 57 +++++++++---- .../equipment-sharing-mutation.component.ts | 17 ++-- 12 files changed, 193 insertions(+), 135 deletions(-) create mode 100644 packages/core/src/equipment-sharing-policy/dto/update-or-create.dto.ts diff --git a/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.component.ts b/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.component.ts index bd9a0afe40f..4b49b2bc39a 100644 --- a/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.component.ts +++ b/apps/gauzy/src/app/pages/equipment-sharing-policy/equipment-sharing-policy.component.ts @@ -199,7 +199,7 @@ export class EquipmentSharingPolicyComponent extends PaginationFilterBaseCompone this.loading = true; this.smartTableSource = new ServerDataSource(this.httpClient, { endPoint: `${API_PREFIX}/equipment-sharing-policy/pagination`, - relations: ['organization'], + relations: [], where: { ...{ organizationId, tenantId }, ...this.filters.where diff --git a/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.html b/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.html index b9d74a6dac6..93b581fa3ae 100644 --- a/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.html +++ b/apps/gauzy/src/app/pages/equipment-sharing/equipment-sharing.component.html @@ -9,7 +9,9 @@

- +
- diff --git a/packages/ui-core/shared/src/lib/equipment/equipment-sharing-policy/equipment-sharing-policy-mutation.component.ts b/packages/ui-core/shared/src/lib/equipment/equipment-sharing-policy/equipment-sharing-policy-mutation.component.ts index ebda325c810..fbf435abea4 100644 --- a/packages/ui-core/shared/src/lib/equipment/equipment-sharing-policy/equipment-sharing-policy-mutation.component.ts +++ b/packages/ui-core/shared/src/lib/equipment/equipment-sharing-policy/equipment-sharing-policy-mutation.component.ts @@ -12,10 +12,12 @@ import { EquipmentSharingPolicyService } from '@gauzy/ui-core/core'; styleUrls: ['./equipment-sharing-policy-mutation.component.scss'] }) export class EquipmentSharingPolicyMutationComponent extends TranslationBaseComponent implements OnInit { - form: UntypedFormGroup; equipmentSharingPolicy: IEquipmentSharingPolicy; - isHasType = true; selectedOrganization: IOrganization; + form: UntypedFormGroup = this.fb.group({ + name: [null, Validators.required], + description: [] + }); constructor( public dialogRef: NbDialogRef, @@ -30,32 +32,55 @@ export class EquipmentSharingPolicyMutationComponent extends TranslationBaseComp this.initializeForm(); } + /** + * Initialize the form with values from the existing equipment sharing policy. + * If no policy exists, the form fields are set to empty strings. + */ async initializeForm() { - this.form = this.fb.group({ - name: [this.equipmentSharingPolicy ? this.equipmentSharingPolicy.name : '', Validators.required], - description: [this.equipmentSharingPolicy ? this.equipmentSharingPolicy.description : ''], - organizationId: [this.equipmentSharingPolicy ? this.equipmentSharingPolicy.organizationId : ''], - id: [this.equipmentSharingPolicy ? this.equipmentSharingPolicy.id : null] + this.form.patchValue({ + name: this.equipmentSharingPolicy ? this.equipmentSharingPolicy.name : '', + description: this.equipmentSharingPolicy ? this.equipmentSharingPolicy.description : '' }); } - async closeDialog(requipmentSharingPolicy?: IEquipmentSharingPolicy) { - this.dialogRef.close(requipmentSharingPolicy); + /** + * Close the dialog with the given equipment sharing policy. + * If no policy is provided, the dialog closes without passing any data. + * + * @param policy - The equipment sharing policy to pass when closing the dialog. + */ + async closeDialog(policy?: IEquipmentSharingPolicy) { + this.dialogRef.close(policy); } + /** + * Save the equipment sharing policy. + * Determines whether to create a new policy or update an existing one based on the presence of an ID. + */ async saveEquipmentSharingPolicy() { const { id: organizationId, tenantId } = this.selectedOrganization; - const equipPolicy: IEquipmentSharingPolicy = { - name: this.form.value['name'], - description: this.form.value['description'], - id: this.form.value['id'], + const { name, description } = this.form.value; + + // Create an Equipment Sharing Policy object + const equipmentSharingPolicy: IEquipmentSharingPolicy = { + name, + description, organizationId, tenantId }; - let result: IEquipmentSharingPolicy; - result = await this.equipmentSharingPolicyService.save(equipPolicy); + let equipmentPolicy: IEquipmentSharingPolicy; + + if (this.equipmentSharingPolicy) { + const { id } = this.equipmentSharingPolicy; + // Update existing policy + equipmentPolicy = await this.equipmentSharingPolicyService.update(id, equipmentSharingPolicy); + } else { + // Create new policy + equipmentPolicy = await this.equipmentSharingPolicyService.create(equipmentSharingPolicy); + } - this.closeDialog(result); + // Close the dialog and pass the created/updated policy + this.closeDialog(equipmentPolicy); } } diff --git a/packages/ui-core/shared/src/lib/equipment/equipment-sharing/equipment-sharing-mutation.component.ts b/packages/ui-core/shared/src/lib/equipment/equipment-sharing/equipment-sharing-mutation.component.ts index e73488744ad..8ed16c4e715 100644 --- a/packages/ui-core/shared/src/lib/equipment/equipment-sharing/equipment-sharing-mutation.component.ts +++ b/packages/ui-core/shared/src/lib/equipment/equipment-sharing/equipment-sharing-mutation.component.ts @@ -137,14 +137,19 @@ export class EquipmentSharingMutationComponent extends TranslationBaseComponent } } + /** + * Load equipment sharing policies for the selected organization. + */ async loadEquipmentSharingPolicy() { - const { tenantId } = this.store.user; - const { id: organizationId } = this.selectedOrganization; + const { id: organizationId, tenantId } = this.selectedOrganization; this.equipmentSharingPolicies = ( - await this.equipmentSharingPolicyService.getAll([], { - organizationId, - tenantId - }) + await this.equipmentSharingPolicyService.getAll( + { + organizationId, + tenantId + }, + [] + ) ).items; } From 4750911dcdd460a72610f0555569bd163fad4f8b Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Mon, 2 Sep 2024 20:00:18 +0530 Subject: [PATCH 12/13] fix(cspell): typo spelling :-) --- apps/gauzy/src/app/pages/time-off/time-off.component.ts | 1 - apps/gauzy/src/app/pages/time-off/time-off.module.ts | 2 +- packages/core/src/core/entities/tenant-base.entity.ts | 4 ++-- .../equipment-sharing-policy.controller.ts | 2 +- packages/core/src/time-off-policy/time-off-policy.service.ts | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/gauzy/src/app/pages/time-off/time-off.component.ts b/apps/gauzy/src/app/pages/time-off/time-off.component.ts index d96cbde7de3..36e9562f6a5 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.component.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.component.ts @@ -59,7 +59,6 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O public viewComponentName: ComponentEnum; public dataLayoutStyle = ComponentLayoutStyleEnum.TABLE; public componentLayoutStyleEnum = ComponentLayoutStyleEnum; - public timeOffStatusesselectedStatus = StatusTypesEnum.ALL; public timeOffStatuses = Object.keys(StatusTypesEnum); public loading: boolean; public disableButton: boolean = true; diff --git a/apps/gauzy/src/app/pages/time-off/time-off.module.ts b/apps/gauzy/src/app/pages/time-off/time-off.module.ts index 06c69f3abe9..cc83acbefc0 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.module.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { ROUTES, RouterModule } from '@angular/router'; +import { RouterModule } from '@angular/router'; import { NbBadgeModule, NbButtonModule, diff --git a/packages/core/src/core/entities/tenant-base.entity.ts b/packages/core/src/core/entities/tenant-base.entity.ts index 0384c6ee33f..58955b511d5 100644 --- a/packages/core/src/core/entities/tenant-base.entity.ts +++ b/packages/core/src/core/entities/tenant-base.entity.ts @@ -1,6 +1,6 @@ -import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; +import { ApiPropertyOptional } from '@nestjs/swagger'; import { RelationId } from 'typeorm'; -import { IsString, IsOptional, IsUUID } from 'class-validator'; +import { IsOptional, IsUUID } from 'class-validator'; import { IBasePerTenantEntityModel, ID, ITenant } from '@gauzy/contracts'; import { BaseEntity, Tenant } from '../entities/internal'; import { MultiORMManyToOne } from '../decorators/entity/relations'; diff --git a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.controller.ts b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.controller.ts index 5507d369d57..2fcc2a9182f 100644 --- a/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.controller.ts +++ b/packages/core/src/equipment-sharing-policy/equipment-sharing-policy.controller.ts @@ -1,5 +1,5 @@ import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; -import { Controller, HttpStatus, Get, UseGuards, Put, Param, Body, Query, Post, HttpException } from '@nestjs/common'; +import { Controller, HttpStatus, Get, UseGuards, Put, Param, Body, Query, Post } from '@nestjs/common'; import { UpdateResult } from 'typeorm'; import { ID, IEquipmentSharingPolicy, IPagination, PermissionsEnum } from '@gauzy/contracts'; import { CrudController, PaginationParams } from './../core/crud'; diff --git a/packages/core/src/time-off-policy/time-off-policy.service.ts b/packages/core/src/time-off-policy/time-off-policy.service.ts index 8414fcb3e60..b229e078b02 100644 --- a/packages/core/src/time-off-policy/time-off-policy.service.ts +++ b/packages/core/src/time-off-policy/time-off-policy.service.ts @@ -1,4 +1,4 @@ -import { Injectable, BadRequestException, HttpException, HttpStatus } from '@nestjs/common'; +import { Injectable, HttpException, HttpStatus } from '@nestjs/common'; import { In } from 'typeorm'; import { ID, ITimeOffPolicyCreateInput, ITimeOffPolicyUpdateInput } from '@gauzy/contracts'; import { TenantAwareCrudService } from '../core/crud'; From c2fc39f4e08252a956e03f3e0531b50173c65918 Mon Sep 17 00:00:00 2001 From: Ruslan Konviser Date: Mon, 2 Sep 2024 23:31:19 +0200 Subject: [PATCH 13/13] chore: attempt to fix desktop apps build on Windows --- .github/workflows/desktop-app-prod.yml | 30 +++++++++---------- .github/workflows/desktop-app-stage.yml | 30 +++++++++---------- .github/workflows/desktop-timer-app-prod.yml | 30 +++++++++---------- .github/workflows/desktop-timer-app-stage.yml | 30 +++++++++---------- .github/workflows/server-api-prod.yml | 30 +++++++++---------- .github/workflows/server-api-stage.yml | 30 +++++++++---------- .github/workflows/server-prod.yml | 30 +++++++++---------- .github/workflows/server-stage.yml | 30 +++++++++---------- 8 files changed, 120 insertions(+), 120 deletions(-) diff --git a/.github/workflows/desktop-app-prod.yml b/.github/workflows/desktop-app-prod.yml index 1efe96ca190..55409084fcf 100644 --- a/.github/workflows/desktop-app-prod.yml +++ b/.github/workflows/desktop-app-prod.yml @@ -211,9 +211,9 @@ jobs: ChocolateyInstall: '' ChromeWebDriver: '' COBERTURA_HOME: '' - COMPUTERNAME: '' - COMSPEC: '' - CONDA: '' + # COMPUTERNAME: '' + # COMSPEC: '' + # CONDA: '' DEPLOYMENT_BASEPATH: '' SBT_HOME: '' SELENIUM_JAR_PATH: '' @@ -276,8 +276,8 @@ jobs: GOROOT_1_21_X64: '' GOROOT_1_22_X64: '' GRADLE_HOME: '' - HOMEDRIVE: '' - HOMEPATH: '' + # HOMEDRIVE: '' + # HOMEPATH: '' IEWebDriver: '' ImageOS: '' ImageVersion: '' @@ -286,16 +286,16 @@ jobs: JAVA_HOME_17_X64: '' JAVA_HOME_21_X64: '' JAVA_HOME_8_X64: '' - LOCALAPPDATA: '' - LOGONSERVER: '' + # LOCALAPPDATA: '' + # LOGONSERVER: '' M2: '' M2_REPO: '' MAVEN_OPTS: '' MonAgentClientLocation: '' - npm_config_prefix: '' + # npm_config_prefix: '' NUMBER_OF_PROCESSORS: '' OS: '' - PATHEXT: '' + # PATHEXT: '' PERFLOG_LOCATION_SETTING: '' PGBIN: '' PGDATA: '' @@ -332,13 +332,13 @@ jobs: RUNNER_TOOL_CACHE: '' RUNNER_TRACKING_ID: '' RUNNER_WORKSPACE: '' - USERDOMAIN: '' - USERDOMAIN_ROAMINGPROFILE: '' + # USERDOMAIN: '' + # USERDOMAIN_ROAMINGPROFILE: '' USERNAME: '' - USERPROFILE: '' - VCPKG_INSTALLATION_ROOT: '' - WIX: '' - TERM: '' + # USERPROFILE: '' + # VCPKG_INSTALLATION_ROOT: '' + # WIX: '' + # TERM: '' # HOME: '' # WINDIR: '' # ProgramData: '' diff --git a/.github/workflows/desktop-app-stage.yml b/.github/workflows/desktop-app-stage.yml index 69d8565adaa..4488773c0a8 100644 --- a/.github/workflows/desktop-app-stage.yml +++ b/.github/workflows/desktop-app-stage.yml @@ -211,9 +211,9 @@ jobs: ChocolateyInstall: '' ChromeWebDriver: '' COBERTURA_HOME: '' - COMPUTERNAME: '' - COMSPEC: '' - CONDA: '' + # COMPUTERNAME: '' + # COMSPEC: '' + # CONDA: '' DEPLOYMENT_BASEPATH: '' SBT_HOME: '' SELENIUM_JAR_PATH: '' @@ -276,8 +276,8 @@ jobs: GOROOT_1_21_X64: '' GOROOT_1_22_X64: '' GRADLE_HOME: '' - HOMEDRIVE: '' - HOMEPATH: '' + # HOMEDRIVE: '' + # HOMEPATH: '' IEWebDriver: '' ImageOS: '' ImageVersion: '' @@ -286,16 +286,16 @@ jobs: JAVA_HOME_17_X64: '' JAVA_HOME_21_X64: '' JAVA_HOME_8_X64: '' - LOCALAPPDATA: '' - LOGONSERVER: '' + # LOCALAPPDATA: '' + # LOGONSERVER: '' M2: '' M2_REPO: '' MAVEN_OPTS: '' MonAgentClientLocation: '' - npm_config_prefix: '' + # npm_config_prefix: '' NUMBER_OF_PROCESSORS: '' OS: '' - PATHEXT: '' + # PATHEXT: '' PERFLOG_LOCATION_SETTING: '' PGBIN: '' PGDATA: '' @@ -332,13 +332,13 @@ jobs: RUNNER_TOOL_CACHE: '' RUNNER_TRACKING_ID: '' RUNNER_WORKSPACE: '' - USERDOMAIN: '' - USERDOMAIN_ROAMINGPROFILE: '' + # USERDOMAIN: '' + # USERDOMAIN_ROAMINGPROFILE: '' USERNAME: '' - USERPROFILE: '' - VCPKG_INSTALLATION_ROOT: '' - WIX: '' - TERM: '' + # USERPROFILE: '' + # VCPKG_INSTALLATION_ROOT: '' + # WIX: '' + # TERM: '' # HOME: '' # WINDIR: '' # ProgramData: '' diff --git a/.github/workflows/desktop-timer-app-prod.yml b/.github/workflows/desktop-timer-app-prod.yml index ec03493deb3..c09f916f937 100644 --- a/.github/workflows/desktop-timer-app-prod.yml +++ b/.github/workflows/desktop-timer-app-prod.yml @@ -211,9 +211,9 @@ jobs: ChocolateyInstall: '' ChromeWebDriver: '' COBERTURA_HOME: '' - COMPUTERNAME: '' - COMSPEC: '' - CONDA: '' + # COMPUTERNAME: '' + # COMSPEC: '' + # CONDA: '' DEPLOYMENT_BASEPATH: '' SBT_HOME: '' SELENIUM_JAR_PATH: '' @@ -276,8 +276,8 @@ jobs: GOROOT_1_21_X64: '' GOROOT_1_22_X64: '' GRADLE_HOME: '' - HOMEDRIVE: '' - HOMEPATH: '' + # HOMEDRIVE: '' + # HOMEPATH: '' IEWebDriver: '' ImageOS: '' ImageVersion: '' @@ -286,16 +286,16 @@ jobs: JAVA_HOME_17_X64: '' JAVA_HOME_21_X64: '' JAVA_HOME_8_X64: '' - LOCALAPPDATA: '' - LOGONSERVER: '' + # LOCALAPPDATA: '' + # LOGONSERVER: '' M2: '' M2_REPO: '' MAVEN_OPTS: '' MonAgentClientLocation: '' - npm_config_prefix: '' + # npm_config_prefix: '' NUMBER_OF_PROCESSORS: '' OS: '' - PATHEXT: '' + # PATHEXT: '' PERFLOG_LOCATION_SETTING: '' PGBIN: '' PGDATA: '' @@ -332,13 +332,13 @@ jobs: RUNNER_TOOL_CACHE: '' RUNNER_TRACKING_ID: '' RUNNER_WORKSPACE: '' - USERDOMAIN: '' - USERDOMAIN_ROAMINGPROFILE: '' + # USERDOMAIN: '' + # USERDOMAIN_ROAMINGPROFILE: '' USERNAME: '' - USERPROFILE: '' - VCPKG_INSTALLATION_ROOT: '' - WIX: '' - TERM: '' + # USERPROFILE: '' + # VCPKG_INSTALLATION_ROOT: '' + # WIX: '' + # TERM: '' # HOME: '' # WINDIR: '' # ProgramData: '' diff --git a/.github/workflows/desktop-timer-app-stage.yml b/.github/workflows/desktop-timer-app-stage.yml index 2ce59c1c8a7..399ed7f34b1 100644 --- a/.github/workflows/desktop-timer-app-stage.yml +++ b/.github/workflows/desktop-timer-app-stage.yml @@ -216,9 +216,9 @@ jobs: ChocolateyInstall: '' ChromeWebDriver: '' COBERTURA_HOME: '' - COMPUTERNAME: '' - COMSPEC: '' - CONDA: '' + # COMPUTERNAME: '' + # COMSPEC: '' + # CONDA: '' DEPLOYMENT_BASEPATH: '' SBT_HOME: '' SELENIUM_JAR_PATH: '' @@ -281,8 +281,8 @@ jobs: GOROOT_1_21_X64: '' GOROOT_1_22_X64: '' GRADLE_HOME: '' - HOMEDRIVE: '' - HOMEPATH: '' + # HOMEDRIVE: '' + # HOMEPATH: '' IEWebDriver: '' ImageOS: '' ImageVersion: '' @@ -291,16 +291,16 @@ jobs: JAVA_HOME_17_X64: '' JAVA_HOME_21_X64: '' JAVA_HOME_8_X64: '' - LOCALAPPDATA: '' - LOGONSERVER: '' + # LOCALAPPDATA: '' + # LOGONSERVER: '' M2: '' M2_REPO: '' MAVEN_OPTS: '' MonAgentClientLocation: '' - npm_config_prefix: '' + # npm_config_prefix: '' NUMBER_OF_PROCESSORS: '' OS: '' - PATHEXT: '' + # PATHEXT: '' PERFLOG_LOCATION_SETTING: '' PGBIN: '' PGDATA: '' @@ -337,13 +337,13 @@ jobs: RUNNER_TOOL_CACHE: '' RUNNER_TRACKING_ID: '' RUNNER_WORKSPACE: '' - USERDOMAIN: '' - USERDOMAIN_ROAMINGPROFILE: '' + # USERDOMAIN: '' + # USERDOMAIN_ROAMINGPROFILE: '' USERNAME: '' - USERPROFILE: '' - VCPKG_INSTALLATION_ROOT: '' - WIX: '' - TERM: '' + # USERPROFILE: '' + # VCPKG_INSTALLATION_ROOT: '' + # WIX: '' + # TERM: '' # HOME: '' # WINDIR: '' # ProgramData: '' diff --git a/.github/workflows/server-api-prod.yml b/.github/workflows/server-api-prod.yml index 0818a40289d..c337f48a4b9 100644 --- a/.github/workflows/server-api-prod.yml +++ b/.github/workflows/server-api-prod.yml @@ -211,9 +211,9 @@ jobs: ChocolateyInstall: '' ChromeWebDriver: '' COBERTURA_HOME: '' - COMPUTERNAME: '' - COMSPEC: '' - CONDA: '' + # COMPUTERNAME: '' + # COMSPEC: '' + # CONDA: '' DEPLOYMENT_BASEPATH: '' SBT_HOME: '' SELENIUM_JAR_PATH: '' @@ -276,8 +276,8 @@ jobs: GOROOT_1_21_X64: '' GOROOT_1_22_X64: '' GRADLE_HOME: '' - HOMEDRIVE: '' - HOMEPATH: '' + # HOMEDRIVE: '' + # HOMEPATH: '' IEWebDriver: '' ImageOS: '' ImageVersion: '' @@ -286,16 +286,16 @@ jobs: JAVA_HOME_17_X64: '' JAVA_HOME_21_X64: '' JAVA_HOME_8_X64: '' - LOCALAPPDATA: '' - LOGONSERVER: '' + # LOCALAPPDATA: '' + # LOGONSERVER: '' M2: '' M2_REPO: '' MAVEN_OPTS: '' MonAgentClientLocation: '' - npm_config_prefix: '' + # npm_config_prefix: '' NUMBER_OF_PROCESSORS: '' OS: '' - PATHEXT: '' + # PATHEXT: '' PERFLOG_LOCATION_SETTING: '' PGBIN: '' PGDATA: '' @@ -332,13 +332,13 @@ jobs: RUNNER_TOOL_CACHE: '' RUNNER_TRACKING_ID: '' RUNNER_WORKSPACE: '' - USERDOMAIN: '' - USERDOMAIN_ROAMINGPROFILE: '' + # USERDOMAIN: '' + # USERDOMAIN_ROAMINGPROFILE: '' USERNAME: '' - USERPROFILE: '' - VCPKG_INSTALLATION_ROOT: '' - WIX: '' - TERM: '' + # USERPROFILE: '' + # VCPKG_INSTALLATION_ROOT: '' + # WIX: '' + # TERM: '' # HOME: '' # WINDIR: '' # ProgramData: '' diff --git a/.github/workflows/server-api-stage.yml b/.github/workflows/server-api-stage.yml index d8843a7f7a1..d62095c3eb9 100644 --- a/.github/workflows/server-api-stage.yml +++ b/.github/workflows/server-api-stage.yml @@ -211,9 +211,9 @@ jobs: ChocolateyInstall: '' ChromeWebDriver: '' COBERTURA_HOME: '' - COMPUTERNAME: '' - COMSPEC: '' - CONDA: '' + # COMPUTERNAME: '' + # COMSPEC: '' + # CONDA: '' DEPLOYMENT_BASEPATH: '' SBT_HOME: '' SELENIUM_JAR_PATH: '' @@ -276,8 +276,8 @@ jobs: GOROOT_1_21_X64: '' GOROOT_1_22_X64: '' GRADLE_HOME: '' - HOMEDRIVE: '' - HOMEPATH: '' + # HOMEDRIVE: '' + # HOMEPATH: '' IEWebDriver: '' ImageOS: '' ImageVersion: '' @@ -286,16 +286,16 @@ jobs: JAVA_HOME_17_X64: '' JAVA_HOME_21_X64: '' JAVA_HOME_8_X64: '' - LOCALAPPDATA: '' - LOGONSERVER: '' + # LOCALAPPDATA: '' + # LOGONSERVER: '' M2: '' M2_REPO: '' MAVEN_OPTS: '' MonAgentClientLocation: '' - npm_config_prefix: '' + # npm_config_prefix: '' NUMBER_OF_PROCESSORS: '' OS: '' - PATHEXT: '' + # PATHEXT: '' PERFLOG_LOCATION_SETTING: '' PGBIN: '' PGDATA: '' @@ -332,13 +332,13 @@ jobs: RUNNER_TOOL_CACHE: '' RUNNER_TRACKING_ID: '' RUNNER_WORKSPACE: '' - USERDOMAIN: '' - USERDOMAIN_ROAMINGPROFILE: '' + # USERDOMAIN: '' + # USERDOMAIN_ROAMINGPROFILE: '' USERNAME: '' - USERPROFILE: '' - VCPKG_INSTALLATION_ROOT: '' - WIX: '' - TERM: '' + # USERPROFILE: '' + # VCPKG_INSTALLATION_ROOT: '' + # WIX: '' + # TERM: '' # HOME: '' # WINDIR: '' # ProgramData: '' diff --git a/.github/workflows/server-prod.yml b/.github/workflows/server-prod.yml index 1e307242d85..a668ca053ce 100644 --- a/.github/workflows/server-prod.yml +++ b/.github/workflows/server-prod.yml @@ -211,9 +211,9 @@ jobs: ChocolateyInstall: '' ChromeWebDriver: '' COBERTURA_HOME: '' - COMPUTERNAME: '' - COMSPEC: '' - CONDA: '' + # COMPUTERNAME: '' + # COMSPEC: '' + # CONDA: '' DEPLOYMENT_BASEPATH: '' SBT_HOME: '' SELENIUM_JAR_PATH: '' @@ -276,8 +276,8 @@ jobs: GOROOT_1_21_X64: '' GOROOT_1_22_X64: '' GRADLE_HOME: '' - HOMEDRIVE: '' - HOMEPATH: '' + # HOMEDRIVE: '' + # HOMEPATH: '' IEWebDriver: '' ImageOS: '' ImageVersion: '' @@ -286,16 +286,16 @@ jobs: JAVA_HOME_17_X64: '' JAVA_HOME_21_X64: '' JAVA_HOME_8_X64: '' - LOCALAPPDATA: '' - LOGONSERVER: '' + # LOCALAPPDATA: '' + # LOGONSERVER: '' M2: '' M2_REPO: '' MAVEN_OPTS: '' MonAgentClientLocation: '' - npm_config_prefix: '' + # npm_config_prefix: '' NUMBER_OF_PROCESSORS: '' OS: '' - PATHEXT: '' + # PATHEXT: '' PERFLOG_LOCATION_SETTING: '' PGBIN: '' PGDATA: '' @@ -332,13 +332,13 @@ jobs: RUNNER_TOOL_CACHE: '' RUNNER_TRACKING_ID: '' RUNNER_WORKSPACE: '' - USERDOMAIN: '' - USERDOMAIN_ROAMINGPROFILE: '' + # USERDOMAIN: '' + # USERDOMAIN_ROAMINGPROFILE: '' USERNAME: '' - USERPROFILE: '' - VCPKG_INSTALLATION_ROOT: '' - WIX: '' - TERM: '' + # USERPROFILE: '' + # VCPKG_INSTALLATION_ROOT: '' + # WIX: '' + # TERM: '' # HOME: '' # WINDIR: '' # ProgramData: '' diff --git a/.github/workflows/server-stage.yml b/.github/workflows/server-stage.yml index 3855e498a13..8c3d0dee907 100644 --- a/.github/workflows/server-stage.yml +++ b/.github/workflows/server-stage.yml @@ -211,9 +211,9 @@ jobs: ChocolateyInstall: '' ChromeWebDriver: '' COBERTURA_HOME: '' - COMPUTERNAME: '' - COMSPEC: '' - CONDA: '' + # COMPUTERNAME: '' + # COMSPEC: '' + # CONDA: '' DEPLOYMENT_BASEPATH: '' SBT_HOME: '' SELENIUM_JAR_PATH: '' @@ -276,8 +276,8 @@ jobs: GOROOT_1_21_X64: '' GOROOT_1_22_X64: '' GRADLE_HOME: '' - HOMEDRIVE: '' - HOMEPATH: '' + # HOMEDRIVE: '' + # HOMEPATH: '' IEWebDriver: '' ImageOS: '' ImageVersion: '' @@ -286,16 +286,16 @@ jobs: JAVA_HOME_17_X64: '' JAVA_HOME_21_X64: '' JAVA_HOME_8_X64: '' - LOCALAPPDATA: '' - LOGONSERVER: '' + # LOCALAPPDATA: '' + # LOGONSERVER: '' M2: '' M2_REPO: '' MAVEN_OPTS: '' MonAgentClientLocation: '' - npm_config_prefix: '' + # npm_config_prefix: '' NUMBER_OF_PROCESSORS: '' OS: '' - PATHEXT: '' + # PATHEXT: '' PERFLOG_LOCATION_SETTING: '' PGBIN: '' PGDATA: '' @@ -332,13 +332,13 @@ jobs: RUNNER_TOOL_CACHE: '' RUNNER_TRACKING_ID: '' RUNNER_WORKSPACE: '' - USERDOMAIN: '' - USERDOMAIN_ROAMINGPROFILE: '' + # USERDOMAIN: '' + # USERDOMAIN_ROAMINGPROFILE: '' USERNAME: '' - USERPROFILE: '' - VCPKG_INSTALLATION_ROOT: '' - WIX: '' - TERM: '' + # USERPROFILE: '' + # VCPKG_INSTALLATION_ROOT: '' + # WIX: '' + # TERM: '' # HOME: '' # WINDIR: '' # ProgramData: ''