diff --git a/.cspell.json b/.cspell.json index 64d65a6dd21..ac11a3fefd1 100644 --- a/.cspell.json +++ b/.cspell.json @@ -408,7 +408,10 @@ "SCALEWAY", "VULTR", "Codegen", - "icns" + "icns", + "pantone" + "openai", + "OPENAI" ], "useGitignore": true, "ignorePaths": [ diff --git a/.github/workflows/deploy-render-demo.yml b/.github/workflows/deploy-render-demo.yml index 8b52e977d0a..a17117e8102 100644 --- a/.github/workflows/deploy-render-demo.yml +++ b/.github/workflows/deploy-render-demo.yml @@ -3,7 +3,7 @@ name: Deploy to Render Demo on: workflow_run: workflows: ['Build and Publish Docker Images Demo'] - branches: [develop, temp] + branches: [render] types: - completed diff --git a/apps/desktop-timer/src/index.ts b/apps/desktop-timer/src/index.ts index 0538b7750a2..be90885441b 100644 --- a/apps/desktop-timer/src/index.ts +++ b/apps/desktop-timer/src/index.ts @@ -391,9 +391,13 @@ app.on('ready', async () => { API_BASE_URL: getApiBaseUrl(configs || {}), IS_INTEGRATED_DESKTOP: configs?.isLocalServer, }; - splashScreen = new SplashScreen(pathWindow.timeTrackerUi); - await splashScreen.loadURL(); - splashScreen.show(); + try { + splashScreen = new SplashScreen(pathWindow.timeTrackerUi); + await splashScreen.loadURL(); + splashScreen.show(); + } catch (error) { + console.error(error); + } if (!settings) { launchAtStartup(true, false); } diff --git a/apps/gauzy/src/app/@core/services/gauzy-ai/gauzy-ai.service.ts b/apps/gauzy/src/app/@core/services/gauzy-ai/gauzy-ai.service.ts index 72c65f3b884..e6bc0ea4fc3 100644 --- a/apps/gauzy/src/app/@core/services/gauzy-ai/gauzy-ai.service.ts +++ b/apps/gauzy/src/app/@core/services/gauzy-ai/gauzy-ai.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs/internal/Observable'; -import { IIntegrationKeySecretPairInput, IIntegrationTenant } from '@gauzy/contracts'; +import { IIntegrationAICreateInput, IIntegrationTenant } from '@gauzy/contracts'; import { API_PREFIX } from '../../constants'; @Injectable({ @@ -18,7 +18,7 @@ export class GauzyAIService { * @param input * @returns */ - addIntegration(input: IIntegrationKeySecretPairInput): Observable { + create(input: IIntegrationAICreateInput): Observable { return this._http.post(`${API_PREFIX}/integration/gauzy-ai`, input); } } diff --git a/apps/gauzy/src/app/@core/services/integrations.service.ts b/apps/gauzy/src/app/@core/services/integrations.service.ts index ed638c253e0..2fefedf3399 100644 --- a/apps/gauzy/src/app/@core/services/integrations.service.ts +++ b/apps/gauzy/src/app/@core/services/integrations.service.ts @@ -71,16 +71,17 @@ export class IntegrationsService { } /** + * Get an IntegrationTenant by ID with optional relations. * - * @param integrationId - * @param relations - * @returns + * @param id - The ID of the IntegrationTenant. + * @param relations - Optional relations for the request. + * @returns {Observable} An Observable of the HTTP response. */ - fetchIntegrationTenant( - integrationId: IIntegrationTenant['id'], + getIntegrationTenant( + id: IIntegrationTenant['id'], relations: IBaseRelationsEntityModel - ) { - return this._http.get(`${API_PREFIX}/integration-tenant/${integrationId}`, { + ): Observable { + return this._http.get(`${API_PREFIX}/integration-tenant/${id}`, { params: toParams({ ...relations }) }); } diff --git a/apps/gauzy/src/app/@shared/directives/index.ts b/apps/gauzy/src/app/@shared/directives/index.ts index bddabe95279..162dd9daa19 100755 --- a/apps/gauzy/src/app/@shared/directives/index.ts +++ b/apps/gauzy/src/app/@shared/directives/index.ts @@ -6,6 +6,7 @@ import { UnderConstructionDirective } from './under-construction.directive'; import { ReadMoreDirective } from './read-more'; import { TimeTrackingAuthorizedDirective } from './time-tracking-authorized-directive'; import { NoSpaceEdgesDirective } from './no-space-edges.directive'; +import { TextMaskDirective } from './text-mask.directive'; export const DIRECTIVES = [ AutocompleteOffDirective, @@ -16,4 +17,5 @@ export const DIRECTIVES = [ OutsideDirective, UnderConstructionDirective, NoSpaceEdgesDirective, + TextMaskDirective ]; diff --git a/apps/gauzy/src/app/@shared/directives/text-mask.directive.ts b/apps/gauzy/src/app/@shared/directives/text-mask.directive.ts new file mode 100644 index 00000000000..73788bbed9b --- /dev/null +++ b/apps/gauzy/src/app/@shared/directives/text-mask.directive.ts @@ -0,0 +1,69 @@ +import { Directive, ElementRef, Renderer2, Input } from '@angular/core'; + +// Interface representing the configuration for text masking +interface IMaskConfig { + text: string; + showOriginal: boolean; + replacement: number; +} + +@Directive({ + selector: '[gaTextMask]' +}) +export class TextMaskDirective { + // Default configuration for text masking + private readonly _config: IMaskConfig = { + text: '', + showOriginal: false, + replacement: 0.5 + }; + + // Constructor to inject dependencies + constructor( + private readonly el: ElementRef, + private readonly renderer: Renderer2 + ) { } + + // Apply the configured text mask to the element + private applyTextMask(): void { + // Get the text based on the showOriginal configuration + const text = this.config.showOriginal ? this.config.text : this.maskText(this.config.text); + + // Set the masked or original text to the element's inner text + this.renderer.setProperty(this.el.nativeElement, 'innerText', text); + } + + // Mask the given text based on the configured replacement percentage + private maskText(value: string): string { + // If text is not provided, return an empty string + if (!value) { + return ''; + } + + // Convert the text into an array of characters + const text = value.split(''); + + // Replace the specified percentage of characters with asterisks ('*') + for (let i = 0; i < Math.floor(this.config.replacement * text.length); i++) { + text[i] = '*'; + } + + // Join the array back into a string and return the masked text + return text.join(''); + } + + // Getter for the current configuration + public get config(): IMaskConfig { + return this._config; + } + + // Setter for updating the configuration and applying the text mask + @Input() + public set config(partialConfig: Partial) { + // Merge the provided partial configuration with the default configuration + Object.assign(this._config, partialConfig); + + // Apply the text mask with the updated configuration + this.applyTextMask(); + } +} diff --git a/apps/gauzy/src/app/@shared/gallery/gallery.component.html b/apps/gauzy/src/app/@shared/gallery/gallery.component.html index df3bb782ecd..26eee4c0943 100755 --- a/apps/gauzy/src/app/@shared/gallery/gallery.component.html +++ b/apps/gauzy/src/app/@shared/gallery/gallery.component.html @@ -2,7 +2,17 @@
diff --git a/apps/gauzy/src/app/pages/employees/timesheet/weekly/weekly/weekly.component.scss b/apps/gauzy/src/app/pages/employees/timesheet/weekly/weekly/weekly.component.scss index 6685be66fe4..531387f9928 100644 --- a/apps/gauzy/src/app/pages/employees/timesheet/weekly/weekly/weekly.component.scss +++ b/apps/gauzy/src/app/pages/employees/timesheet/weekly/weekly/weekly.component.scss @@ -41,9 +41,14 @@ color: nb-theme(gauzy-text-color-2); background: var(--gauzy-card-4); border-radius: nb-theme(border-radius); - padding: 3px; - height: 42px; + padding: 10px; padding-left: 12px; + flex-wrap: nowrap; + + .project-name { + flex: 0 0 20%; + max-width: 20%; + } } nb-card-body { diff --git a/apps/gauzy/src/app/pages/integrations/gauzy-ai/components/authorization/authorization.component.html b/apps/gauzy/src/app/pages/integrations/gauzy-ai/components/authorization/authorization.component.html index 0779dc76516..8a11ec43544 100644 --- a/apps/gauzy/src/app/pages/integrations/gauzy-ai/components/authorization/authorization.component.html +++ b/apps/gauzy/src/app/pages/integrations/gauzy-ai/components/authorization/authorization.component.html @@ -13,7 +13,7 @@
-
+
+
+ + +
-