Skip to content

Release #8232

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

Merged
merged 8 commits into from
Sep 18, 2024
4 changes: 2 additions & 2 deletions apps/desktop-timer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"devDependencies": {
"@electron/rebuild": "^3.2.10",
"@types/moment-duration-format": "^2.2.3",
"electron": "28.1.0",
"electron-builder": "^24.6.4",
"electron": "^30.0.1",
"electron-builder": "^24.13.3",
"electron-installer-dmg": "^4.0.0",
"electron-packager": "^17.1.1",
"electron-reload": "~1.5.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"devDependencies": {
"@electron/rebuild": "^3.2.10",
"@types/moment-duration-format": "^2.2.3",
"electron": "28.1.0",
"electron-builder": "^24.6.4",
"electron": "^30.0.1",
"electron-builder": "^24.13.3",
"electron-installer-dmg": "^4.0.0",
"electron-packager": "^17.1.1",
"electron-reload": "~1.5.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/server-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"devDependencies": {
"@electron/rebuild": "^3.2.10",
"@types/moment-duration-format": "^2.2.3",
"electron": "28.1.0",
"electron-builder": "^24.6.4",
"electron": "^30.0.1",
"electron-builder": "^24.13.3",
"electron-installer-dmg": "^4.0.0",
"electron-packager": "^17.1.1",
"electron-reload": "~1.5.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"devDependencies": {
"@electron/rebuild": "^3.2.10",
"@types/moment-duration-format": "^2.2.3",
"electron": "28.1.0",
"electron-builder": "^24.6.4",
"electron": "^30.0.1",
"electron-builder": "^24.13.3",
"electron-installer-dmg": "^4.0.0",
"electron-packager": "^17.1.1",
"electron-reload": "~1.5.0",
Expand Down
80 changes: 40 additions & 40 deletions package.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/desktop-libs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
"devDependencies": {
"@types/node": "^20.14.9",
"@types/unzipper": "^0.10.9",
"electron": "28.1.0"
"electron": "^30.0.1"
}
}
12 changes: 6 additions & 6 deletions packages/desktop-libs/src/lib/desktop-ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ export function ipcMainHandler(store, startServer, knex, config, timeTrackerWind
}
});

