Perbaikan Project PPOB
This commit is contained in:
		| @@ -169,6 +169,9 @@ export const DetailUser = observer(() => { | |||||||
|       title: "Status", |       title: "Status", | ||||||
|       dataIndex: "status", |       dataIndex: "status", | ||||||
|       key: "status", |       key: "status", | ||||||
|  |       render: (text, record) => { | ||||||
|  |         return <Text>{record.status === 1 ? "Success" : "Pending"}</Text>; | ||||||
|  |       }, | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       title: "No Seri", |       title: "No Seri", | ||||||
| @@ -222,9 +225,11 @@ export const DetailUser = observer(() => { | |||||||
|     <div className={["ppob-container"].join(" ")}> |     <div className={["ppob-container"].join(" ")}> | ||||||
|       <BreadcumbComponent data={routeData} /> |       <BreadcumbComponent data={routeData} /> | ||||||
|       <Card> |       <Card> | ||||||
|         <Row style={{marginBottom:10}}> |         <Row style={{ marginBottom: 10 }}> | ||||||
|           <Title strong level={2} >Detail User</Title> |           <Title strong level={2}> | ||||||
|           <Col lg={20} xs={20} style={{textAlign: "right" }}> |             Detail User | ||||||
|  |           </Title> | ||||||
|  |           <Col lg={20} xs={20} style={{ textAlign: "right" }}> | ||||||
|             {store.authentication.userData.role === "Admin" && ( |             {store.authentication.userData.role === "Admin" && ( | ||||||
|               <Space |               <Space | ||||||
|                 size="middle" |                 size="middle" | ||||||
| @@ -346,7 +351,7 @@ export const DetailUser = observer(() => { | |||||||
|             <Row> |             <Row> | ||||||
|               <Col lg={24} xs={24}> |               <Col lg={24} xs={24}> | ||||||
|                 <Row> |                 <Row> | ||||||
|                   <Col lg={12} xs={12}> |                   <Col span={store.ui.mediaQuery.isMobile ? 24 : 10}> | ||||||
|                     <Row justify={"center"}> |                     <Row justify={"center"}> | ||||||
|                       <Col lg={12} xs={12}> |                       <Col lg={12} xs={12}> | ||||||
|                         <Title strong level={3} style={styleSaldoTitle}> |                         <Title strong level={3} style={styleSaldoTitle}> | ||||||
| @@ -366,7 +371,7 @@ export const DetailUser = observer(() => { | |||||||
|                       <Col></Col> |                       <Col></Col> | ||||||
|                     </Row> |                     </Row> | ||||||
|                   </Col> |                   </Col> | ||||||
|                   <Col lg={12} xs={12}> |                   <Col span={store.ui.mediaQuery.isMobile ? 24 : 10}> | ||||||
|                     <Row justify={"center"}> |                     <Row justify={"center"}> | ||||||
|                       <Col lg={12} xs={12}> |                       <Col lg={12} xs={12}> | ||||||
|                         <Title strong level={3} style={styleSaldoTitle}> |                         <Title strong level={3} style={styleSaldoTitle}> | ||||||
|   | |||||||
| @@ -10,6 +10,8 @@ import { | |||||||
|   Modal, |   Modal, | ||||||
|   Form, |   Form, | ||||||
|   Input, |   Input, | ||||||
|  |   Divider, | ||||||
|  |   List | ||||||
| } from "antd"; | } from "antd"; | ||||||
| import moment from "moment"; | import moment from "moment"; | ||||||
| import { BreadcumbComponent } from "../../component/BreadcumbComponent"; | import { BreadcumbComponent } from "../../component/BreadcumbComponent"; | ||||||
| @@ -135,6 +137,9 @@ export const Profile = observer(() => { | |||||||
|       title: "Status", |       title: "Status", | ||||||
|       dataIndex: "status", |       dataIndex: "status", | ||||||
|       key: "status", |       key: "status", | ||||||
|  |       render: (text, record) => { | ||||||
|  |         return <Text>{record.status === 1 ? "Success" : "Pending"}</Text>; | ||||||
|  |       }, | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       title: "No Seri", |       title: "No Seri", | ||||||
| @@ -216,7 +221,7 @@ export const Profile = observer(() => { | |||||||
|               </Col> |               </Col> | ||||||
|             </Row> |             </Row> | ||||||
|           </Col> |           </Col> | ||||||
|           <Col span={store.ui.mediaQuery.isMobile ? 10 : 5}> |           <Col span={store.ui.mediaQuery.isMobile ? 24 : 5}> | ||||||
|             <Row justify={"center"}> |             <Row justify={"center"}> | ||||||
|               <Col lg={12} xs={12}> |               <Col lg={12} xs={12}> | ||||||
|                 <Title strong level={3} style={styleSaldoTitle}> |                 <Title strong level={3} style={styleSaldoTitle}> | ||||||
| @@ -235,8 +240,8 @@ export const Profile = observer(() => { | |||||||
|             </Row> |             </Row> | ||||||
|           </Col> |           </Col> | ||||||
|           {store.authentication.userData.role != "Admin Partner" && |           {store.authentication.userData.role != "Admin Partner" && | ||||||
|             (store.authentication.userData.role != "Retail" && ( |             store.authentication.userData.role != "Retail" && ( | ||||||
|               <Col span={store.ui.mediaQuery.isMobile ? 8 : 5}> |               <Col span={store.ui.mediaQuery.isMobile ? 24 : 5}> | ||||||
|                 <Row justify={"center"}> |                 <Row justify={"center"}> | ||||||
|                   <Col lg={12} xs={12}> |                   <Col lg={12} xs={12}> | ||||||
|                     <Title strong level={3} style={styleSaldoTitle}> |                     <Title strong level={3} style={styleSaldoTitle}> | ||||||
| @@ -254,7 +259,7 @@ export const Profile = observer(() => { | |||||||
|                   <Col></Col> |                   <Col></Col> | ||||||
|                 </Row> |                 </Row> | ||||||
|               </Col> |               </Col> | ||||||
|             ))} |             )} | ||||||
|         </Row> |         </Row> | ||||||
|         <Row> |         <Row> | ||||||
|           <Col span={24}> |           <Col span={24}> | ||||||
| @@ -271,26 +276,90 @@ export const Profile = observer(() => { | |||||||
|                 <FilterOutlined /> |                 <FilterOutlined /> | ||||||
|                 Filter |                 Filter | ||||||
|               </Button> |               </Button> | ||||||
|               <Table |               {store.ui.mediaQuery.isDesktop && ( | ||||||
|                 columns={columns} |                 <Table | ||||||
|                 bordered |                   columns={columns} | ||||||
|                 dataSource={store.transaction.dataHistoryTransaction} |                   bordered | ||||||
|                 pagination={{ |                   dataSource={store.transaction.dataHistoryTransaction} | ||||||
|                   pageSize: store.transaction.pageSizeHistoryTransaction, |                   pagination={{ | ||||||
|                   total: store.transaction.total_dataHistoryTransaction, |                     pageSize: store.transaction.pageSizeHistoryTransaction, | ||||||
|                   current: store.transaction.pageHistoryTransaction + 1, |                     total: store.transaction.total_dataHistoryTransaction, | ||||||
|                   showSizeChanger: true, |                     current: store.transaction.pageHistoryTransaction + 1, | ||||||
|                   simple: false, |                     showSizeChanger: true, | ||||||
|                 }} |                     simple: false, | ||||||
|                 onChange={async (page) => { |                   }} | ||||||
|                   let pageNumber = page.current; |                   onChange={async (page) => { | ||||||
|                   store.transaction.pageSizeHistoryTransaction = page.pageSize; |                     let pageNumber = page.current; | ||||||
|                   store.transaction.pageHistoryTransaction = pageNumber - 1; |                     store.transaction.pageSizeHistoryTransaction = | ||||||
|                   modalLoader.setLoading(true); |                       page.pageSize; | ||||||
|                   await store.transaction.getDataHistoryTransaction(); |                     store.transaction.pageHistoryTransaction = pageNumber - 1; | ||||||
|                   modalLoader.setLoading(false); |                     modalLoader.setLoading(true); | ||||||
|                 }} |                     await store.transaction.getDataHistoryTransaction(); | ||||||
|               /> |                     modalLoader.setLoading(false); | ||||||
|  |                   }} | ||||||
|  |                 /> | ||||||
|  |               )} | ||||||
|  |               {store.ui.mediaQuery.isMobile && ( | ||||||
|  |             <List | ||||||
|  |               itemLayout="horizontal" | ||||||
|  |               position={"top"} | ||||||
|  |               dataSource={store.transaction.dataHistoryTransaction} | ||||||
|  |               pagination={{ | ||||||
|  |                 pageSize: store.transaction.pageSizeHistoryTransaction, | ||||||
|  |                 total: store.transaction.total_dataHistoryTransaction, | ||||||
|  |                 current: store.transaction.pageHistoryTransaction + 1, | ||||||
|  |                 showSizeChanger: true, | ||||||
|  |                 simple: false, | ||||||
|  |               }} | ||||||
|  |               onChange={async (page) => { | ||||||
|  |                 let pageNumber = page.current; | ||||||
|  |                 store.transaction.pageSizeHistoryTransaction = | ||||||
|  |                   page.pageSize; | ||||||
|  |                 store.transaction.pageHistoryTransaction = pageNumber - 1; | ||||||
|  |                 modalLoader.setLoading(true); | ||||||
|  |                 await store.transaction.getDataHistoryTransaction(); | ||||||
|  |                 modalLoader.setLoading(false); | ||||||
|  |               }} | ||||||
|  |               style={{ padding: 0 }} | ||||||
|  |               renderItem={(item) => { | ||||||
|  |                 return ( | ||||||
|  |                   <div> | ||||||
|  |                     <List.Item | ||||||
|  |                       key={item.id} | ||||||
|  |                       style={{ | ||||||
|  |                         backgroundColor: "#ffffff", | ||||||
|  |                         paddingTop: 0, | ||||||
|  |                         paddingBottom: 0, | ||||||
|  |                         display: "flex", | ||||||
|  |                         flexDirection: "row", | ||||||
|  |                         alignItems: "center", | ||||||
|  |                         justifyContent: "center", | ||||||
|  |                       }} | ||||||
|  |                     > | ||||||
|  |                       <List.Item.Meta | ||||||
|  |                         className={["cariparkir-container"].join(" ")} | ||||||
|  |                         title={item.buyer} | ||||||
|  |                         description={ | ||||||
|  |                           <div style={{}}> | ||||||
|  |                             <p> | ||||||
|  |                               <small>Price : {item.price}</small> <br /> | ||||||
|  |                               <small>Tujuan : {item.transaction_destination}</small> <br /> | ||||||
|  |                               <small>Kode Transaksi : {item.transaction_code}</small> <br /> | ||||||
|  |                               <small>Status : {item.status === 1 ? "Success" : "Pending"}</small> <br /> | ||||||
|  |                               <small>No.Seri : {item.seri_number}</small> <br /> | ||||||
|  |                               <small>IDTrx Mitra : {item.partner_transaction_code}</small> <br /> | ||||||
|  |                               <small>Transaction Date : {format(parseISO(item.created_at), "dd-MM-yyyy")}</small> <br /> | ||||||
|  |                             </p> | ||||||
|  |                           </div> | ||||||
|  |                         } | ||||||
|  |                       /> | ||||||
|  |                     </List.Item> | ||||||
|  |                     <Divider plain style={{ margin: 0 }} /> | ||||||
|  |                   </div> | ||||||
|  |                 ); | ||||||
|  |               }} | ||||||
|  |             /> | ||||||
|  |           )} | ||||||
|             </div> |             </div> | ||||||
|           </Col> |           </Col> | ||||||
|         </Row> |         </Row> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user