Fakultas Ilmu Komputer UI

Commit e16c31d9 authored by Michael Wiryadinata Halim's avatar Michael Wiryadinata Halim
Browse files

[REFACTOR] Add preorder label

parent 471ad4e4
Pipeline #46394 passed with stages
in 6 minutes and 45 seconds
......@@ -36,3 +36,7 @@ export const donationToColoredStatus = (donation) => (
label={donation.readable_donation_status}
/>
);
export const preorderStock = (product) => (
<div>{product.pre_order ? "preorder" : product.stock}</div>
);
......@@ -2,7 +2,7 @@ import React from "react";
import TableComponent from "../../component/TableComponent";
import { css } from "@emotion/core";
import LinkYellow from "../../component/LinkYellow";
import { stringToCurrency } from "../../component/TableUtils";
import { preorderStock, stringToCurrency } from "../../component/TableUtils";
const ListProduk = () => {
const data = {
......@@ -14,7 +14,7 @@ const ListProduk = () => {
["id", "id"],
["name", "Nama Produk"],
["price", "Harga", stringToCurrency],
["stock", "Stok"],
["", "Stok", preorderStock],
],
link: "",
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment