refactoring of deal documents
This commit is contained in:
		@@ -25,6 +25,7 @@ export type { BaseEnumListSchema } from './models/BaseEnumListSchema';
 | 
				
			|||||||
export type { BaseEnumSchema } from './models/BaseEnumSchema';
 | 
					export type { BaseEnumSchema } from './models/BaseEnumSchema';
 | 
				
			||||||
export type { BaseMarketplaceSchema } from './models/BaseMarketplaceSchema';
 | 
					export type { BaseMarketplaceSchema } from './models/BaseMarketplaceSchema';
 | 
				
			||||||
export type { BaseShippingWarehouseSchema } from './models/BaseShippingWarehouseSchema';
 | 
					export type { BaseShippingWarehouseSchema } from './models/BaseShippingWarehouseSchema';
 | 
				
			||||||
 | 
					export type { BillPaymentInfo } from './models/BillPaymentInfo';
 | 
				
			||||||
export type { BillPaymentStatus } from './models/BillPaymentStatus';
 | 
					export type { BillPaymentStatus } from './models/BillPaymentStatus';
 | 
				
			||||||
export type { BillStatusUpdateRequest } from './models/BillStatusUpdateRequest';
 | 
					export type { BillStatusUpdateRequest } from './models/BillStatusUpdateRequest';
 | 
				
			||||||
export type { Body_upload_product_barcode_image } from './models/Body_upload_product_barcode_image';
 | 
					export type { Body_upload_product_barcode_image } from './models/Body_upload_product_barcode_image';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -301,18 +301,18 @@ export class DealService {
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Get Deal Document
 | 
					     * Get Billing Document
 | 
				
			||||||
     * @returns any Successful Response
 | 
					     * @returns any Successful Response
 | 
				
			||||||
     * @throws ApiError
 | 
					     * @throws ApiError
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static getDealDocument({
 | 
					    public static getBillingDocument({
 | 
				
			||||||
        dealId,
 | 
					        dealId,
 | 
				
			||||||
    }: {
 | 
					    }: {
 | 
				
			||||||
        dealId: number,
 | 
					        dealId: number,
 | 
				
			||||||
    }): CancelablePromise<any> {
 | 
					    }): CancelablePromise<any> {
 | 
				
			||||||
        return __request(OpenAPI, {
 | 
					        return __request(OpenAPI, {
 | 
				
			||||||
            method: 'GET',
 | 
					            method: 'GET',
 | 
				
			||||||
            url: '/deal/document/{deal_id}',
 | 
					            url: '/deal/billing-document/{deal_id}',
 | 
				
			||||||
            path: {
 | 
					            path: {
 | 
				
			||||||
                'deal_id': dealId,
 | 
					                'deal_id': dealId,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
@@ -322,18 +322,18 @@ export class DealService {
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Get Detailed Deal Document
 | 
					     * Get Deal Tech Spec
 | 
				
			||||||
     * @returns any Successful Response
 | 
					     * @returns any Successful Response
 | 
				
			||||||
     * @throws ApiError
 | 
					     * @throws ApiError
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static getDealDocumentDetailed({
 | 
					    public static getDealTechSpec({
 | 
				
			||||||
        dealId,
 | 
					        dealId,
 | 
				
			||||||
    }: {
 | 
					    }: {
 | 
				
			||||||
        dealId: number,
 | 
					        dealId: number,
 | 
				
			||||||
    }): CancelablePromise<any> {
 | 
					    }): CancelablePromise<any> {
 | 
				
			||||||
        return __request(OpenAPI, {
 | 
					        return __request(OpenAPI, {
 | 
				
			||||||
            method: 'GET',
 | 
					            method: 'GET',
 | 
				
			||||||
            url: '/deal/detailedDocument/{deal_id}',
 | 
					            url: '/deal/tech-spec/{deal_id}',
 | 
				
			||||||
            path: {
 | 
					            path: {
 | 
				
			||||||
                'deal_id': dealId,
 | 
					                'deal_id': dealId,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -259,7 +259,7 @@ const Content: FC<Props> = ({ deal }) => {
 | 
				
			|||||||
                                <ActionIcon
 | 
					                                <ActionIcon
 | 
				
			||||||
                                    onClick={() => {
 | 
					                                    onClick={() => {
 | 
				
			||||||
                                        const pdfWindow = window.open(
 | 
					                                        const pdfWindow = window.open(
 | 
				
			||||||
                                            `${import.meta.env.VITE_API_URL}/deal/detailedDocument/${deal.id}`,
 | 
					                                            `${import.meta.env.VITE_API_URL}/deal/tech-spec/${deal.id}`,
 | 
				
			||||||
                                        );
 | 
					                                        );
 | 
				
			||||||
                                        if (!pdfWindow) return;
 | 
					                                        if (!pdfWindow) return;
 | 
				
			||||||
                                        pdfWindow.print();
 | 
					                                        pdfWindow.print();
 | 
				
			||||||
@@ -284,7 +284,7 @@ const Content: FC<Props> = ({ deal }) => {
 | 
				
			|||||||
                                            const date =
 | 
					                                            const date =
 | 
				
			||||||
                                                getCurrentDateTimeForFilename();
 | 
					                                                getCurrentDateTimeForFilename();
 | 
				
			||||||
                                            FileSaver.saveAs(
 | 
					                                            FileSaver.saveAs(
 | 
				
			||||||
                                                `${import.meta.env.VITE_API_URL}/deal/document/${deal.id}`,
 | 
					                                                `${import.meta.env.VITE_API_URL}/deal/billing-document/${deal.id}`,
 | 
				
			||||||
                                                `bill_${deal.id}_${date}.pdf`,
 | 
					                                                `bill_${deal.id}_${date}.pdf`,
 | 
				
			||||||
                                            );
 | 
					                                            );
 | 
				
			||||||
                                        }}
 | 
					                                        }}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user