No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

237 líneas
14 KiB

  1. import React from 'react';
  2. import * as Icon from 'react-feather';
  3. //library yarn
  4. import NumberFormat from 'react-number-format';
  5. const CheckoutContent = function ({ backend, checkout_product, ...props }) {
  6. // const Checkout = checkout_product.map((data) => {
  7. // return (
  8. // )
  9. // })
  10. return (
  11. <>
  12. <div className="checkout-area ptb-80">
  13. <div className="container">
  14. <div className="row">
  15. <div className="col-lg-12 col-md-12">
  16. <div className="user-actions">
  17. <Icon.Edit />
  18. <span>Returning customer? <a href="#">Click here to login</a></span>
  19. </div>
  20. </div>
  21. </div>
  22. <form>
  23. <div className="row">
  24. <div className="col-lg-6 col-md-12">
  25. <div className="billing-details">
  26. <h3 className="title">Billing Details</h3>
  27. <div className="row">
  28. <div className="col-lg-12 col-md-12">
  29. <div className="form-group">
  30. <label>Country <span className="required">*</span></label>
  31. <div className="select-box">
  32. <select className="form-select">
  33. <option value="1">United Arab Emirates</option>
  34. <option value="2">China</option>
  35. <option value="3">United Kingdom</option>
  36. <option value="4">Germany</option>
  37. <option value="5">France</option>
  38. <option value="6">Japan</option>
  39. </select>
  40. </div>
  41. </div>
  42. </div>
  43. <div className="col-lg-6 col-md-6">
  44. <div className="form-group">
  45. <label>First Name <span className="required">*</span></label>
  46. <input type="text" className="form-control" />
  47. </div>
  48. </div>
  49. <div className="col-lg-6 col-md-6">
  50. <div className="form-group">
  51. <label>Last Name <span className="required">*</span></label>
  52. <input type="text" className="form-control" />
  53. </div>
  54. </div>
  55. <div className="col-lg-12 col-md-12">
  56. <div className="form-group">
  57. <label>Company Name</label>
  58. <input type="text" className="form-control" />
  59. </div>
  60. </div>
  61. <div className="col-lg-12 col-md-6">
  62. <div className="form-group">
  63. <label>Address <span className="required">*</span></label>
  64. <input type="text" className="form-control" />
  65. </div>
  66. </div>
  67. <div className="col-lg-12 col-md-6">
  68. <div className="form-group">
  69. <label>Town / City <span className="required">*</span></label>
  70. <input type="text" className="form-control" />
  71. </div>
  72. </div>
  73. <div className="col-lg-6 col-md-6">
  74. <div className="form-group">
  75. <label>State / County <span className="required">*</span></label>
  76. <input type="text" className="form-control" />
  77. </div>
  78. </div>
  79. <div className="col-lg-6 col-md-6">
  80. <div className="form-group">
  81. <label>Postcode / Zip <span className="required">*</span></label>
  82. <input type="text" className="form-control" />
  83. </div>
  84. </div>
  85. <div className="col-lg-6 col-md-6">
  86. <div className="form-group">
  87. <label>Email Address <span className="required">*</span></label>
  88. <input type="email" className="form-control" />
  89. </div>
  90. </div>
  91. <div className="col-lg-6 col-md-6">
  92. <div className="form-group">
  93. <label>Phone <span className="required">*</span></label>
  94. <input type="text" className="form-control" />
  95. </div>
  96. </div>
  97. <div className="col-lg-12 col-md-12">
  98. <div className="form-check">
  99. <input type="checkbox" className="form-check-input" id="create-an-account" />
  100. <label className="form-check-label" htmlFor="create-an-account">Create an account?</label>
  101. </div>
  102. </div>
  103. <div className="col-lg-12 col-md-12">
  104. <div className="form-check">
  105. <input type="checkbox" className="form-check-input" id="ship-different-address" />
  106. <label className="form-check-label" htmlFor="ship-different-address">Ship to a different address?</label>
  107. </div>
  108. </div>
  109. <div className="col-lg-12 col-md-12">
  110. <div className="form-group">
  111. <textarea name="notes" id="notes" cols="30" rows="4" placeholder="Order Notes" className="form-control"></textarea>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div className="col-lg-6 col-md-12">
  118. <div className="order-details">
  119. <h3 className="title">Your Order</h3>
  120. <div className="order-table table-responsive">
  121. <table className="table table-bordered">
  122. <thead>
  123. <tr>
  124. <th scope="col">Product Name</th>
  125. <th scope="col">Total</th>
  126. </tr>
  127. </thead>
  128. <tbody>
  129. {checkout_product.length ? checkout_product.map(data => (
  130. <tr key={data.id}>
  131. <td className="product-name">
  132. <a href="#">{data.product_name}</a>
  133. </td>
  134. <td className="product-total">
  135. <span className="subtotal-amount">
  136. <NumberFormat
  137. name="product_total"
  138. value={data.product_total}
  139. displayType={'text'} thousandSeparator={true}
  140. prefix={'Rp. '}
  141. />
  142. </span>
  143. </td>
  144. </tr>
  145. )) : (
  146. <tr>
  147. <td colSpan="5" className="text-center">Tidak Ada Product di Keranjang</td>
  148. </tr>
  149. )}
  150. </tbody>
  151. <tbody>
  152. <tr>
  153. <td className="order-subtotal">
  154. <span>Cart Subtotal</span>
  155. </td>
  156. <td className="order-subtotal-price">
  157. <span className="order-subtotal-amount">$210.00</span>
  158. </td>
  159. </tr>
  160. <tr>
  161. <td className="order-shipping">
  162. <span>Shipping</span>
  163. </td>
  164. <td className="shipping-price">
  165. <span>$5.00</span>
  166. </td>
  167. </tr>
  168. <tr>
  169. <td className="total-price">
  170. <span>Order Total</span>
  171. </td>
  172. <td className="product-subtotal">
  173. <span className="subtotal-amount">$215.00</span>
  174. </td>
  175. </tr>
  176. </tbody>
  177. </table>
  178. </div>
  179. {/* <div className="payment-method">
  180. <p>
  181. <input type="radio" id="direct-bank-transfer" name="radio-group" defaultChecked />
  182. <label htmlFor="direct-bank-transfer">Direct Bank Transfer</label>
  183. Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.
  184. </p>
  185. <p>
  186. <input type="radio" id="paypal" name="radio-group" />
  187. <label htmlFor="paypal">PayPal</label>
  188. </p>
  189. <p>
  190. <input type="radio" id="cash-on-delivery" name="radio-group" />
  191. <label htmlFor="cash-on-delivery">Cash on Delivery</label>
  192. </p>
  193. </div> */}
  194. <a href="#" className="btn btn-primary order-btn">Lanjutkan Pembayaran</a>
  195. </div>
  196. </div>
  197. </div>
  198. </form>
  199. </div>
  200. </div>
  201. </>
  202. )
  203. }
  204. export default CheckoutContent;