Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #8120

Merged
merged 11 commits into from
Aug 28, 2024
1 change: 0 additions & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@gauzy/contracts": "^0.1.0",
"@gauzy/desktop-ui-lib": "^0.1.0",
"@gauzy/ui-config": "^0.1.0",
"@gauzy/ui-core": "^0.1.0",
"@grpc/grpc-js": "^1.6.7",
"@nebular/auth": "^12.0.0",
"@nebular/bootstrap": "^9.1.0-rc.6",
Expand Down
14 changes: 7 additions & 7 deletions apps/desktop/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import log from 'electron-log';
console.log = log.log;
Object.assign(console, log.functions);

import * as path from 'path';
import { app, BrowserWindow, ipcMain, Menu, shell, MenuItemConstructorOptions, dialog, nativeTheme } from 'electron';
import * as remoteMain from '@electron/remote/main';
import { setupTitlebar } from 'custom-electron-titlebar/main';
import { BrowserWindow, Menu, MenuItemConstructorOptions, app, dialog, ipcMain, nativeTheme, shell } from 'electron';
import * as path from 'path';

import { environment } from './environments/environment';

Expand All @@ -29,6 +29,7 @@ import {
AppError,
AppMenu,
DesktopServer,
DesktopThemeListener,
DesktopUpdater,
DialogErrorHandler,
ErrorEventManager,
Expand All @@ -43,8 +44,7 @@ import {
ipcMainHandler,
ipcTimer,
removeMainListener,
removeTimerListener,
DesktopThemeListener
removeTimerListener
} from '@gauzy/desktop-libs';
import {
AlwaysOn,
Expand All @@ -57,10 +57,10 @@ import {
createTimeTrackerWindow,
createUpdaterWindow
} from '@gauzy/desktop-window';
import { initSentry } from './sentry';
import * as Sentry from '@sentry/electron';
import { fork } from 'child_process';
import { autoUpdater } from 'electron-updater';
import * as Sentry from '@sentry/electron';
import { initSentry } from './sentry';

// the folder where all app data will be stored (e.g. sqlite DB, settings, cache, etc)
// C:\Users\USERNAME\AppData\Roaming\gauzy-desktop
Expand Down Expand Up @@ -535,7 +535,7 @@ app.on('ready', async () => {
timeTrackerWindow,
settingsWindow,
updaterWindow,
imageViewWindow: imageView,
imageViewerWindow: imageView,
gauzyWindow,
splashScreenWindow: splashScreen.browserWindow,
alwaysOnWindow: alwaysOn.browserWindow
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"../../../packages/config",
"../../../packages/contracts",
"../../../packages/ui-config",
"../../../packages/ui-core",
"../../../packages/plugin",
"../../../packages/plugins/integration-ai",
"../../../packages/plugins/integration-hubstaff",
Expand Down
1 change: 0 additions & 1 deletion apps/gauzy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"@gauzy/plugin-onboarding-ui": "^0.1.0",
"@gauzy/plugin-public-layout-ui": "^0.1.0",
"@gauzy/ui-config": "^0.1.0",
"@gauzy/ui-core": "^0.1.0",
"@jitsu/js": "^1.8.2",
"@kurkle/color": "^0.2.0",
"@nebular/auth": "^12.0.0",
Expand Down
77 changes: 59 additions & 18 deletions apps/gauzy/src/app/pages/dashboard/dashboard.module.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
import { NgModule } from '@angular/core';
import {
NbAlertModule,
NbBadgeModule,
NbButtonModule,
NbCardModule,
NbDialogModule,
NbIconModule,
NbInputModule,
NbListModule,
NbPopoverModule,
NbProgressBarModule,
NbRouteTabsetModule,
NbSelectModule,
NbSpinnerModule,
NbToggleModule,
NbTooltipModule,
NbTreeGridModule
} from '@nebular/theme';
import { NgSelectModule } from '@ng-select/ng-select';
import { TranslateModule } from '@ngx-translate/core';
import { NgChartsModule } from 'ng2-charts';
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
import { NgxPermissionsModule } from 'ngx-permissions';
import { TranslateModule } from '@ngx-translate/core';
import { SwiperModule } from 'swiper/angular';
import {
ActivityItemModule,
CounterPointModule,
DynamicTabsModule,
GalleryModule,
InfoBlockModule,
LineChartModule,
NoDataMessageModule,
ProfitHistoryModule,
RecordsHistoryModule,
ScreenshotsItemModule,
SharedModule,
SingleStatisticModule,
TableComponentsModule,
TimezoneFilterModule,
WidgetLayoutModule,
WindowLayoutModule,
WorkInProgressModule
} from '@gauzy/ui-core/shared';
import { DashboardRoutingModule } from './dashboard-routing.module';
Expand All @@ -34,22 +48,32 @@ import { DataEntryShortcutsComponent } from './data-entry-shortcuts/data-entry-s
import { HumanResourcesComponent } from './human-resources/human-resources.component';
import { AccountingComponent } from './accounting/accounting.component';
import { ProjectManagementComponent } from './project-management/project-management.component';
import { EmployeeChartsModule } from './human-resources/employee-charts/employee-charts.module';
import { TimeTrackingModule } from './time-tracking/time-tracking.module';
import { ProjectManagementDetailsComponent } from './project-management/project-management-details/project-management-details.component';
import { TeamModule } from './team/team.module';
import { TimeTrackingComponent } from './time-tracking/time-tracking.component';
import {
EmployeeChartsComponent,
EmployeeDoughnutChartComponent,
EmployeeHorizontalBarChartComponent,
EmployeeStackedBarChartComponent
} from './employee-charts';
import { AllTeamComponent, ChartComponent, TeamCardComponent, TeamComponent, TeamMemberComponent } from './team';

// NB Modules
const NB_MODULES = [
NbAlertModule,
NbBadgeModule,
NbButtonModule,
NbCardModule,
NbDialogModule.forChild(),
NbIconModule,
NbInputModule,
NbListModule,
NbPopoverModule,
NbProgressBarModule,
NbRouteTabsetModule,
NbSelectModule,
NbSpinnerModule,
NbToggleModule,
NbTooltipModule,
NbTreeGridModule
];
Expand All @@ -60,9 +84,31 @@ const THIRD_PARTY_MODULES = [
LineChartModule,
NgSelectModule,
NgxPermissionsModule.forChild(),
NgChartsModule,
SwiperModule,
TranslateModule.forChild()
];

// Components
const COMPONENTS = [
DashboardComponent,
DataEntryShortcutsComponent,
AccountingComponent,
HumanResourcesComponent,
ProjectManagementComponent,
ProjectManagementDetailsComponent,
TimeTrackingComponent,
EmployeeChartsComponent,
EmployeeHorizontalBarChartComponent,
EmployeeStackedBarChartComponent,
EmployeeDoughnutChartComponent,
TeamComponent,
TeamCardComponent,
TeamMemberComponent,
ChartComponent,
AllTeamComponent
];

@NgModule({
imports: [
DashboardRoutingModule,
Expand All @@ -71,26 +117,21 @@ const THIRD_PARTY_MODULES = [
// Feature Modules
RecordsHistoryModule,
ProfitHistoryModule,
EmployeeChartsModule,
SingleStatisticModule,
InfoBlockModule,
TimeTrackingModule,
TeamModule,
// Shared Modules
SharedModule,
TableComponentsModule,
NoDataMessageModule,
WorkInProgressModule,
// Custom Modules
DynamicTabsModule
ActivityItemModule,
CounterPointModule,
DynamicTabsModule,
GalleryModule,
ScreenshotsItemModule,
TimezoneFilterModule,
WidgetLayoutModule,
WindowLayoutModule
],
declarations: [
DashboardComponent,
AccountingComponent,
HumanResourcesComponent,
DataEntryShortcutsComponent,
ProjectManagementComponent,
ProjectManagementDetailsComponent
]
declarations: [...COMPONENTS]
})
export class DashboardModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ export class EmployeeChartsComponent implements OnInit {
selectedChart = EmployeeChartEnum.BAR;
EmployeeChartEnum: typeof EmployeeChartEnum = EmployeeChartEnum;

@Input() employeeStatistics: IMonthAggregatedEmployeeStatistics[];

constructor() {}
@Input() employeeStatistics: IMonthAggregatedEmployeeStatistics[] = [];

ngOnInit() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { debounceTime, filter, tap } from 'rxjs/operators';
import { BaseChartDirective } from 'ng2-charts';
import { ChartConfiguration, ChartType } from 'chart.js';
import { environment } from '@gauzy/ui-config';
import { TranslationBaseComponent } from '@gauzy/ui-core/i18n';
import { CurrencyPosition, IMonthAggregatedEmployeeStatistics, IOrganization } from '@gauzy/contracts';
import { distinctUntilChange } from '@gauzy/ui-core/common';
import { CurrencyPositionPipe } from '@gauzy/ui-core/shared';
import { Store, months } from '@gauzy/ui-core/core';
import { TranslationBaseComponent } from '@gauzy/ui-core/i18n';
import { CurrencyPositionPipe } from '@gauzy/ui-core/shared';

@UntilDestroy({ checkProperties: true })
@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import { TranslateService } from '@ngx-translate/core';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { monthNames } from '@gauzy/ui-core/core';
import { IMonthAggregatedEmployeeStatistics } from '@gauzy/contracts';
import { monthNames } from '@gauzy/ui-core/core';
import { TranslationBaseComponent } from '@gauzy/ui-core/i18n';

@UntilDestroy()
Expand Down
4 changes: 4 additions & 0 deletions apps/gauzy/src/app/pages/dashboard/employee-charts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './employee-charts.component';
export * from './employee-stacked-bar-chart/employee-stacked-bar-chart.component';
export * from './employee-doughnut-chart/employee-doughnut-chart.component';
export * from './employee-horizontal-bar-chart/employee-horizontal-bar-chart.component';

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
</div>
</ng-container>
<ng-template [ngIf]="!tasks?.length">
<ngx-no-data-message
[message]="'REPORT_PAGE.NO_TASK' | translate"
></ngx-no-data-message>
<ngx-no-data-message [message]="'REPORT_PAGE.NO_TASK' | translate"></ngx-no-data-message>
</ng-template>
</div>
<div *ngxPermissionsOnly="[permissions.ORG_TASK_ADD]" (click)="addTodo()" class="more">
Expand All @@ -51,10 +49,7 @@
</nb-card-body>
</nb-card>
<div class="last-column">
<nb-card
[ngStyle]="{ 'height': !selectedEmployeeId ? '100%' : '' }"
class="projects"
>
<nb-card [ngStyle]="{ height: !selectedEmployeeId ? '100%' : '' }" class="projects">
<nb-card-header>
{{ 'DASHBOARD_PAGE.MOST_VIEW_PROJECTS' | translate }}
</nb-card-header>
Expand All @@ -72,15 +67,11 @@
<div class="card-body-content">
<ng-container *ngFor="let project of projects">
<div class="card project">
<ngx-project
[rowData]="{ project: project }"
></ngx-project>
<ngx-project [rowData]="{ project: project }"></ngx-project>
</div>
</ng-container>
<ng-template [ngIf]="!projects?.length">
<ngx-no-data-message
[message]="'TIMESHEET.NO_PROJECT' | translate"
></ngx-no-data-message>
<ngx-no-data-message [message]="'TIMESHEET.NO_PROJECT' | translate"></ngx-no-data-message>
</ng-template>
</div>
</nb-card-body>
Expand All @@ -101,10 +92,7 @@
>
{{ 'BUTTONS.VIEW_ALL' | translate }}
</button>
<div
[ngStyle]="{'max-height': !isMyTask ? 'calc(100% - 28px)' : ''}"
class="card-body-content"
>
<div [ngStyle]="{ 'max-height': !isMyTask ? 'calc(100% - 28px)' : '' }" class="card-body-content">
<ng-container *ngFor="let task of assigned">
<div class="card assigned">
<div class="">
Expand Down
Loading
Loading