remove references to product and delivery

This commit is contained in:
Sebastian 2023-09-08 18:09:33 -03:00
parent 036f8a463f
commit b784144edf
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069
9 changed files with 54 additions and 54 deletions

View File

@ -73,11 +73,11 @@ const cd: WalletContractData = {
country: "ar",
},
},
products: [],
// products: [],
autoRefund: undefined,
summaryI18n: undefined,
deliveryDate: undefined,
deliveryLocation: undefined,
// deliveryDate: undefined,
// deliveryLocation: undefined,
};
export const ShowingSimpleOrder = tests.createExample(ShowView, {

View File

@ -259,7 +259,7 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode {
</span>
</td>
</tr>
<tr>
{/* <tr>
<td>
<i18n.Translate>Delivery date</i18n.Translate>
</td>
@ -291,7 +291,7 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode {
.map((p) => `${p.description} x ${p.quantity}`)
.join(", ")}
</td>
</tr>
</tr> */}
<tr>
<td>
<i18n.Translate>Created at</i18n.Translate>

View File

@ -76,7 +76,7 @@ export function BaseView(state: SupportedStates): VNode {
...contractTerms,
orderId: contractTerms.order_id,
contractTermsHash: "",
products: contractTerms.products!,
// products: contractTerms.products!,
}}
proposalId={state.payStatus.proposalId}
/>

View File

@ -49,7 +49,7 @@ export namespace State {
interface BaseInfo {
merchantName: string;
products: Product[] | undefined;
// products: Product[] | undefined;
amount: AmountJson;
// awaitingAmount: AmountJson;
// granted: AmountJson;

View File

@ -106,7 +106,7 @@ export function useComponentState({
// granted: Amounts.parseOrThrow(info.response.refund.granted),
// awaitingAmount: Amounts.parseOrThrow(refund.awaiting),
merchantName: purchase.info.merchant.name,
products: purchase.info.products,
// products: purchase.info.products,
error: undefined,
};

View File

@ -47,7 +47,7 @@ export const Ready = tests.createExample(ReadyView, {
// awaitingAmount: Amounts.parseOrThrow("USD:1"),
// granted: Amounts.parseOrThrow("USD:0"),
merchantName: "the merchant",
products: [],
// products: [],
orderId: "abcdef",
});
@ -60,18 +60,18 @@ export const WithAProductList = tests.createExample(ReadyView, {
// awaitingAmount: Amounts.parseOrThrow("USD:1"),
// granted: Amounts.parseOrThrow("USD:0"),
merchantName: "the merchant",
products: [
{
description: "beer",
image: beer,
quantity: 2,
},
{
description: "t-shirt",
price: "EUR:1",
quantity: 5,
},
],
// products: [
// {
// description: "beer",
// image: beer,
// quantity: 2,
// },
// {
// description: "t-shirt",
// price: "EUR:1",
// quantity: 5,
// },
// ],
orderId: "abcdef",
});

View File

@ -104,11 +104,11 @@ export function ReadyView(state: State.Ready): VNode {
kind="positive"
/> */}
</section>
{state.products && state.products.length ? (
{/* {state.products && state.products.length ? (
<section>
<ProductList products={state.products} />
</section>
) : undefined}
) : undefined} */}
<section>
<Button
variant="contained"

View File

@ -378,9 +378,9 @@ export const PaymentWithDeliveryDate = tests.createExample(TestedComponent, {
amountRaw: "KUDOS:12",
info: {
...exampleData.payment.info,
delivery_date: {
t_s: new Date().getTime() / 1000,
},
// delivery_date: {
// t_s: new Date().getTime() / 1000,
// },
},
},
});
@ -391,12 +391,12 @@ export const PaymentWithDeliveryAddr = tests.createExample(TestedComponent, {
amountRaw: "KUDOS:12",
info: {
...exampleData.payment.info,
delivery_location: {
country: "Argentina",
street: "Elm Street",
district: "CABA",
post_code: "1101",
},
// delivery_location: {
// country: "Argentina",
// street: "Elm Street",
// district: "CABA",
// post_code: "1101",
// },
},
},
});
@ -407,15 +407,15 @@ export const PaymentWithDeliveryFull = tests.createExample(TestedComponent, {
amountRaw: "KUDOS:12",
info: {
...exampleData.payment.info,
delivery_date: {
t_s: new Date().getTime() / 1000,
},
delivery_location: {
country: "Argentina",
street: "Elm Street",
district: "CABA",
post_code: "1101",
},
// delivery_date: {
// t_s: new Date().getTime() / 1000,
// },
// delivery_location: {
// country: "Argentina",
// street: "Elm Street",
// district: "CABA",
// post_code: "1101",
// },
},
},
});

View File

@ -1475,10 +1475,10 @@ export function PurchaseDetails({
const total = Amounts.add(price.value, price.fee).amount;
const hasProducts = info.products && info.products.length > 0;
// const hasProducts = info.products && info.products.length > 0;
const hasShipping =
info.delivery_date !== undefined || info.delivery_location !== undefined;
// const hasShipping =
// info.delivery_date !== undefined || info.delivery_location !== undefined;
const showLargePic = (): void => {
return;
@ -1558,7 +1558,7 @@ export function PurchaseDetails({
</tr>
</Fragment>
)}
{hasProducts && (
{/* {hasProducts && (
<tr>
<td colSpan={2}>
<PartCollapsible
@ -1586,8 +1586,8 @@ export function PurchaseDetails({
/>
</td>
</tr>
)}
{hasShipping && (
)} */}
{/* {hasShipping && (
<tr>
<td colSpan={2}>
<PartCollapsible
@ -1602,7 +1602,7 @@ export function PurchaseDetails({
/>
</td>
</tr>
)}
)} */}
<tr>
<td>
<ShowFullContractTermPopup proposalId={proposalId} />