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 { BaseMarketplaceSchema } from './models/BaseMarketplaceSchema';
 | 
			
		||||
export type { BaseShippingWarehouseSchema } from './models/BaseShippingWarehouseSchema';
 | 
			
		||||
export type { BillPaymentInfo } from './models/BillPaymentInfo';
 | 
			
		||||
export type { BillPaymentStatus } from './models/BillPaymentStatus';
 | 
			
		||||
export type { BillStatusUpdateRequest } from './models/BillStatusUpdateRequest';
 | 
			
		||||
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
 | 
			
		||||
     * @throws ApiError
 | 
			
		||||
     */
 | 
			
		||||
    public static getDealDocument({
 | 
			
		||||
    public static getBillingDocument({
 | 
			
		||||
        dealId,
 | 
			
		||||
    }: {
 | 
			
		||||
        dealId: number,
 | 
			
		||||
    }): CancelablePromise<any> {
 | 
			
		||||
        return __request(OpenAPI, {
 | 
			
		||||
            method: 'GET',
 | 
			
		||||
            url: '/deal/document/{deal_id}',
 | 
			
		||||
            url: '/deal/billing-document/{deal_id}',
 | 
			
		||||
            path: {
 | 
			
		||||
                'deal_id': dealId,
 | 
			
		||||
            },
 | 
			
		||||
@@ -322,18 +322,18 @@ export class DealService {
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Get Detailed Deal Document
 | 
			
		||||
     * Get Deal Tech Spec
 | 
			
		||||
     * @returns any Successful Response
 | 
			
		||||
     * @throws ApiError
 | 
			
		||||
     */
 | 
			
		||||
    public static getDealDocumentDetailed({
 | 
			
		||||
    public static getDealTechSpec({
 | 
			
		||||
        dealId,
 | 
			
		||||
    }: {
 | 
			
		||||
        dealId: number,
 | 
			
		||||
    }): CancelablePromise<any> {
 | 
			
		||||
        return __request(OpenAPI, {
 | 
			
		||||
            method: 'GET',
 | 
			
		||||
            url: '/deal/detailedDocument/{deal_id}',
 | 
			
		||||
            url: '/deal/tech-spec/{deal_id}',
 | 
			
		||||
            path: {
 | 
			
		||||
                'deal_id': dealId,
 | 
			
		||||
            },
 | 
			
		||||
 
 | 
			
		||||
@@ -259,7 +259,7 @@ const Content: FC<Props> = ({ deal }) => {
 | 
			
		||||
                                <ActionIcon
 | 
			
		||||
                                    onClick={() => {
 | 
			
		||||
                                        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;
 | 
			
		||||
                                        pdfWindow.print();
 | 
			
		||||
@@ -284,7 +284,7 @@ const Content: FC<Props> = ({ deal }) => {
 | 
			
		||||
                                            const date =
 | 
			
		||||
                                                getCurrentDateTimeForFilename();
 | 
			
		||||
                                            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`,
 | 
			
		||||
                                            );
 | 
			
		||||
                                        }}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user