Skip to content

Commit

Permalink
Revert "feat: quote print and download pdf add currency" (#913)
Browse files Browse the repository at this point in the history
Revert "feat: quote print and download pdf add currency https://bigc-b2b.atlassian.net/browse/BUN-1826"

This reverts commit 88b6e52265d37ce8e60a6dacf9a5d7c219bdfb8e.
  • Loading branch information
BrianJiang2021 authored and libruce committed Jan 9, 2024
1 parent 026ea65 commit 94067d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
11 changes: 1 addition & 10 deletions apps/storefront/src/pages/quote/QuoteDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,22 +235,13 @@ function QuoteDetail() {

const fetchPdfUrl = async (bool: boolean) => {
setIsRequestLoading(true)
const {
id,
createdAt,
currency: { currencyExchangeRate, token, decimalPlaces },
} = quoteDetail
const { id, createdAt } = quoteDetail
try {
const data = {
quoteId: +id,
createdAt,
isPreview: bool,
lang: 'en',
currency: {
currencyExchangeRate,
token,
decimalPlaces,
},
}

const fn = +role === 99 ? exportBcQuotePdf : exportB2BQuotePdf
Expand Down
6 changes: 1 addition & 5 deletions apps/storefront/src/shared/service/b2b/graphql/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,13 @@ const exportQuotePdf = (data: {
createdAt: number
isPreview: boolean
lang: string
currency: object
}) => `mutation{
quoteFrontendPdf(
quoteId: ${data.quoteId},
storeHash: "${storeHash}",
createdAt: ${data.createdAt},
lang: "${data.lang}",
isPreview: ${data.isPreview},
currency: ${convertObjectToGraphql(data.currency || {})},
isPreview: ${data.isPreview}
) {
url,
content,
Expand Down Expand Up @@ -418,7 +416,6 @@ export const exportB2BQuotePdf = (data: {
createdAt: number
isPreview: boolean
lang: string
currency: object
}): CustomFieldItems =>
B3Request.graphqlB2B({
query: exportQuotePdf(data),
Expand All @@ -429,7 +426,6 @@ export const exportBcQuotePdf = (data: {
createdAt: number
isPreview: boolean
lang: string
currency: object
}): CustomFieldItems =>
B3Request.graphqlB2B({
query: exportQuotePdf(data),
Expand Down

0 comments on commit 94067d5

Please sign in to comment.