First view of validating delivery
This commit is contained in:
@@ -2,18 +2,42 @@
|
||||
<input type="text" placeholder="Rechercher une livraison" class="search-input" (input)="search.set($any($event.target).value)"/>
|
||||
|
||||
<div class="livraisons-list">
|
||||
@for (deliveryItem of filteredLivraisons(); track deliveryItem.id) {
|
||||
@for (deliveryItem of filteredDeliveries(); track deliveryItem.id) {
|
||||
<div class="livraison-card">
|
||||
<div class="livraison-info">
|
||||
<h3>{{ deliveryItem.client }}</h3>
|
||||
<p class="mr-5">Date d'expédition: {{ deliveryItem.date }}</p>
|
||||
<p>Produits : {{ deliveryItem.produits }}</p>
|
||||
<h3>{{ deliveryItem.delivererTransporter }}</h3>
|
||||
<p class="mr-5">Date d'expédition: {{ deliveryItem.expeditionDate }}</p>
|
||||
<p>Produits : {{ deliveryItem.products }}</p>
|
||||
</div>
|
||||
|
||||
<button nz-button nzType="primary" [nzSize]="size" nzShape="round" (click)="validate(deliveryItem.id)">
|
||||
<nz-icon nzType="check" />
|
||||
Valider
|
||||
</button>
|
||||
<app-modal-nav name="Valider la livraison" nameIcon="check" (click)="validate(deliveryItem.id)">
|
||||
<nz-table
|
||||
#productsTable
|
||||
[nzData]="deliveryItem.products"
|
||||
[nzBordered]="true"
|
||||
[nzShowPagination]="false"
|
||||
nzSize="small">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Produit</th>
|
||||
<th class="text-right">Quantité</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@for (p of productsTable.data; track p) {
|
||||
<tr>
|
||||
<td>{{ p.productName }}</td>
|
||||
<td class="text-right">{{ p.quantity }}</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</nz-table>
|
||||
</app-modal-nav>
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -1,44 +1,65 @@
|
||||
import {Component, computed, signal} from '@angular/core';
|
||||
import {Component, computed, inject, OnInit, signal} from '@angular/core';
|
||||
import {NzButtonComponent, NzButtonSize} from "ng-zorro-antd/button";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
import {DeliverynotesService, GetDeliveryNoteDto} from "../../services/api";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {ModalButton} from "../modal-button/modal-button";
|
||||
import {ModalNav} from "../modal-nav/modal-nav";
|
||||
import {NzTableComponent} from "ng-zorro-antd/table";
|
||||
|
||||
@Component({
|
||||
selector: 'app-delivery-validator',
|
||||
imports: [
|
||||
NzButtonComponent,
|
||||
NzIconDirective
|
||||
NzIconDirective,
|
||||
ModalButton,
|
||||
ModalNav,
|
||||
NzTableComponent
|
||||
],
|
||||
templateUrl: './delivery-validator.html',
|
||||
styleUrl: './delivery-validator.css',
|
||||
})
|
||||
export class DeliveryValidator {
|
||||
export class DeliveryValidator implements OnInit {
|
||||
private deliveriesService = inject(DeliverynotesService);
|
||||
private notificationsService = inject(NzNotificationService);
|
||||
|
||||
size: NzButtonSize = 'large';
|
||||
search = signal('');
|
||||
|
||||
livraisons = signal([
|
||||
{ id: 1, client: 'Carrefour', date: '2025-02-03', produits: 12 },
|
||||
{ id: 2, client: 'Intermarché', date: '2025-02-04', produits: 8 },
|
||||
{ id: 3, client: 'Auchan', date: '2025-02-05', produits: 23 },
|
||||
{ id: 1, client: 'Carrefour', date: '2025-02-03', produits: 12 },
|
||||
{ id: 2, client: 'Intermarché', date: '2025-02-04', produits: 8 },
|
||||
{ id: 3, client: 'Auchan', date: '2025-02-05', produits: 23 },
|
||||
{ id: 1, client: 'Carrefour', date: '2025-02-03', produits: 12 },
|
||||
{ id: 2, client: 'Intermarché', date: '2025-02-04', produits: 8 },
|
||||
{ id: 3, client: 'Auchan', date: '2025-02-05', produits: 23 },
|
||||
{ id: 1, client: 'Carrefour', date: '2025-02-03', produits: 12 },
|
||||
{ id: 2, client: 'Intermarché', date: '2025-02-04', produits: 8 },
|
||||
{ id: 3, client: 'Auchan', date: '2025-02-05', produits: 23 }
|
||||
]);
|
||||
deliveries = signal<GetDeliveryNoteDto[]>(null);
|
||||
|
||||
filteredLivraisons = computed(() => {
|
||||
|
||||
async fetchDeliveries(){
|
||||
try{
|
||||
const deliveries = await firstValueFrom(this.deliveriesService.getAllDeliveryNoteEndpoint());
|
||||
this.deliveries.set(deliveries);
|
||||
}catch(e) {
|
||||
this.notificationsService.error(
|
||||
'Error',
|
||||
'Error fetching deliveries',
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
async ngOnInit(){
|
||||
await this.fetchDeliveries();
|
||||
}
|
||||
|
||||
filteredDeliveries = computed(() => {
|
||||
if(this.deliveries() == null){
|
||||
return
|
||||
}
|
||||
const query = this.search().toLowerCase();
|
||||
return this.livraisons().filter(l =>
|
||||
l.client.toLowerCase().includes(query) ||
|
||||
l.date.includes(query)
|
||||
return this.deliveries().filter(l =>
|
||||
l.delivererTransporter.toLowerCase().includes(query) ||
|
||||
l.estimateDeliveryDate.includes(query)
|
||||
);
|
||||
});
|
||||
|
||||
validate(id: number) {
|
||||
return
|
||||
|
||||
|
||||
validate(id) {
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-info-card color="#f59e0b" icon="inbox" [value]="productsUnderLimitCount()" description="Produits sous le seuil minimal."></app-info-card>
|
||||
<app-info-card color="#3b82f6" icon="team" [value]="deliversCount()+suppliersCount()" description="Partenaires actifs."></app-info-card>
|
||||
<app-info-card color="#10b981" icon="truck" [value]=deliversCount() description="Livreurs partenaires."></app-info-card>
|
||||
<app-info-card color="#ef4444" icon="shop" [value]="suppliersCount()" description="Fournisseurs travaillant avec nous."></app-info-card>
|
||||
<app-info-card color="#ef4444" icon="shop" [value]="suppliersCount()" description="Fournisseurs partenaires."></app-info-card>
|
||||
</div>
|
||||
|
||||
<div class="mt-10 flex gap-30">
|
||||
|
||||
@@ -24,7 +24,11 @@ model/connect-user-dto.ts
|
||||
model/create-deliverer-dto.ts
|
||||
model/create-delivery-note-dto.ts
|
||||
model/create-price-dto.ts
|
||||
model/create-product-quotation-dto.ts
|
||||
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-quotation-product-dto.ts
|
||||
model/create-setting-dto.ts
|
||||
model/create-supplier-dto.ts
|
||||
@@ -58,7 +62,9 @@ model/patch-supplier-delivery-delay-dto.ts
|
||||
model/patch-user-password-dto.ts
|
||||
model/patch-ware-house-product-quantity-dto.ts
|
||||
model/update-deliverer-dto.ts
|
||||
model/update-delivery-note-dto.ts
|
||||
model/update-product-dto.ts
|
||||
model/update-quotation-dto.ts
|
||||
model/update-supplier-dto.ts
|
||||
model/update-user-dto.ts
|
||||
param.ts
|
||||
|
||||
@@ -22,6 +22,8 @@ import { CreateDeliveryNoteDto } from '../model/create-delivery-note-dto';
|
||||
import { GetDeliveryNoteDto } from '../model/get-delivery-note-dto';
|
||||
// @ts-ignore
|
||||
import { PatchDeliveryNoteRealDeliveryDateDto } from '../model/patch-delivery-note-real-delivery-date-dto';
|
||||
// @ts-ignore
|
||||
import { UpdateDeliveryNoteDto } from '../model/update-delivery-note-dto';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
@@ -371,4 +373,72 @@ export class DeliverynotesService extends BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint put /API/deliveryNotes/{id}
|
||||
* @param id
|
||||
* @param updateDeliveryNoteDto
|
||||
* @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 updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetDeliveryNoteDto>;
|
||||
public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetDeliveryNoteDto>>;
|
||||
public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetDeliveryNoteDto>>;
|
||||
public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling updateDeliveryNoteEndpoint.');
|
||||
}
|
||||
if (updateDeliveryNoteDto === null || updateDeliveryNoteDto === undefined) {
|
||||
throw new Error('Required parameter updateDeliveryNoteDto was null or undefined when calling updateDeliveryNoteEndpoint.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
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/deliveryNotes/${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<GetDeliveryNoteDto>('put', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: updateDeliveryNoteDto,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ import { HttpClient, HttpHeaders, HttpParams,
|
||||
import { CustomHttpParameterCodec } from '../encoder';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
// @ts-ignore
|
||||
import { CreatePurchaseOrderDto } from '../model/create-purchase-order-dto';
|
||||
// @ts-ignore
|
||||
import { GetPurchaseOrderDto } from '../model/get-purchase-order-dto';
|
||||
// @ts-ignore
|
||||
@@ -37,6 +39,70 @@ export class PurchaseordersService extends BaseService {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint post /API/purchaseOrders
|
||||
* @param createPurchaseOrderDto
|
||||
* @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 createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetPurchaseOrderDto>;
|
||||
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetPurchaseOrderDto>>;
|
||||
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetPurchaseOrderDto>>;
|
||||
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (createPurchaseOrderDto === null || createPurchaseOrderDto === undefined) {
|
||||
throw new Error('Required parameter createPurchaseOrderDto was null or undefined when calling createPurchaseOrder.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
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/purchaseOrders`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetPurchaseOrderDto>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: createPurchaseOrderDto,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint delete /API/purchaseOrders/{id}
|
||||
* @param id
|
||||
|
||||
@@ -16,10 +16,14 @@ import { HttpClient, HttpHeaders, HttpParams,
|
||||
import { CustomHttpParameterCodec } from '../encoder';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
// @ts-ignore
|
||||
import { CreateQuotationDto } from '../model/create-quotation-dto';
|
||||
// @ts-ignore
|
||||
import { GetQuotationDto } from '../model/get-quotation-dto';
|
||||
// @ts-ignore
|
||||
import { PatchQuotationConditionsSaleDto } from '../model/patch-quotation-conditions-sale-dto';
|
||||
// @ts-ignore
|
||||
import { UpdateQuotationDto } from '../model/update-quotation-dto';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
@@ -37,6 +41,70 @@ export class QuotationsService extends BaseService {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint post /API/quotations
|
||||
* @param createQuotationDto
|
||||
* @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 createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetQuotationDto>;
|
||||
public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetQuotationDto>>;
|
||||
public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetQuotationDto>>;
|
||||
public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (createQuotationDto === null || createQuotationDto === undefined) {
|
||||
throw new Error('Required parameter createQuotationDto was null or undefined when calling createQuotationEndpoint.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
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/quotations`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetQuotationDto>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: createQuotationDto,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint delete /API/quotations/{id}
|
||||
* @param id
|
||||
@@ -305,4 +373,72 @@ export class QuotationsService extends BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint put /API/quotations/{id}
|
||||
* @param id
|
||||
* @param updateQuotationDto
|
||||
* @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 updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetQuotationDto>;
|
||||
public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetQuotationDto>>;
|
||||
public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetQuotationDto>>;
|
||||
public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling updateQuotationEndpoint.');
|
||||
}
|
||||
if (updateQuotationDto === null || updateQuotationDto === undefined) {
|
||||
throw new Error('Required parameter updateQuotationDto was null or undefined when calling updateQuotationEndpoint.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
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/quotations/${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<GetQuotationDto>('put', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: updateQuotationDto,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
16
src/app/services/api/model/create-product-quotation-dto.ts
Normal file
16
src/app/services/api/model/create-product-quotation-dto.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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 CreateProductQuotationDto {
|
||||
productId?: number;
|
||||
quantity?: number;
|
||||
}
|
||||
|
||||
17
src/app/services/api/model/create-purchase-order-dto.ts
Normal file
17
src/app/services/api/model/create-purchase-order-dto.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { CreatePurchaseOrderProductDto } from './create-purchase-order-product-dto';
|
||||
|
||||
|
||||
export interface CreatePurchaseOrderDto {
|
||||
purchaseConditions?: string | null;
|
||||
products?: Array<CreatePurchaseOrderProductDto> | null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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 CreatePurchaseOrderProductDto {
|
||||
productId?: number;
|
||||
quantity?: number;
|
||||
}
|
||||
|
||||
18
src/app/services/api/model/create-quotation-dto.ts
Normal file
18
src/app/services/api/model/create-quotation-dto.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { CreateProductQuotationDto } from './create-product-quotation-dto';
|
||||
|
||||
|
||||
export interface CreateQuotationDto {
|
||||
message?: string | null;
|
||||
conditionsSale?: string | null;
|
||||
products?: Array<CreateProductQuotationDto> | null;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface CreateQuotationProductDto {
|
||||
productName?: string | null;
|
||||
productDuration?: number;
|
||||
productCaliber?: number;
|
||||
productApprovalNumber?: number;
|
||||
productApprovalNumber?: string | null;
|
||||
productWeight?: number;
|
||||
productNec?: number;
|
||||
productImage?: string | null;
|
||||
|
||||
@@ -13,6 +13,6 @@ import { GetPurchaseProductDto } from './get-purchase-product-dto';
|
||||
export interface GetPurchaseOrderDto {
|
||||
id?: number;
|
||||
purchaseConditions?: string | null;
|
||||
getPurchaseProductDto?: Array<GetPurchaseProductDto> | null;
|
||||
products?: Array<GetPurchaseProductDto> | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export interface GetPurchaseProductDto {
|
||||
productName?: string | null;
|
||||
productDuration?: number;
|
||||
productCaliber?: number;
|
||||
productApprovalNumber?: number;
|
||||
productApprovalNumber?: string | null;
|
||||
productWeight?: number;
|
||||
productNec?: number;
|
||||
productImage?: string | null;
|
||||
|
||||
@@ -14,6 +14,6 @@ export interface GetQuotationDto {
|
||||
id?: number;
|
||||
message?: string | null;
|
||||
conditionsSale?: string | null;
|
||||
getQuotationProductDto?: Array<GetQuotationProductDto> | null;
|
||||
products?: Array<GetQuotationProductDto> | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface GetQuotationProductDto {
|
||||
productName?: string | null;
|
||||
productDuration?: number;
|
||||
productCaliber?: number;
|
||||
productApprovalNumber?: number;
|
||||
productApprovalNumber?: string | null;
|
||||
productWeight?: number;
|
||||
productNec?: number;
|
||||
productImage?: string | null;
|
||||
|
||||
@@ -2,7 +2,11 @@ export * from './connect-user-dto';
|
||||
export * from './create-deliverer-dto';
|
||||
export * from './create-delivery-note-dto';
|
||||
export * from './create-price-dto';
|
||||
export * from './create-product-quotation-dto';
|
||||
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-quotation-product-dto';
|
||||
export * from './create-setting-dto';
|
||||
export * from './create-supplier-dto';
|
||||
@@ -35,6 +39,8 @@ export * from './patch-supplier-delivery-delay-dto';
|
||||
export * from './patch-user-password-dto';
|
||||
export * from './patch-ware-house-product-quantity-dto';
|
||||
export * from './update-deliverer-dto';
|
||||
export * from './update-delivery-note-dto';
|
||||
export * from './update-product-dto';
|
||||
export * from './update-quotation-dto';
|
||||
export * from './update-supplier-dto';
|
||||
export * from './update-user-dto';
|
||||
|
||||
19
src/app/services/api/model/update-delivery-note-dto.ts
Normal file
19
src/app/services/api/model/update-delivery-note-dto.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* 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 UpdateDeliveryNoteDto {
|
||||
trackingNumber?: string | null;
|
||||
estimateDeliveryDate?: string;
|
||||
expeditionDate?: string;
|
||||
realDeliveryDate?: string | null;
|
||||
delivererId?: number;
|
||||
}
|
||||
|
||||
16
src/app/services/api/model/update-quotation-dto.ts
Normal file
16
src/app/services/api/model/update-quotation-dto.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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 UpdateQuotationDto {
|
||||
message?: string | null;
|
||||
conditionsSale?: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user