[working] change and move test values

This commit is contained in:
nflnkr 2023-02-20 15:18:07 +03:00
parent 53b83db8df
commit 7fc9b35ebc
3 changed files with 25 additions and 15 deletions

@ -12,6 +12,7 @@ import { usePromocodeStore } from "../../../../../stores/promocodes";
import { useTariffStore } from "../../../../../stores/tariffs"; import { useTariffStore } from "../../../../../stores/tariffs";
import { useCartStore } from "../../../../../stores/cart"; import { useCartStore } from "../../../../../stores/cart";
export interface MWProps { export interface MWProps {
openModal: () => void; openModal: () => void;
} }
@ -68,18 +69,6 @@ const columns: GridColDef[] = [
}, },
]; ];
/* const testTariffArray: ArrayProps[] = [
{ id: 1, name: "Тариф 1", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
{ id: 2, name: "Тариф 2", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
{ id: 3, name: "Тариф 3", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
{
id: 4, name: "Пакет 1", type: "package", tariffs: [
{ id: 1, name: "Тариф 1", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
{ id: 2, name: "Тариф 2", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
]
},
]; */
const DataGridElement: React.FC<MWProps> = ({ openModal }) => { const DataGridElement: React.FC<MWProps> = ({ openModal }) => {
const promocodeArray = usePromocodeStore(state => state.promocodeArray); const promocodeArray = usePromocodeStore(state => state.promocodeArray);
const tariffsSelectedRowsData = useTariffStore(state => state.tariffsSelectedRowsData); const tariffsSelectedRowsData = useTariffStore(state => state.tariffsSelectedRowsData);

@ -8,7 +8,7 @@ export const testDiscounts: Discount[] = [
from: "", from: "",
dueTo: "", dueTo: "",
privileges: [ privileges: [
{ good: "Опросник", discount: 0.3 }, { good: "Шаблонизатор документов", discount: 0.3 },
{ good: "Опросник", discount: 0.2 }, { good: "Опросник", discount: 0.2 },
], ],
active: false, active: false,
@ -24,7 +24,7 @@ export const testDiscounts: Discount[] = [
from: "", from: "",
dueTo: "", dueTo: "",
privileges: [ privileges: [
{ good: "Опросник", discount: 0.3 }, { good: "Сокращатель ссылок", discount: 0.3 },
{ good: "Опросник", discount: 0.2 }, { good: "Опросник", discount: 0.2 },
], ],
active: true, active: true,
@ -40,7 +40,7 @@ export const testDiscounts: Discount[] = [
from: "", from: "",
dueTo: "", dueTo: "",
privileges: [ privileges: [
{ good: "Опросник", discount: 0.3 }, { good: "Шаблонизатор документов", discount: 0.3 },
{ good: "Опросник", discount: 0.2 }, { good: "Опросник", discount: 0.2 },
], ],
active: false, active: false,

@ -0,0 +1,21 @@
import { TariffPackage, TariffsOrPackages } from "../../model/tariff";
const testPackage: TariffPackage = {
id: 4, name: "Пакет 1", tariffs: [
{ id: 1, name: "Тариф 1", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
{ id: 2, name: "Тариф 2", type: "tariff", service: "Опросник", disk: 100, time: 200, points: 300, price: 100500 },
],
disk: 200,
points: 600,
price: 201000,
services: ["Шаблонизатор документов", "Опросник"],
time: 400,
};
export const testTariffs: TariffsOrPackages = [
{ id: 1, name: "Тариф 1", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
{ id: 2, name: "Тариф 2", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
{ id: 3, name: "Тариф 3", type: "tariff", service: "Шаблонизатор документов", disk: 100, time: 200, points: 300, price: 100500 },
testPackage,
];