GSI - Employe Self Service Mobile
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

605 lines
32 KiB

2 months ago
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:google_fonts/google_fonts.dart';
  4. import 'package:employee_selfservice_mobile/Screens/Menu/SuratTugas/history_st.dart';
  5. import 'package:employee_selfservice_mobile/Screens/Menu/SuratTugas/pengajuan_st.dart';
  6. import '../SlipGaji/background.dart';
  7. import 'deklarasi_st.dart';
  8. class SuratTugas_Screen extends StatefulWidget {
  9. const SuratTugas_Screen({Key? key}) : super(key: key);
  10. @override
  11. State<SuratTugas_Screen> createState() => _SuratTugas_ScreenState();
  12. }
  13. class _SuratTugas_ScreenState extends State<SuratTugas_Screen> {
  14. var selectedCategory;
  15. var selectedDate;
  16. int _value = 0;
  17. @override
  18. Widget build(BuildContext context) {
  19. return Scaffold(
  20. body: SingleChildScrollView(
  21. child: Column(
  22. children: <Widget>[
  23. Stack(
  24. children: [
  25. WavyHeader(),
  26. Container(
  27. margin: EdgeInsets.only(top: MediaQuery.of(context).size.height/6 - 20),
  28. padding: EdgeInsets.fromLTRB(20, 5, 25, 5),
  29. child: Row(
  30. mainAxisAlignment: MainAxisAlignment.end,
  31. crossAxisAlignment: CrossAxisAlignment.end,
  32. children: [
  33. Text(
  34. 'Assignment\nLetter\t\t',
  35. style: GoogleFonts.luckiestGuy(
  36. fontSize: 28,
  37. color: Color(0xFF4858A7),
  38. fontStyle: FontStyle.italic,
  39. ),
  40. ),
  41. Image.asset(
  42. 'assets/icons/menu/ic_menu_surattugas.png',
  43. width: 40,
  44. height: 40,
  45. ),
  46. ],
  47. )),
  48. SafeArea(
  49. child: Container(
  50. width: MediaQuery.of(context).size.width,
  51. margin: EdgeInsets.only(
  52. top: MediaQuery.of(context).size.height / 5,
  53. left: 10,
  54. right: 10,
  55. ),
  56. child: Column(
  57. children: [
  58. InkWell(
  59. child: Container(
  60. margin: EdgeInsets.fromLTRB(15, 15, 15, 5),
  61. padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
  62. width: double.infinity,
  63. decoration: BoxDecoration(
  64. borderRadius: BorderRadius.circular(5),
  65. gradient: LinearGradient(colors: [
  66. Color(0xFF2D4059),
  67. Color(0xFF2D4059),
  68. /*Color(0xFFEAFFD0),
  69. Color(0xFF95E1D3),*/
  70. ])),
  71. child: Row(
  72. mainAxisAlignment: MainAxisAlignment.center,
  73. children: [
  74. Flexible(
  75. child: Text('Assignment Letter Submission\t\t',
  76. textAlign: TextAlign.center,
  77. style: TextStyle(
  78. color: Colors.white,
  79. fontSize: 17,
  80. fontWeight: FontWeight.w500))),
  81. Image.asset('assets/images/submit_st.png',
  82. width: 30,
  83. height: 30,
  84. )
  85. ],
  86. )),
  87. onTap: () {
  88. Navigator.push(
  89. context,
  90. MaterialPageRoute(
  91. builder: (context) => PengajuanST_Screen()));
  92. },
  93. ),
  94. InkWell(
  95. child: Container(
  96. margin: EdgeInsets.fromLTRB(15, 5, 15, 5),
  97. padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
  98. width: double.infinity,
  99. decoration: BoxDecoration(
  100. borderRadius: BorderRadius.circular(5),
  101. gradient: LinearGradient(colors: [
  102. Color(0xFF2D4059),
  103. Color(0xFF2D4059),
  104. /*Color(0xFFEAFFD0),
  105. Color(0xFF95E1D3),*/
  106. ])),
  107. child: Row(
  108. mainAxisAlignment: MainAxisAlignment.center,
  109. children: [
  110. Flexible(
  111. child: Text('Declaration of Assignment Letter\t\t',
  112. textAlign: TextAlign.center,
  113. style: TextStyle(
  114. color: Colors.white,
  115. fontSize: 17,
  116. fontWeight: FontWeight.w500))),
  117. Image.asset('assets/images/declaration.png',
  118. width: 30,
  119. height: 30,
  120. )
  121. ],
  122. )),
  123. onTap: () {
  124. Navigator.push(
  125. context,
  126. MaterialPageRoute(
  127. builder: (context) => DeklarasiST_Screen()));
  128. },
  129. ),
  130. InkWell(
  131. child: Container(
  132. margin: EdgeInsets.fromLTRB(15, 5, 15, 5),
  133. padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
  134. width: double.infinity,
  135. decoration: BoxDecoration(
  136. borderRadius: BorderRadius.circular(5),
  137. gradient: LinearGradient(colors: [
  138. Color(0xFF2D4059),
  139. Color(0xFF2D4059),
  140. /*Color(0xFFEAFFD0),
  141. Color(0xFF95E1D3),*/
  142. ])),
  143. child: Row(
  144. mainAxisAlignment: MainAxisAlignment.center,
  145. children: [
  146. Flexible(
  147. child: Text('See Assignment Letter History\t\t',
  148. textAlign: TextAlign.center,
  149. style: TextStyle(
  150. color: Colors.white,
  151. fontSize: 17,
  152. fontWeight: FontWeight.w500))),
  153. Image.asset('assets/images/ic_history.png',
  154. width: 30,
  155. height: 30,
  156. )
  157. ],
  158. )),
  159. onTap: () {
  160. Navigator.push(
  161. context,
  162. MaterialPageRoute(
  163. builder: (context) => HistoryST()));
  164. },
  165. ),
  166. InkWell(
  167. child: Container(
  168. margin: EdgeInsets.fromLTRB(15, 5, 15, 5),
  169. padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
  170. width: double.infinity,
  171. decoration: BoxDecoration(
  172. borderRadius: BorderRadius.circular(5),
  173. gradient: LinearGradient(colors: [
  174. Color(0xFF2D4059),
  175. Color(0xFF2D4059),
  176. /*Color(0xFFEAFFD0),
  177. Color(0xFF95E1D3),*/
  178. ])),
  179. child: Row(
  180. mainAxisAlignment: MainAxisAlignment.center,
  181. children: [
  182. Flexible(
  183. child: Text('Additional Advance Payment\t\t',
  184. textAlign: TextAlign.center,
  185. style: TextStyle(
  186. color: Colors.white,
  187. fontSize: 17,
  188. fontWeight: FontWeight.w500))),
  189. Image.asset('assets/images/extra_money.png',
  190. width: 30,
  191. height: 30,
  192. )
  193. ],
  194. )),
  195. onTap: () {},
  196. ),
  197. InkWell(
  198. child: Container(
  199. margin: EdgeInsets.fromLTRB(15, 5, 15, 5),
  200. padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
  201. width: double.infinity,
  202. decoration: BoxDecoration(
  203. borderRadius: BorderRadius.circular(5),
  204. gradient: LinearGradient(colors: [
  205. Color(0xFF2D4059),
  206. Color(0xFF2D4059),
  207. /*Color(0xFFEAFFD0),
  208. Color(0xFF95E1D3),*/
  209. ])),
  210. child: Row(
  211. mainAxisAlignment: MainAxisAlignment.center,
  212. children: [
  213. Flexible(
  214. child: Text('Return Date Extension\t\t',
  215. textAlign: TextAlign.center,
  216. style: TextStyle(
  217. color: Colors.white,
  218. fontSize: 17,
  219. fontWeight: FontWeight.w500))),
  220. Image.asset('assets/images/extend_tanggal.png',
  221. width: 30,
  222. height: 30,
  223. )
  224. ],
  225. )),
  226. onTap: () {}
  227. ),
  228. /*Container(
  229. child: Card(
  230. elevation: 10,
  231. child: Container(
  232. decoration: BoxDecoration(
  233. color: Color(0XFFFAF7EE),
  234. borderRadius: BorderRadius.circular(10)),
  235. child: Column(
  236. children: [
  237. Container(
  238. margin: EdgeInsets.only(
  239. left: 10, right: 10, top: 10, bottom: 10),
  240. child: Row(
  241. children: [
  242. Expanded(
  243. flex: 3,
  244. child: Text(
  245. 'Kategori\t:\t',
  246. style: GoogleFonts.inconsolata(
  247. fontSize: 17),
  248. )),
  249. Expanded(
  250. flex: 7,
  251. child: Container(
  252. decoration: BoxDecoration(
  253. color:
  254. CupertinoColors.systemGrey2,
  255. borderRadius:
  256. BorderRadius.circular(5)),
  257. child: DropdownButton(
  258. value: this.selectedCategory,
  259. isExpanded: true,
  260. underline: SizedBox(),
  261. hint: Text(
  262. '\t\t\tPilih Kategori',
  263. style: TextStyle(
  264. color: Colors.black54),
  265. ),
  266. onChanged: (value) {
  267. print(value);
  268. setState(() {
  269. selectedCategory = value!;
  270. });
  271. },
  272. items: reimburseCategory
  273. .map(
  274. (e) => DropdownMenuItem(
  275. value: e,
  276. child:
  277. Text("\t\t\t" + e)),
  278. )
  279. .toList(),
  280. ),
  281. )),
  282. ],
  283. ),
  284. ),
  285. Container(
  286. margin: EdgeInsets.only(
  287. left: 10, right: 10, top: 10, bottom: 10),
  288. child: Column(
  289. children: [
  290. Row(
  291. children: [
  292. Expanded(
  293. flex: 3,
  294. child: Text(
  295. 'Tanggal\t:\t',
  296. style: GoogleFonts.inconsolata(
  297. fontSize: 17),
  298. )),
  299. Expanded(
  300. flex: 7,
  301. child: Container(
  302. decoration: BoxDecoration(
  303. color: CupertinoColors
  304. .systemGrey2,
  305. borderRadius:
  306. BorderRadius.circular(
  307. 5)),
  308. child: Column(
  309. children: [
  310. DropdownButton(
  311. value: this.selectedDate,
  312. isExpanded: true,
  313. underline: SizedBox(),
  314. hint: Text(
  315. '\t\t\tPilih Tanggal',
  316. style: TextStyle(
  317. color:
  318. Colors.black54),
  319. ),
  320. onChanged: (value) {
  321. print(value);
  322. setState(() {
  323. selectedDate = value!;
  324. });
  325. },
  326. items: reimburseCategory
  327. .map(
  328. (e) =>
  329. DropdownMenuItem(
  330. value: e,
  331. child: Text(
  332. "\t\t\t" +
  333. e)),
  334. )
  335. .toList(),
  336. ),
  337. ],
  338. ),
  339. )),
  340. ],
  341. ),
  342. ],
  343. ),
  344. ),
  345. Container(
  346. margin: EdgeInsets.only(
  347. left: 10, right: 10, top: 10, bottom: 10),
  348. child: Row(
  349. children: [
  350. Expanded(
  351. flex: 3,
  352. child: Text(
  353. 'Total Harga\t:\t',
  354. style: GoogleFonts.inconsolata(
  355. fontSize: 17),
  356. )),
  357. Expanded(
  358. flex: 7,
  359. child: Container(
  360. decoration: BoxDecoration(
  361. color: Colors.white,
  362. borderRadius:
  363. BorderRadius.circular(5)),
  364. child: Padding(
  365. padding: EdgeInsets.only(
  366. left: 10,
  367. right: 10,
  368. top: 5,
  369. bottom: 5),
  370. child: TextFormField(
  371. keyboardType:
  372. TextInputType.number,
  373. maxLines: 1,
  374. textInputAction:
  375. TextInputAction.next,
  376. decoration: InputDecoration(
  377. border:
  378. InputBorder.none,
  379. hintText:
  380. "Masukkan tanpa tanda baca (.) atau (,)")),
  381. ))),
  382. ],
  383. ),
  384. ),
  385. Container(
  386. margin: EdgeInsets.only(
  387. left: 10, right: 10, top: 10, bottom: 10),
  388. child: Row(
  389. children: [
  390. Expanded(
  391. flex: 3,
  392. child: Text(
  393. 'Deskripsi\t:\t',
  394. style: GoogleFonts.inconsolata(
  395. fontSize: 17),
  396. )),
  397. Expanded(
  398. flex: 7,
  399. child: Container(
  400. decoration: BoxDecoration(
  401. color: Colors.white,
  402. borderRadius:
  403. BorderRadius.circular(5)),
  404. child: Padding(
  405. padding: EdgeInsets.only(
  406. left: 10,
  407. right: 10,
  408. top: 5,
  409. bottom: 5),
  410. child: TextFormField(
  411. keyboardType:
  412. TextInputType.multiline,
  413. maxLines: null,
  414. textInputAction:
  415. TextInputAction.done,
  416. decoration: InputDecoration(
  417. border:
  418. InputBorder.none,
  419. hintText: "Deskripsi")),
  420. ))),
  421. ],
  422. ),
  423. ),
  424. Container(
  425. margin: EdgeInsets.only(
  426. left: 10, right: 10, top: 10, bottom: 10),
  427. child: Column(
  428. children: [
  429. Row(
  430. children: [
  431. Expanded(
  432. flex: 3,
  433. child: Text(
  434. 'Pembayaran\t:',
  435. style: GoogleFonts.inconsolata(
  436. fontSize: 17),
  437. )),
  438. Expanded(
  439. flex: 7,
  440. child: Container(
  441. child: Column(
  442. children: [
  443. Row(
  444. children: [
  445. Radio(
  446. value: 1,
  447. groupValue: _value,
  448. onChanged: (value) {
  449. setState(() {
  450. _value = value!;
  451. });
  452. },
  453. ),
  454. Flexible(
  455. child: Text(
  456. "Karyawan (Perlu Reimburse)",
  457. style:
  458. TextStyle(
  459. color: Colors
  460. .black54,
  461. ))),
  462. ],
  463. ),
  464. Row(
  465. children: [
  466. Radio(
  467. value: 2,
  468. groupValue: _value,
  469. onChanged: (value) {
  470. setState(() {
  471. _value = value!;
  472. });
  473. },
  474. ),
  475. Flexible(
  476. child: Text(
  477. "Perusahaan",
  478. style: TextStyle(
  479. color: Colors
  480. .black54)))
  481. ],
  482. ),
  483. ],
  484. ),
  485. )),
  486. ],
  487. ),
  488. ],
  489. ),
  490. ),
  491. Container(
  492. margin: EdgeInsets.only(
  493. left: 10, right: 10, top: 10, bottom: 10),
  494. child: Column(
  495. children: [
  496. Row(
  497. children: [
  498. Expanded(
  499. flex: 3,
  500. child: Text(
  501. 'Lampiran\t:\t',
  502. style: GoogleFonts.inconsolata(
  503. fontSize: 17),
  504. ),
  505. ),
  506. Expanded(
  507. flex: 7,
  508. child: Container(
  509. child: ElevatedButton(
  510. onPressed: () {},
  511. child: Container(
  512. width: double.infinity,
  513. child: Text("Pilih File"),
  514. ),
  515. ),
  516. ),
  517. )
  518. ],
  519. ),
  520. Row(
  521. children: [
  522. Expanded(
  523. flex: 3,
  524. child: Text(
  525. '',
  526. style: GoogleFonts.inconsolata(
  527. fontSize: 17),
  528. ),
  529. ),
  530. Expanded(
  531. flex: 7,
  532. child: Visibility(
  533. visible: true,
  534. child: Container(
  535. alignment:
  536. Alignment.centerLeft,
  537. margin: EdgeInsets.only(
  538. left: 15,
  539. right: 15,
  540. bottom: 10),
  541. child: Flexible(
  542. child: Text(
  543. "Selected File",
  544. style: TextStyle(
  545. color:
  546. Colors.black54),
  547. ),
  548. ),
  549. )),
  550. )
  551. ],
  552. ),
  553. InkWell(
  554. child: Container(
  555. padding: EdgeInsets.fromLTRB(
  556. 10, 10, 10, 10),
  557. width: double.infinity,
  558. decoration: BoxDecoration(
  559. borderRadius:
  560. BorderRadius.circular(5),
  561. gradient: LinearGradient(colors: [
  562. Color(0xFFFF9945),
  563. Color(0xFFFc6076)
  564. ])),
  565. child: Text('Ajukan',
  566. textAlign: TextAlign.center,
  567. style: TextStyle(
  568. color: Colors.white,
  569. fontSize: 17,
  570. fontWeight: FontWeight.w500)),
  571. ),
  572. onTap: () {},
  573. )
  574. ],
  575. ),
  576. ),
  577. ],
  578. ),
  579. ),
  580. ),
  581. ),*/
  582. ],
  583. ),
  584. ),
  585. ),
  586. ],
  587. ),
  588. ],
  589. )),
  590. );
  591. }
  592. }
  593. List<String> reimburseCategory = [
  594. "Paid Time Off",
  595. "Sick Time Off",
  596. "Compensatory Days",
  597. "Unpaid"
  598. ];