Advertisement
psi_mmobile

Untitled

Jan 18th, 2024
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. parseCAW(caw) {
  2. caw.id = caw.social_office_transaction_id;
  3. caw.selected = false;
  4. caw.workDate = caw.work_date ? new Date(caw.work_date) : null;
  5. caw.workDateWithTimeZone = caw.work_date_with_time_zone
  6. ? new Date(caw.work_date_with_time_zone)
  7. : null;
  8. caw.creationDate = caw.creation_date ? new Date(caw.creation_date) : null;
  9. caw.creationDateWithTimeZone = caw.creation_date_with_time_zone
  10. ? new Date(caw.creation_date_with_time_zone)
  11. : null;
  12. caw.cancelDate = caw.cancel_date ? new Date(caw.cancel_date) : null;
  13. caw.cancelDateWithTimeZone = caw.cancel_date_with_time_zone
  14. ? new Date(caw.cancel_date_with_time_zone)
  15. : null;
  16. if (caw.sot_admin_remark_translation) {
  17. caw.remarkArray = caw.sot_admin_remark_translation
  18. .split('\n')
  19. .filter((value) => value !== '')
  20. .map((value) => {
  21. return { remark: value };
  22. });
  23. // if (caw.remarkArray.length > 0) {
  24. // caw.remarkArray = caw.remarkArray.filter(
  25. // (value) => value.remark.length > 1
  26. // );
  27. // }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement