Merge branch 'develop' into 'devops-staging'
Config Menu Partner See merge request empatnusabangsa/ppob/ppob-frontend!24
This commit is contained in:
commit
bad7817cef
|
@ -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 {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user