diff --git a/package-lock.json b/package-lock.json index ce8b605..45c2168 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@openapitools/openapi-generator-cli": "^2.25.2", "@tailwindcss/postcss": "^4.1.17", "@tailwindcss/vite": "^4.1.17", + "browser-image-compression": "^2.0.2", "ng-zorro-antd": "^20.4.0", "postcss": "^8.5.6", "rxjs": "~7.8.0", @@ -4432,6 +4433,15 @@ "node": ">=8" } }, + "node_modules/browser-image-compression": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/browser-image-compression/-/browser-image-compression-2.0.2.tgz", + "integrity": "sha512-pBLlQyUf6yB8SmmngrcOw3EoS4RpQ1BcylI3T9Yqn7+4nrQTXJD4sJDe5ODnJdrvNMaio5OicFo75rDyJD2Ucw==", + "license": "MIT", + "dependencies": { + "uzip": "0.20201231.0" + } + }, "node_modules/browserslist": { "version": "4.28.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", @@ -9962,6 +9972,12 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/uzip": { + "version": "0.20201231.0", + "resolved": "https://registry.npmjs.org/uzip/-/uzip-0.20201231.0.tgz", + "integrity": "sha512-OZeJfZP+R0z9D6TmBgLq2LHzSSptGMGDGigGiEe0pr8UBe/7fdflgHlHBNDASTXB5jnFuxHpNaJywSg8YFeGng==", + "license": "MIT" + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", diff --git a/package.json b/package.json index 5b9e439..f329542 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@openapitools/openapi-generator-cli": "^2.25.2", "@tailwindcss/postcss": "^4.1.17", "@tailwindcss/vite": "^4.1.17", + "browser-image-compression": "^2.0.2", "ng-zorro-antd": "^20.4.0", "postcss": "^8.5.6", "rxjs": "~7.8.0", diff --git a/src/app/components/setting-form/setting-form.html b/src/app/components/setting-form/setting-form.html index bfb98c5..6cb89bd 100644 --- a/src/app/components/setting-form/setting-form.html +++ b/src/app/components/setting-form/setting-form.html @@ -1,16 +1,21 @@ -
+
- logo + @if (settings().logo) { + + } @else { + logo + }
Logo - - + +
@@ -19,17 +24,21 @@
- logo + @if (settings().electronicSignature) { + + } @else { + logo + }
Signature - - + +
- diff --git a/src/app/components/setting-form/setting-form.ts b/src/app/components/setting-form/setting-form.ts index a61157d..7d13726 100644 --- a/src/app/components/setting-form/setting-form.ts +++ b/src/app/components/setting-form/setting-form.ts @@ -1,9 +1,13 @@ -import {Component} from '@angular/core'; +import {Component, inject, OnInit, signal} from '@angular/core'; import {FormControl, FormGroup, FormsModule, ReactiveFormsModule} from "@angular/forms"; import {NzColDirective} from "ng-zorro-antd/grid"; import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form"; import {NzInputDirective} from "ng-zorro-antd/input"; import {SettingInfo} from "../../interfaces/setting.interface"; +import {firstValueFrom} from "rxjs"; +import {GetSettingDto, SettingsService} from "../../services/api"; +import {NzNotificationService} from "ng-zorro-antd/notification"; +import imageCompression from "browser-image-compression"; @Component({ selector: 'app-setting-form', @@ -15,30 +19,68 @@ import {SettingInfo} from "../../interfaces/setting.interface"; NzFormItemComponent, NzFormLabelComponent, NzInputDirective, - ReactiveFormsModule + ReactiveFormsModule, ], templateUrl: './setting-form.html', styleUrl: './setting-form.css', }) -export class SettingForm { - settingForm: FormGroup = new FormGroup({ - logo: new FormControl(null), - signature: new FormControl(null) - }) +export class SettingForm implements OnInit { + private settingsService = inject(SettingsService); + private notificationService = inject(NzNotificationService); - submitForm() { - // Pour annuler si le formulaire est invalide - if (this.settingForm.invalid) return; - - // Pour obtenir la valeur du formulaire - console.log(this.settingForm.getRawValue()) - - // Pour vider le formulaire - this.settingForm.reset() - } + settings = signal({}); setting: SettingInfo = { logo: 'https://www.pyro-fetes.com/wp-content/themes/pcptheme/img/logo-pyro-fetes-OR-top.png', - signature: 'https://www.pyro-fetes.com/wp-content/themes/pcptheme/img/logo-pyro-fetes-OR-top.png' + electronicSignature: 'https://www.pyro-fetes.com/wp-content/themes/pcptheme/img/logo-pyro-fetes-OR-top.png' + } + + settingForm: FormGroup = new FormGroup({ + logo: new FormControl(null), + electronicSignature: new FormControl(null) + }) + + async ngOnInit() { + await this.fetchSettings(); + } + + async fetchSettings() { + try { + const settingsPicture = await firstValueFrom(this.settingsService.getSettingEndpoint()); + this.settings.set(settingsPicture); + } catch { + this.notificationService.error( + 'Erreur', + 'Aucun paramètre défini' + ) + } + } + + async onFileChange(control: string, files?: FileList | null) { + if (!files?.length) return; + + const file = files[0]; + + const options = { + maxSizeMB: 1, + maxWidthOrHeight: 1080, + useWebWorker: true, + fileType: 'image/jpeg' + } + + const compressed = await imageCompression(file, options); + + try { + if (control === 'logo') { + await firstValueFrom(this.settingsService.patchSettingLogoEndpoint(compressed)); + } else { + await firstValueFrom(this.settingsService.patchSettingElectronicSignatureEndpoint(compressed)); + } + await this.fetchSettings(); + } catch { + this.notificationService.error('Erreur', "Erreur de communication avec l'API"); + } + + this.settingForm.reset(); } } diff --git a/src/app/interfaces/setting.interface.ts b/src/app/interfaces/setting.interface.ts index 4882359..2171a7c 100644 --- a/src/app/interfaces/setting.interface.ts +++ b/src/app/interfaces/setting.interface.ts @@ -1,4 +1,4 @@ export interface SettingInfo { logo: string; - signature: string; + electronicSignature: string; } \ No newline at end of file diff --git a/src/app/services/api/.openapi-generator/FILES b/src/app/services/api/.openapi-generator/FILES index 6103f04..be3ab3e 100644 --- a/src/app/services/api/.openapi-generator/FILES +++ b/src/app/services/api/.openapi-generator/FILES @@ -28,7 +28,6 @@ model/create-purchase-order-dto.ts model/create-purchase-order-product-dto.ts model/create-purchase-product-dto.ts model/create-quotation-dto.ts -model/create-setting-dto.ts model/create-supplier-dto.ts model/create-user-dto.ts model/get-deliverer-dto.ts @@ -55,8 +54,6 @@ model/patch-purchase-product-quantity-dto.ts model/patch-quotation-conditions-sale-dto.ts model/patch-quotation-message-dto.ts model/patch-quotation-product-quantity-dto.ts -model/patch-setting-electronic-signature-dto.ts -model/patch-setting-logo-dto.ts model/patch-supplier-delivery-delay-dto.ts model/patch-user-password-dto.ts model/patch-ware-house-product-quantity-dto.ts diff --git a/src/app/services/api/api/settings.service.ts b/src/app/services/api/api/settings.service.ts index 1bbecf8..603198f 100644 --- a/src/app/services/api/api/settings.service.ts +++ b/src/app/services/api/api/settings.service.ts @@ -17,14 +17,8 @@ import { import {CustomHttpParameterCodec} from '../encoder'; import {Observable} from 'rxjs'; -// @ts-ignore -import {CreateSettingDto} from '../model/create-setting-dto'; // @ts-ignore import {GetSettingDto} from '../model/get-setting-dto'; -// @ts-ignore -import {PatchSettingElectronicSignatureDto} from '../model/patch-setting-electronic-signature-dto'; -// @ts-ignore -import {PatchSettingLogoDto} from '../model/patch-setting-logo-dto'; // @ts-ignore import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; @@ -42,188 +36,30 @@ export class SettingsService extends BaseService { } /** - * @endpoint post /API/settings - * @param createSettingDto + * @endpoint get /API/settings * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'body', reportProgress?: boolean, options?: { - httpHeaderAccept?: undefined, - context?: HttpContext, - transferCache?: boolean - }): Observable; - public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'response', reportProgress?: boolean, options?: { - httpHeaderAccept?: undefined, - context?: HttpContext, - transferCache?: boolean - }): Observable>; - public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'events', reportProgress?: boolean, options?: { - httpHeaderAccept?: undefined, - context?: HttpContext, - transferCache?: boolean - }): Observable>; - public createSettingEndpoint(createSettingDto: CreateSettingDto, observe: any = 'body', reportProgress: boolean = false, options?: { - httpHeaderAccept?: undefined, - context?: HttpContext, - transferCache?: boolean - }): Observable { - if (createSettingDto === null || createSettingDto === undefined) { - throw new Error('Required parameter createSettingDto was null or undefined when calling createSettingEndpoint.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/API/settings`; - const {basePath, withCredentials} = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createSettingDto, - responseType: responseType_, - ...(withCredentials ? {withCredentials} : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), - reportProgress: reportProgress - } - ); - } - - /** - * @endpoint delete /API/settings/{id} - * @param id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteSettingEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { - httpHeaderAccept?: undefined, - context?: HttpContext, - transferCache?: boolean - }): Observable; - public deleteSettingEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { - httpHeaderAccept?: undefined, - context?: HttpContext, - transferCache?: boolean - }): Observable>; - public deleteSettingEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { - httpHeaderAccept?: undefined, - context?: HttpContext, - transferCache?: boolean - }): Observable>; - public deleteSettingEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { - httpHeaderAccept?: undefined, - context?: HttpContext, - transferCache?: boolean - }): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteSettingEndpoint.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/API/settings/${this.configuration.encodeParam({ - name: "id", - value: id, - in: "path", - style: "simple", - explode: false, - dataType: "number", - dataFormat: "int32" - })}`; - const {basePath, withCredentials} = this.configuration; - return this.httpClient.request('delete', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? {withCredentials} : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), - reportProgress: reportProgress - } - ); - } - - /** - * @endpoint get /API/settings/{id} - * @param id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSettingEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + public getSettingEndpoint(observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean }): Observable; - public getSettingEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + public getSettingEndpoint(observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean }): Observable>; - public getSettingEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + public getSettingEndpoint(observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean }): Observable>; - public getSettingEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + public getSettingEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean }): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getSettingEndpoint.'); - } let localVarHeaders = this.defaultHeaders; @@ -250,15 +86,7 @@ export class SettingsService extends BaseService { } } - let localVarPath = `/API/settings/${this.configuration.encodeParam({ - name: "id", - value: id, - in: "path", - style: "simple", - explode: false, - dataType: "number", - dataFormat: "int32" - })}`; + let localVarPath = `/API/settings`; const {basePath, withCredentials} = this.configuration; return this.httpClient.request('get', `${basePath}${localVarPath}`, { @@ -274,38 +102,31 @@ export class SettingsService extends BaseService { } /** - * @endpoint patch /API/settings/{id}/ElectronicSignature - * @param id - * @param patchSettingElectronicSignatureDto + * @endpoint patch /API/settings/electronicSignature + * @param electronicSignature * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'body', reportProgress?: boolean, options?: { + public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean }): Observable; - public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'response', reportProgress?: boolean, options?: { + public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean }): Observable>; - public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'events', reportProgress?: boolean, options?: { + public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean }): Observable>; - public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe: any = 'body', reportProgress: boolean = false, options?: { + public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean }): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling patchSettingElectronicSignatureEndpoint.'); - } - if (patchSettingElectronicSignatureDto === null || patchSettingElectronicSignatureDto === undefined) { - throw new Error('Required parameter patchSettingElectronicSignatureDto was null or undefined when calling patchSettingElectronicSignatureEndpoint.'); - } let localVarHeaders = this.defaultHeaders; @@ -318,14 +139,27 @@ export class SettingsService extends BaseService { const localVarTransferCache: boolean = options?.transferCache ?? true; - // to determine the Content-Type header const consumes: string[] = [ - 'application/json' + 'multipart/form-data' ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + // use FormData to transmit files using content-type "multipart/form-data" + // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data + localVarUseForm = canConsumeForm; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (electronicSignature !== undefined) { + localVarFormParams = localVarFormParams.append('electronicSignature', electronicSignature) as any || localVarFormParams; } let responseType_: 'text' | 'json' | 'blob' = 'json'; @@ -339,20 +173,12 @@ export class SettingsService extends BaseService { } } - let localVarPath = `/API/settings/${this.configuration.encodeParam({ - name: "id", - value: id, - in: "path", - style: "simple", - explode: false, - dataType: "number", - dataFormat: "int32" - })}/ElectronicSignature`; + let localVarPath = `/API/settings/electronicSignature`; const {basePath, withCredentials} = this.configuration; return this.httpClient.request('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, - body: patchSettingElectronicSignatureDto, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, @@ -364,38 +190,31 @@ export class SettingsService extends BaseService { } /** - * @endpoint patch /API/settings/{id}/logo - * @param id - * @param patchSettingLogoDto + * @endpoint patch /API/settings/logo + * @param logo * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'body', reportProgress?: boolean, options?: { + public patchSettingLogoEndpoint(logo?: Blob, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean }): Observable; - public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'response', reportProgress?: boolean, options?: { + public patchSettingLogoEndpoint(logo?: Blob, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean }): Observable>; - public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'events', reportProgress?: boolean, options?: { + public patchSettingLogoEndpoint(logo?: Blob, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean }): Observable>; - public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe: any = 'body', reportProgress: boolean = false, options?: { + public patchSettingLogoEndpoint(logo?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean }): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling patchSettingLogoEndpoint.'); - } - if (patchSettingLogoDto === null || patchSettingLogoDto === undefined) { - throw new Error('Required parameter patchSettingLogoDto was null or undefined when calling patchSettingLogoEndpoint.'); - } let localVarHeaders = this.defaultHeaders; @@ -408,14 +227,27 @@ export class SettingsService extends BaseService { const localVarTransferCache: boolean = options?.transferCache ?? true; - // to determine the Content-Type header const consumes: string[] = [ - 'application/json' + 'multipart/form-data' ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + // use FormData to transmit files using content-type "multipart/form-data" + // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data + localVarUseForm = canConsumeForm; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (logo !== undefined) { + localVarFormParams = localVarFormParams.append('logo', logo) as any || localVarFormParams; } let responseType_: 'text' | 'json' | 'blob' = 'json'; @@ -429,20 +261,12 @@ export class SettingsService extends BaseService { } } - let localVarPath = `/API/settings/${this.configuration.encodeParam({ - name: "id", - value: id, - in: "path", - style: "simple", - explode: false, - dataType: "number", - dataFormat: "int32" - })}/logo`; + let localVarPath = `/API/settings/logo`; const {basePath, withCredentials} = this.configuration; return this.httpClient.request('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, - body: patchSettingLogoDto, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, diff --git a/src/app/services/api/model/create-setting-dto.ts b/src/app/services/api/model/create-setting-dto.ts deleted file mode 100644 index 22ab41f..0000000 --- a/src/app/services/api/model/create-setting-dto.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * PyroFetes - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface CreateSettingDto { - electronicSignature?: Blob | null; - logo?: Blob | null; -} - diff --git a/src/app/services/api/model/models.ts b/src/app/services/api/model/models.ts index ca69a14..5b2b4e5 100644 --- a/src/app/services/api/model/models.ts +++ b/src/app/services/api/model/models.ts @@ -8,7 +8,6 @@ export * from './create-purchase-order-dto'; export * from './create-purchase-order-product-dto'; export * from './create-purchase-product-dto'; export * from './create-quotation-dto'; -export * from './create-setting-dto'; export * from './create-supplier-dto'; export * from './create-user-dto'; export * from './get-deliverer-dto'; @@ -34,8 +33,6 @@ export * from './patch-purchase-product-quantity-dto'; export * from './patch-quotation-conditions-sale-dto'; export * from './patch-quotation-message-dto'; export * from './patch-quotation-product-quantity-dto'; -export * from './patch-setting-electronic-signature-dto'; -export * from './patch-setting-logo-dto'; export * from './patch-supplier-delivery-delay-dto'; export * from './patch-user-password-dto'; export * from './patch-ware-house-product-quantity-dto'; diff --git a/src/app/services/api/model/patch-setting-electronic-signature-dto.ts b/src/app/services/api/model/patch-setting-electronic-signature-dto.ts deleted file mode 100644 index 4b352b5..0000000 --- a/src/app/services/api/model/patch-setting-electronic-signature-dto.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * PyroFetes - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface PatchSettingElectronicSignatureDto { - electronicSignature?: Blob | null; -} - diff --git a/src/app/services/api/model/patch-setting-logo-dto.ts b/src/app/services/api/model/patch-setting-logo-dto.ts deleted file mode 100644 index 29f2ef8..0000000 --- a/src/app/services/api/model/patch-setting-logo-dto.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * PyroFetes - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface PatchSettingLogoDto { - logo?: Blob | null; -} -