ipcMain.handle('TAKE_SCREEN_CAPTURE', async (event, { quitApp }) => {
ipcMain.handle('COLLECT_ACTIVITIES', async (event, { quitApp }) => {
try {
log.info('Take Screen Capture');
return await timerHandler.makeScreenshot(knex, quitApp);
log.info('Collect Activities');
return await timerHandler.collectAllActivities(knex, quitApp);
} catch (error) {
log.error('Error on take screen capture', error);
throw new UIError('500', error, 'IPCTKSCAPTURE');
log.error('Error collecting activities', error);
throw new UIError('500', error, 'HANDLE ACTIVITIES');
}
});

Expand Down Expand Up @@ -1195,7 +1195,7 @@ export function removeAllHandlers() {
'UPDATE_SYNCED',
'DESKTOP_CAPTURER_GET_SOURCES',
'FINISH_SYNCED_TIMER',
'TAKE_SCREEN_CAPTURE',
'COLLECT_ACTIVITIES',
'START_SERVER'
];
channels.forEach((channel: string) => {
Expand Down
8 changes: 4 additions & 4 deletions packages/desktop-libs/src/lib/desktop-timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,19 +635,19 @@ export default class TimerHandler {
}

/*
* Make screenshots and activities after start and stop timer
* Collect All activities after start and stop timer
*/
async makeScreenshot(knex, quitApp) {
async collectAllActivities(knex, quitApp) {
console.log(`Time Slot Start/End At ${quitApp ? 'End' : 'Beginning'}`, this.timeSlotStart);

if (this.timeSlotStart) {
console.log('Make Screenshot Started for: ', this.timeSlotStart);
console.log('Collection Started At: ', this.timeSlotStart);
await this._activeWindow.updateActivities();
console.log('Updated Activities');

const activities = await this.getAllActivities(knex, this.timeSlotStart);

console.log('Make Screenshot Ended for: ', this.timeSlotStart);
console.log('Collection Ended At: ', this.timeSlotStart);

return activities;
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-ui-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@types/jest": "^29.4.4",
"@types/moment-duration-format": "^2.2.3",
"@types/node": "^20.14.9",
"electron": "28.1.0",
"electron": "^30.0.1",
"jest-preset-angular": "^13.1.4",
"tslint": "^6.1.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-ui-lib/src/lib/login/login.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@

::ng-deep {
nb-card-body {
padding: .5rem;
padding: 36px 0.5rem 0.5rem;
}

nb-card-header {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Injectable } from '@angular/core';
import { Store, StoreConfig } from '@datorama/akita';
import { ITimeLogFilters, TimeLogSourceEnum } from '@gauzy/contracts';
import { moment } from '../../shared/features/date-range-picker';

export type IRequestState = ITimeLogFilters;

export function createInitialState(): IRequestState {
return {
source: [TimeLogSourceEnum.DESKTOP],
logType: [],
timeZone: moment.tz.guess(),
activityLevel: {
start: 0,
end: 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Observable } from 'rxjs';
import { RequestQuery } from '../../+state/request/request.query';
import { Store, TimeTrackerDateManager, ToastrNotificationService } from '../../../services';
import { TimesheetService, TimesheetStatisticsService } from '../../services/timesheet';
import { moment } from '../../shared/features/date-range-picker';
import { IDateRangePicker } from '../../shared/features/date-range-picker/date-picker.interface';
import { MonthlyRecapQuery } from './monthly.query';
import { IMonthlyRecapState, MonthlyRecapStore } from './monthly.store';
Expand Down Expand Up @@ -51,7 +52,7 @@ export class MonthlyRecapService {
this.monthlyStore.setLoading(true);
const { organizationId, tenantId, user } = this.store;
const employeeIds = [user.employee.id];
const timeZone = user.timeZone;
const timeZone = user.timeZone || moment.tz.guess();
const timeFormat = user.timeFormat;
const request: IGetTimeLogInput = {
...this.requestQuery.request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
padding-bottom: 10px;
background-color: var(--gauzy-card-1);
border-radius: var(--border-radius);
height: calc(100vh - 23.75rem);
height: calc(100vh - 22.625rem);
overflow-y: auto;

.table-row-custom {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Observable } from 'rxjs';
import { RequestQuery } from '../../+state/request/request.query';
import { Store, TimeTrackerDateManager, ToastrNotificationService } from '../../../services';
import { TimesheetService, TimesheetStatisticsService } from '../../services/timesheet';
import { moment } from '../../shared/features/date-range-picker';
import { IDateRangePicker } from '../../shared/features/date-range-picker/date-picker.interface';
import { WeeklyRecapQuery } from './weekly.query';
import { IWeeklyRecapState, WeeklyRecapStore } from './weekly.store';
Expand Down Expand Up @@ -51,7 +52,7 @@ export class WeeklyRecapService {
this.weeklyStore.setLoading(true);
const { organizationId, tenantId, user } = this.store;
const employeeIds = [user.employee.id];
const timeZone = user.timeZone;
const timeZone = user.timeZone || moment.tz.guess();
const timeFormat = user.timeFormat;
const request: IGetTimeLogInput = {
...this.requestQuery.request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

.timer-window-container {
margin-top: 20px;
margin-top: 28px;
display: flex;
flex-direction: row;
align-items: flex-start;
Expand All @@ -36,7 +36,7 @@
.timer {
min-width: 360px !important;
width: auto;
height: calc(100vh - 2.5rem);
height: calc(100vh - 2.5rem - 23px);
overflow: hidden;

&.expanded {
Expand Down Expand Up @@ -633,14 +633,13 @@ img {
flex-direction: column;
padding: 8px 4px;
border-radius: var(--border-radius);
height: calc(100vh - 15.75rem);
height: calc(100vh - 16.25rem);
width: auto;

.table-scroll-container {
flex-grow: 10;
max-height: unset;
padding: 0 4px 0;
margin-bottom: 8px;
overflow-x: hidden;
}
}
Expand Down
Loading
Loading