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