Fakultas Ilmu Komputer UI

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

Merge branch 'coldfix-sprint_4' into 'staging'

Coldfix sprint 4

See merge request !52
parents c41034dc 9ec05c24
Pipeline #44363 passed with stages
in 12 minutes and 1 second
......@@ -52,7 +52,7 @@ const Sidebar = () => {
<LinkSidebar to="/produk">PRODUK</LinkSidebar>
<LinkSidebar to="/transaksi">TRANSAKSI</LinkSidebar>
<LinkSidebar to="/program">PROGRAM</LinkSidebar>
<LinkSidebar to="/product1">DONASI</LinkSidebar>
<LinkSidebar to="/donasi">DONASI</LinkSidebar>
<LinkSidebar to="/pengguna">PENGGUNA</LinkSidebar>
<Center
css={css`
......
......@@ -95,12 +95,15 @@ const DetailDonasi = ({ idDonasi }) => {
</div>
<div>{donation.donation_number}</div>
</div>
<FormDonasi
{...{
idDonasi,
defaultStatus: donation.donation_status,
}}
/>
{donation.donation_status !== "002" &&
donation.donation_status !== "003" && (
<FormDonasi
{...{
idDonasi,
defaultStatus: donation.donation_status,
}}
/>
)}
</div>
<div
css={css`
......
......@@ -11,8 +11,8 @@ import { css } from "@emotion/core";
import Button from "@material-ui/core/Button";
import { Save } from "@material-ui/icons";
const FormStatus = ({ idDonasi, defaultStatus }) => {
const url = `${process.env.REACT_APP_BASE_URL}/program-donations/${idDonasi}`;
const FormDonasi = ({ idDonasi, defaultStatus }) => {
const url = `${process.env.REACT_APP_BASE_URL}/program-donations/${idDonasi}/`;
const { register, handleSubmit } = useForm({
defaultValues: {
donation_status: defaultStatus,
......@@ -53,7 +53,7 @@ const FormStatus = ({ idDonasi, defaultStatus }) => {
<option value="001">Waiting for admin confirmation</option>
<option value="002">Completed</option>
<option value="003">Canceled</option>
<option value="004">Waiting for proof of transfer</option>
<option value="004">Meminta unggah ulang bukti</option>
</InputSelectForm>
</RowInput>
<Button
......@@ -70,4 +70,4 @@ const FormStatus = ({ idDonasi, defaultStatus }) => {
);
};
export default FormStatus;
export default FormDonasi;
......@@ -15,7 +15,7 @@ const ListDonasi = () => {
["program_name", "Nama Program"],
["", "Status", donationToColoredStatus],
],
link: "/program-donations/",
link: "/donasi/",
filter: [
["updated_at_date_range_after", "Updated from"],
["updated_at_date_range_before", "Updated before"],
......
......@@ -102,7 +102,8 @@ const DetailTransaksi = ({ idTransaksi }) => {
</div>
<div>{transaction.transaction_number}</div>
</div>
{transaction.transaction_status !== "006" &&
{transaction.transaction_status !== "005" &&
transaction.transaction_status !== "006" &&
transaction.transaction_status !== "007" && (
<FormStatus
{...{
......
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