fix type
This commit is contained in:
parent
82597827db
commit
53ac0281f1
@ -61,7 +61,7 @@ export const createDiscountJSON: CreateDiscount = ({
|
|||||||
discount.Layer = 1;
|
discount.Layer = 1;
|
||||||
discount.Condition.Product = privilegeId;
|
discount.Condition.Product = privilegeId;
|
||||||
discount.Condition.Term = "";
|
discount.Condition.Term = "";
|
||||||
discount.Products = [{
|
discount.Target.Products = [{
|
||||||
Factor: discountFactor,
|
Factor: discountFactor,
|
||||||
ID: "",
|
ID: "",
|
||||||
Overhelm: false,
|
Overhelm: false,
|
||||||
@ -129,7 +129,7 @@ export const createDiscountFormData: CreateDiscount = ({
|
|||||||
formdata.set("discount.Layer", "1");
|
formdata.set("discount.Layer", "1");
|
||||||
formdata.set("discount.Condition.Product", privilegeId);
|
formdata.set("discount.Condition.Product", privilegeId);
|
||||||
formdata.set("discount.Condition.Term", discountMinValue.toString());
|
formdata.set("discount.Condition.Term", discountMinValue.toString());
|
||||||
formdata.set("discount.Products.Factor", discountMinValue.toString());
|
formdata.set("discount.Target.Products.Factor", discountMinValue.toString());
|
||||||
break;
|
break;
|
||||||
case "service":
|
case "service":
|
||||||
formdata.set("discount.Layer", "2");
|
formdata.set("discount.Layer", "2");
|
||||||
|
@ -95,11 +95,13 @@ export type CreateProductDiscountBody = CreateDiscountBodyBase & {
|
|||||||
Product: string;
|
Product: string;
|
||||||
Term: string;
|
Term: string;
|
||||||
};
|
};
|
||||||
|
Target: {
|
||||||
Products: [{
|
Products: [{
|
||||||
ID: string;
|
ID: string;
|
||||||
Factor: number;
|
Factor: number;
|
||||||
Overhelm: false;
|
Overhelm: false;
|
||||||
}];
|
}];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CreateServiceDiscountBody = CreateDiscountBodyBase & {
|
export type CreateServiceDiscountBody = CreateDiscountBodyBase & {
|
||||||
|
Loading…
Reference in New Issue
Block a user