Edit Menu Product

This commit is contained in:
ajat91.sudrajat 2021-12-22 16:45:20 +07:00
parent 7edf7650ec
commit 9a596abeca
8 changed files with 25 additions and 24 deletions

View File

@ -139,7 +139,7 @@ export const CategoryComponent = observer((props) => {
store.category.pageSize = page.pageSize;
store.category.page = pageNumber - 1;
modalLoader.setLoading(true);
//await store.category.getData();
await store.category.getData();
modalLoader.setLoading(false);
}}
/>

View File

@ -82,7 +82,7 @@ export const CommissionComponent = observer((props) => {
store.commission.pageSize = page.pageSize;
store.commission.page = pageNumber - 1;
modalLoader.setLoading(true);
//await store.commission.getData();
await store.commission.getData();
modalLoader.setLoading(false);
}}
/>

View File

@ -211,7 +211,7 @@ export const PartnerComponent = observer((props) => {
store.partner.pageSize = page.pageSize;
store.partner.page = pageNumber - 1;
modalLoader.setLoading(true);
//await store.partner.getData();
await store.partner.getData();
modalLoader.setLoading(false);
}}
/>

View File

@ -37,23 +37,23 @@ export const ProductComponent = observer((props) => {
const columns = [
{
title: "Kode",
dataIndex: "code",
key: "code",
dataIndex: "product_code",
key: "product_code",
},
{
title: "Produk",
dataIndex: ["name"],
key: "name",
dataIndex: ["product_name"],
key: "product_name",
},
{
title: "Harga Beli",
dataIndex: ["currentPrice", "price"],
key: ["currentPrice", "price"],
dataIndex: ["current_price_price"],
key: ["current_price_price"],
},
{
title: "Harga Jual",
dataIndex: ["currentPrice", "mark_up_price"],
key: ["currentPrice", "mark_up_price"],
dataIndex: ["mark_up_price"],
key: ["mark_up_price"],
},
// {
// title: "Gangguan",
@ -74,10 +74,10 @@ export const ProductComponent = observer((props) => {
key: "tersedia",
render: (text, record) => (
<Tag
color={record?.status === "ACTIVE" ? "blue" : "#E3E8EE"}
color={record?.product_status === "ACTIVE" ? "blue" : "#E3E8EE"}
style={{ color: "#4F566B" }}
>
{record?.status === "ACTIVE" ? " Tersedia" : "Tidak"}
{record?.product_status === "ACTIVE" ? " Tersedia" : "Tidak"}
</Tag>
),
},
@ -235,7 +235,7 @@ export const ProductComponent = observer((props) => {
store.product.pageSize = page.pageSize;
store.product.page = pageNumber - 1;
modalLoader.setLoading(true);
//await store.product.getData();
await store.product.getData();
modalLoader.setLoading(false);
}}
/>
@ -276,15 +276,15 @@ export const ProductComponent = observer((props) => {
>
<List.Item.Meta
className={["cariparkir-container"].join(" ")}
title={item.code}
title={item.product_code}
description={
<div style={{}}>
<p>
<small>Nama Produk : {item.name}</small> <br />
<small>Harga Beli : {item.currentPrice.price}</small>
<small>{item.product_name}</small> <br />
<small>Harga Beli : {item.current_price_price}</small>
<br />
<small>
Harga Jual : {item.currentPrice.mark_up_price}
Harga Jual : {item.mark_up_price}
</small>
</p>
<p></p>
@ -299,10 +299,10 @@ export const ProductComponent = observer((props) => {
}}
>
<Tag
color={item?.status === "ACTIVE" ? "blue" : "#E3E8EE"}
color={item?.product_status === "ACTIVE" ? "blue" : "#E3E8EE"}
style={{ color: "#4F566B" }}
>
{item?.status === "ACTIVE" ? " Tersedia" : "Tidak"}
{item?.product_status === "ACTIVE" ? " Tersedia" : "Tidak"}
</Tag>
</p>
</div>

View File

@ -126,7 +126,7 @@ export const SubcategoryComponent = observer((props) => {
store.subcategory.pageSize = page.pageSize;
store.subcategory.page = pageNumber - 1;
modalLoader.setLoading(true);
// await getData();
await getData();
modalLoader.setLoading(false);
}}
/>

View File

@ -219,7 +219,7 @@ export const SupplierComponent = observer((props) => {
store.supplier.pageSize = page.pageSize;
store.supplier.page = pageNumber - 1;
modalLoader.setLoading(true);
//await store.supplier.getData();
await store.supplier.getData();
modalLoader.setLoading(false);
}}
/>

View File

@ -404,9 +404,9 @@ export const Membership = observer(() => {
<div style={{}}>
<p>
<small>Role : {item.roleName}</small> <br />
<small>Saldo Supplier : {item.amount}</small>{" "}
<small>Saldo Supplier : {item.coa.amount}</small>{" "}
<br />
<small>Saldo System : {item.amount}</small> <br />
<small>Saldo System : {item.coa.amount}</small> <br />
</p>
</div>
}

View File

@ -31,6 +31,7 @@ export class Product {
async getData() {
try {
const response = await http.get(`/product/all?supplier=${this.filterSupplier}&sub-category=${this.filterSubCategory}&page=${this.page}&pageSize=${this.pageSize}`);
//console.log(response)
this.data = response.body.data.map((item, idx) => {
item.key = idx;
return item