暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

services.js 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. import React from "react";
  2. import Layout from "../components/layout/Layout";
  3. import Button from "react-bootstrap/Button";
  4. import Modal from "react-bootstrap/Modal";
  5. import { useState } from "react";
  6. import { Form } from "reactstrap";
  7. function services() {
  8. const [show, setShow] = useState(false);
  9. const handleClose = () => setShow(false);
  10. const handleShow = () => setShow(true);
  11. return (
  12. <Layout
  13. headTitle="Services"
  14. pageTitle="Services"
  15. pageTitleSub={"Welcome User"}
  16. pageclassName={"Services"}
  17. parent={"Home"}
  18. child={"Services"}
  19. >
  20. <div className="row">
  21. <div className="col-xl-3 col-sm-6">
  22. <div className="stat-widget d-flex align-items-center bg-white">
  23. <div className="widget-icon me-3 bg-primary">
  24. <span>
  25. <i className="ri-file-copy-2-line"></i>
  26. </span>
  27. </div>
  28. <div className="widget-content">
  29. <h3>483</h3>
  30. <p>Total Requests</p>
  31. </div>
  32. </div>
  33. </div>
  34. <div className="col-xl-3 col-sm-6">
  35. <div className="stat-widget d-flex align-items-center bg-white">
  36. <div className="widget-icon me-3 bg-success">
  37. <span>
  38. <i className="ri-file-list-3-line"></i>
  39. </span>
  40. </div>
  41. <div className="widget-content">
  42. <h3>273</h3>
  43. <p>Completed Requests</p>
  44. </div>
  45. </div>
  46. </div>
  47. <div className="col-xl-3 col-sm-6">
  48. <div className="stat-widget d-flex align-items-center bg-white">
  49. <div className="widget-icon me-3 bg-warning">
  50. <span>
  51. <i className="ri-file-paper-line"></i>
  52. </span>
  53. </div>
  54. <div className="widget-content">
  55. <h3>121</h3>
  56. <p>Pending Requests</p>
  57. </div>
  58. </div>
  59. </div>
  60. <div className="col-xl-3 col-sm-6 mb-3">
  61. <div className="stat-widget d-flex align-items-center bg-white">
  62. <div className="widget-icon me-3 bg-danger">
  63. <span>
  64. <i className="ri-file-paper-2-line"></i>
  65. </span>
  66. </div>
  67. <div className="widget-content">
  68. <h3>89</h3>
  69. <p>Canceled Requests</p>
  70. </div>
  71. </div>
  72. </div>
  73. <div className="col-sm-12 d-block d-md-none bg-white mt-1">
  74. <div className="d-flex align-items-center justify-content-between py-2 bg-white">
  75. <div> <p className="fw-bold text-dark mb-0">Service Request</p></div>
  76. <div> <button className="btn-sm btn-primary" onClick={handleShow}>+</button></div>
  77. </div>
  78. </div>
  79. <div className="col-sm-12 d-block d-md-none bg-white p-3 mb-2 mt-1">
  80. <div className="d-flex align-items-center justify-content-between">
  81. <div>
  82. <span>ABCD4556464QWE</span>
  83. </div>
  84. <div>
  85. <span className="badge px-3 py-2 bg-success"> Completed</span>
  86. </div>
  87. </div>
  88. <div className="d-flex align-items-center justify-content-between py-2">
  89. <div>
  90. <span>Water Leakage</span>
  91. </div>
  92. <div>
  93. <span>DT:23/5/23</span>
  94. </div>
  95. </div>
  96. </div>{" "}
  97. <div className="col-sm-12 d-block d-md-none bg-white p-3">
  98. <div className="d-flex align-items-center justify-content-between">
  99. <div>
  100. <span>ABCD4556464QWE</span>
  101. </div>
  102. <div>
  103. <span className="badge px-3 py-2 bg-warning"> Pending</span>
  104. </div>
  105. </div>
  106. <div className="d-flex align-items-center justify-content-between py-2">
  107. <div>
  108. <span>Water Leakage</span>
  109. </div>
  110. <div>
  111. <span>DT:25/5/23</span>
  112. </div>
  113. </div>
  114. </div>{" "}
  115. <div className="col-xl-12 d-none d-md-block">
  116. <div className="card">
  117. <div className="card-header flex-row">
  118. <h4 className="card-title">Services Request</h4>
  119. <Button
  120. variant="primary"
  121. onClick={handleShow}
  122. size="sm"
  123. className="p-1"
  124. >
  125. + New Request
  126. </Button>
  127. </div>
  128. <Modal show={show} onHide={handleClose}>
  129. <Modal.Header closeButton>
  130. <Modal.Title>New Service Request</Modal.Title>
  131. </Modal.Header>
  132. <Modal.Body>
  133. <form className="row g-3 needs-validation" novalidate>
  134. <div className="col-md-6">
  135. <label for="validationCustom01" className="form-label">
  136. Full Name
  137. </label>
  138. <input
  139. type="text"
  140. className="form-control"
  141. id="validationCustom01"
  142. value="Mathew"
  143. required
  144. />
  145. <div className="valid-feedback">Looks good!</div>
  146. </div>
  147. <div className="col-md-6">
  148. <label for="validationCustom01" className="form-label">
  149. Mobile
  150. </label>
  151. <input
  152. type="tel"
  153. className="form-control"
  154. id="validationCustom02"
  155. value="123456"
  156. required
  157. />
  158. <div className="valid-feedback">Looks good!</div>
  159. </div>
  160. <div className="col-md-6">
  161. <label for="validationCustom04" className="form-label">
  162. Service
  163. </label>
  164. <select
  165. className="form-select"
  166. id="validationCustom04"
  167. required
  168. >
  169. <option>New Water Connection</option>
  170. <option>Water Leakage</option>
  171. <option>Water Shortage</option>
  172. </select>
  173. <div className="invalid-feedback">
  174. Please select a valid state.
  175. </div>
  176. </div>
  177. <div className="col-md-6">
  178. <label for="validationCustom03" className="form-label">
  179. Building NO / Street
  180. </label>
  181. <input
  182. type="text"
  183. className="form-control"
  184. id="validationCustom03"
  185. value="5/35-1 ,River Rd, Fort Kochi"
  186. required
  187. />
  188. <div className="invalid-feedback">
  189. Please provide Building no / Street.
  190. </div>
  191. </div>
  192. <div className="col-md-6">
  193. <label for="validationCustom03" className="form-label">
  194. City
  195. </label>
  196. <input
  197. type="text"
  198. className="form-control"
  199. id="validationCustom03"
  200. value="Kochi"
  201. required
  202. />
  203. <div className="invalid-feedback">
  204. Please provide a valid city.
  205. </div>
  206. </div>
  207. <div className="col-md-6">
  208. <label for="validationCustom05" className="form-label">
  209. Zip
  210. </label>
  211. <input
  212. type="text"
  213. className="form-control"
  214. id="validationCustom05"
  215. value="682001"
  216. required
  217. />
  218. <div className="invalid-feedback">
  219. Please provide a valid zip.
  220. </div>
  221. </div>
  222. <div className="col-md-6">
  223. <div className="mb-3">
  224. <label for="formFileSm" className="form-label">Documents</label>
  225. <a type="file" className="border p-2 mx-2 text-dark text-uppercase"> Upload</a>
  226. </div>
  227. </div>
  228. <div className="col-12">
  229. <div className="form-check">
  230. <input
  231. className="form-check-input"
  232. type="checkbox"
  233. value=""
  234. id="invalidCheck"
  235. required
  236. />
  237. <label className="form-check-label" for="invalidCheck">
  238. Agree to terms and conditions
  239. </label>
  240. <div className="invalid-feedback">
  241. You must agree before submitting.
  242. </div>
  243. </div>
  244. </div>
  245. </form>
  246. </Modal.Body>
  247. <Modal.Footer>
  248. <Button variant="primary" onClick={handleClose}>
  249. Submit Request
  250. </Button>
  251. </Modal.Footer>
  252. </Modal>
  253. <div className="card-body">
  254. <div className="invoice-table">
  255. <div className="table-responsive">
  256. <table className="table">
  257. <thead>
  258. <tr>
  259. <th>
  260. <div className="form-check">
  261. <input
  262. className="form-check-input"
  263. type="checkbox"
  264. value=""
  265. id="flexCheckDefault"
  266. />
  267. </div>
  268. </th>
  269. <th>Application No</th>
  270. <th>Service</th>
  271. <th>Name</th>
  272. <th>Documents</th>
  273. <th>Mobile</th>
  274. <th>Status</th>
  275. </tr>
  276. </thead>
  277. <tbody>
  278. <tr>
  279. <td>
  280. <div className="form-check">
  281. <input
  282. className="form-check-input"
  283. type="checkbox"
  284. value=""
  285. id="flexCheckDefault"
  286. />
  287. </div>
  288. </td>
  289. <td>ABCD4556464QWE</td>
  290. <td>New Water Connection</td>
  291. <td>Jhon</td>
  292. <td>File_090-1</td>
  293. <td>5678909876</td>
  294. <td>
  295. <span className="badge px-3 py-2 bg-success">
  296. {" "}
  297. Completed
  298. </span>
  299. </td>
  300. </tr>
  301. <tr>
  302. <td>
  303. <div className="form-check">
  304. <input
  305. className="form-check-input"
  306. type="checkbox"
  307. value=""
  308. id="flexCheckDefault"
  309. />
  310. </div>
  311. </td>
  312. <td>ABMK846493CFE</td>
  313. <td>New Sewerage Connection</td>
  314. <td>Jhon</td>
  315. <td>File_08982_-1</td>
  316. <td>5678907865</td>
  317. <td>
  318. <span className="badge px-3 py-2 bg-danger ">
  319. Cancel
  320. </span>
  321. </td>
  322. </tr>
  323. <tr>
  324. <td>
  325. <div className="form-check">
  326. <input
  327. className="form-check-input"
  328. type="checkbox"
  329. value=""
  330. id="flexCheckDefault"
  331. />
  332. </div>
  333. </td>
  334. <td>ABGU745632CFE</td>
  335. <td>Water Leak</td>
  336. <td>Rajesh</td>
  337. <td>File_08_88-1</td>
  338. <td>5678903491</td>
  339. <td>
  340. <span className="badge px-3 py-2 bg-success">
  341. Completed
  342. </span>
  343. </td>
  344. </tr>
  345. <tr>
  346. <td>
  347. <div className="form-check">
  348. <input
  349. className="form-check-input"
  350. type="checkbox"
  351. value=""
  352. id="flexCheckDefault"
  353. />
  354. </div>
  355. </td>
  356. <td>ABJK879125HNE</td>
  357. <td>Water Shortage</td>
  358. <td>Karan</td>
  359. <td>File_070-1</td>
  360. <td>5678905672</td>
  361. <td>
  362. <span className="badge px-3 py-2 bg-warning ">
  363. Pending
  364. </span>
  365. </td>
  366. </tr>
  367. <tr>
  368. <td>
  369. <div className="form-check">
  370. <input
  371. className="form-check-input"
  372. type="checkbox"
  373. value=""
  374. id="flexCheckDefault"
  375. />
  376. </div>
  377. </td>
  378. <td>ABTY876545JIE</td>
  379. <td>New Water Connection</td>
  380. <td>Rathod</td>
  381. <td></td>
  382. <td>5678901232</td>
  383. <td>
  384. <span className="badge px-3 py-2 bg-success">
  385. Completed
  386. </span>
  387. </td>
  388. </tr>
  389. <tr>
  390. <td>
  391. <div className="form-check">
  392. <input
  393. className="form-check-input"
  394. type="checkbox"
  395. value=""
  396. id="flexCheckDefault"
  397. />
  398. </div>
  399. </td>
  400. <td>ABQW345678RTE</td>
  401. <td>New Sewerage Connection</td>
  402. <td>Smith</td>
  403. <td></td>
  404. <td>5678903456</td>
  405. <td>
  406. <span className="badge px-3 py-2 bg-warning ">
  407. Pending
  408. </span>
  409. </td>
  410. </tr>
  411. </tbody>
  412. </table>
  413. </div>
  414. </div>
  415. </div>
  416. </div>
  417. </div>
  418. </div>
  419. </Layout>
  420. );
  421. }
  422. export default services;