Merge branch 'develop' into 'devops-staging'

Config Menu Partner

See merge request empatnusabangsa/ppob/ppob-frontend!24
This commit is contained in:
ilham dwi pratama 2021-12-28 12:34:07 +00:00
commit bad7817cef
2 changed files with 25 additions and 1 deletions

View File

@ -79,6 +79,26 @@ export const ProductComponent = observer((props) => {
currency: "IDR", currency: "IDR",
}).format(text), }).format(text),
}, },
{
title: "Harga Jual",
dataIndex: "mark_up_price",
key: "mark_up_price",
render: (text) =>
new Intl.NumberFormat("id-ID", {
style: "currency",
currency: "IDR",
}).format(text),
},
{
title: "Harga",
dataIndex: "price",
key: "price",
render: (text) =>
new Intl.NumberFormat("id-ID", {
style: "currency",
currency: "IDR",
}).format(text),
},
{ {
title: "Supplier", title: "Supplier",
dataIndex: "supplier_name", dataIndex: "supplier_name",
@ -121,7 +141,11 @@ export const ProductComponent = observer((props) => {
if (store.authentication.userData.role !== "Admin") columns.pop(); if (store.authentication.userData.role !== "Admin") columns.pop();
if (store.authentication.userData.role !== "Admin") delete columns[4]; if (store.authentication.userData.role !== "Admin") delete columns[4];
if (store.authentication.userData.role !== "Admin") delete columns[2]; if (store.authentication.userData.role !== "Admin") delete columns[2];
if (store.authentication.userData.role !== "Admin") delete columns[3];
if (store.authentication.userData.role !== "Admin") delete columns[6]; if (store.authentication.userData.role !== "Admin") delete columns[6];
if (store.authentication.userData.role === "Admin") delete columns[3];
if (store.authentication.userData.role === "Admin") delete columns[5];
if (store.authentication.userData.role !== "Admin") delete columns[8];
const deleteData = async (id) => { const deleteData = async (id) => {
try { try {

View File

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