jornada-ui 0.4.10 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -31
- package/lib/commonjs/common/icons-svg/bluetooth/index.js +45 -27
- package/lib/commonjs/common/icons-svg/bluetooth/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/constants/index.js +7 -5
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/index.js +19 -4
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/plus-container/index.js +42 -0
- package/lib/commonjs/common/icons-svg/plus-container/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/trash/index.js +41 -0
- package/lib/commonjs/common/icons-svg/trash/index.js.map +1 -0
- package/lib/commonjs/components/activity-step/components/activite-row/index.js +137 -0
- package/lib/commonjs/components/activity-step/components/activite-row/index.js.map +1 -0
- package/lib/commonjs/components/activity-step/index.js +77 -0
- package/lib/commonjs/components/activity-step/index.js.map +1 -0
- package/lib/commonjs/components/activity-step/interface.js +6 -0
- package/lib/commonjs/components/activity-step/interface.js.map +1 -0
- package/lib/commonjs/components/activity-step/styles.js +86 -0
- package/lib/commonjs/components/activity-step/styles.js.map +1 -0
- package/lib/commonjs/components/card-scheduled-journey/index.js +8 -6
- package/lib/commonjs/components/card-scheduled-journey/index.js.map +1 -1
- package/lib/commonjs/components/inputs/input-date-time/index.js +136 -0
- package/lib/commonjs/components/inputs/input-date-time/index.js.map +1 -0
- package/lib/commonjs/components/inputs/input-date-time/interface.d.js +2 -0
- package/lib/commonjs/components/inputs/input-date-time/interface.d.js.map +1 -0
- package/lib/commonjs/components/inputs/input-date-time/styles.js +66 -0
- package/lib/commonjs/components/inputs/input-date-time/styles.js.map +1 -0
- package/lib/commonjs/components/list-devices/helpers/get-icon-by-status.js +25 -0
- package/lib/commonjs/components/list-devices/helpers/get-icon-by-status.js.map +1 -0
- package/lib/commonjs/components/list-devices/index.js +97 -0
- package/lib/commonjs/components/list-devices/index.js.map +1 -0
- package/lib/commonjs/components/list-devices/interface.d.js +2 -0
- package/lib/commonjs/components/list-devices/interface.d.js.map +1 -0
- package/lib/commonjs/components/list-devices/styles.js +60 -0
- package/lib/commonjs/components/list-devices/styles.js.map +1 -0
- package/lib/commonjs/components/list-supplies/index.js +171 -0
- package/lib/commonjs/components/list-supplies/index.js.map +1 -0
- package/lib/commonjs/components/list-supplies/interface.d.js +2 -0
- package/lib/commonjs/components/list-supplies/interface.d.js.map +1 -0
- package/lib/commonjs/components/maintenance-description-input/index.js +3 -0
- package/lib/commonjs/components/maintenance-description-input/index.js.map +1 -1
- package/lib/commonjs/components/maintenance-description-input/styles.js +1 -1
- package/lib/commonjs/components/maintenance-description-input/styles.js.map +1 -1
- package/lib/commonjs/components/modals/modal-activity-reason/index.js +170 -0
- package/lib/commonjs/components/modals/modal-activity-reason/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js +2 -0
- package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js.map +1 -0
- package/lib/commonjs/components/modals/modal-create-activitie/helpers/index.js +27 -0
- package/lib/commonjs/components/modals/modal-create-activitie/helpers/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-create-activitie/index.js +203 -0
- package/lib/commonjs/components/modals/modal-create-activitie/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-create-activitie/interface.js +2 -0
- package/lib/commonjs/components/modals/modal-create-activitie/interface.js.map +1 -0
- package/lib/commonjs/components/modals/modal-create-activitie/styles.js +42 -0
- package/lib/commonjs/components/modals/modal-create-activitie/styles.js.map +1 -0
- package/lib/commonjs/components/modals/modal-exclude-activitie/index.js +2 -0
- package/lib/commonjs/components/modals/modal-exclude-activitie/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/index.js +242 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/interface.d.js +2 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/interface.d.js.map +1 -0
- package/lib/commonjs/components/modals/modal-to-confimations/index.js +182 -0
- package/lib/commonjs/components/modals/modal-to-confimations/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-to-confimations/interface.js +2 -0
- package/lib/commonjs/components/modals/modal-to-confimations/interface.js.map +1 -0
- package/lib/commonjs/components/selects/select-date-and-hours/index.js +80 -0
- package/lib/commonjs/components/selects/select-date-and-hours/index.js.map +1 -0
- package/lib/commonjs/components/selects/select-date-and-hours/interface.js +6 -0
- package/lib/commonjs/components/selects/select-date-and-hours/interface.js.map +1 -0
- package/lib/commonjs/components/selects/select-date-and-hours/styles.js +34 -0
- package/lib/commonjs/components/selects/select-date-and-hours/styles.js.map +1 -0
- package/lib/commonjs/components/selects/select-option/index.js +4 -2
- package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
- package/lib/commonjs/components/selects/select-option/styles.js +6 -7
- package/lib/commonjs/components/selects/select-option/styles.js.map +1 -1
- package/lib/commonjs/components/supply-error-card/index.js +7 -6
- package/lib/commonjs/components/supply-error-card/index.js.map +1 -1
- package/lib/commonjs/components/toast-message/index.js +8 -7
- package/lib/commonjs/components/toast-message/index.js.map +1 -1
- package/lib/commonjs/components/travel-history/index.js +7 -7
- package/lib/commonjs/components/travel-history/index.js.map +1 -1
- package/lib/commonjs/components/trip-details-card/index.js +94 -13
- package/lib/commonjs/components/trip-details-card/index.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +5 -5
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/index.js +53 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/list-devices/list-devices.stories.js +146 -0
- package/lib/commonjs/stories/list-devices/list-devices.stories.js.map +1 -0
- package/lib/commonjs/stories/list-supplies/list-supplies.stories.js +69 -0
- package/lib/commonjs/stories/list-supplies/list-supplies.stories.js.map +1 -0
- package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js +63 -0
- package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -0
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +63 -0
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -0
- package/lib/commonjs/stories/supply-error-card/supply-error-card.stories.js +12 -12
- package/lib/commonjs/stories/supply-error-card/supply-error-card.stories.js.map +1 -1
- package/lib/commonjs/stories/trip-details-card/trip-details-card.stories.js +39 -6
- package/lib/commonjs/stories/trip-details-card/trip-details-card.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +1 -0
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/module/common/icons-svg/bluetooth/index.js +45 -27
- package/lib/module/common/icons-svg/bluetooth/index.js.map +1 -1
- package/lib/module/common/icons-svg/constants/index.js +7 -5
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/index.js +19 -4
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/common/icons-svg/plus-container/index.js +36 -0
- package/lib/module/common/icons-svg/plus-container/index.js.map +1 -0
- package/lib/module/common/icons-svg/trash/index.js +34 -0
- package/lib/module/common/icons-svg/trash/index.js.map +1 -0
- package/lib/module/components/activity-step/components/activite-row/index.js +134 -0
- package/lib/module/components/activity-step/components/activite-row/index.js.map +1 -0
- package/lib/module/components/activity-step/index.js +73 -0
- package/lib/module/components/activity-step/index.js.map +1 -0
- package/lib/module/components/activity-step/interface.js +4 -0
- package/lib/module/components/activity-step/interface.js.map +1 -0
- package/lib/module/components/activity-step/styles.js +83 -0
- package/lib/module/components/activity-step/styles.js.map +1 -0
- package/lib/module/components/card-scheduled-journey/index.js +8 -6
- package/lib/module/components/card-scheduled-journey/index.js.map +1 -1
- package/lib/module/components/inputs/input-date-time/index.js +130 -0
- package/lib/module/components/inputs/input-date-time/index.js.map +1 -0
- package/lib/module/components/inputs/input-date-time/interface.d.js +2 -0
- package/lib/module/components/inputs/input-date-time/interface.d.js.map +1 -0
- package/lib/module/components/inputs/input-date-time/styles.js +62 -0
- package/lib/module/components/inputs/input-date-time/styles.js.map +1 -0
- package/lib/module/components/list-devices/helpers/get-icon-by-status.js +21 -0
- package/lib/module/components/list-devices/helpers/get-icon-by-status.js.map +1 -0
- package/lib/module/components/list-devices/index.js +93 -0
- package/lib/module/components/list-devices/index.js.map +1 -0
- package/lib/module/components/list-devices/interface.d.js +2 -0
- package/lib/module/components/list-devices/interface.d.js.map +1 -0
- package/lib/module/components/list-devices/styles.js +56 -0
- package/lib/module/components/list-devices/styles.js.map +1 -0
- package/lib/module/components/list-supplies/index.js +165 -0
- package/lib/module/components/list-supplies/index.js.map +1 -0
- package/lib/module/components/list-supplies/interface.d.js +2 -0
- package/lib/module/components/list-supplies/interface.d.js.map +1 -0
- package/lib/module/components/maintenance-description-input/index.js +3 -0
- package/lib/module/components/maintenance-description-input/index.js.map +1 -1
- package/lib/module/components/maintenance-description-input/styles.js +1 -1
- package/lib/module/components/maintenance-description-input/styles.js.map +1 -1
- package/lib/module/components/modals/modal-activity-reason/index.js +165 -0
- package/lib/module/components/modals/modal-activity-reason/index.js.map +1 -0
- package/lib/module/components/modals/modal-activity-reason/interface.d.js +2 -0
- package/lib/module/components/modals/modal-activity-reason/interface.d.js.map +1 -0
- package/lib/module/components/modals/modal-create-activitie/helpers/index.js +24 -0
- package/lib/module/components/modals/modal-create-activitie/helpers/index.js.map +1 -0
- package/lib/module/components/modals/modal-create-activitie/index.js +196 -0
- package/lib/module/components/modals/modal-create-activitie/index.js.map +1 -0
- package/lib/module/components/modals/modal-create-activitie/interface.js +2 -0
- package/lib/module/components/modals/modal-create-activitie/interface.js.map +1 -0
- package/lib/module/components/modals/modal-create-activitie/styles.js +39 -0
- package/lib/module/components/modals/modal-create-activitie/styles.js.map +1 -0
- package/lib/module/components/modals/modal-exclude-activitie/index.js +2 -0
- package/lib/module/components/modals/modal-exclude-activitie/index.js.map +1 -0
- package/lib/module/components/modals/modal-journey-rectification/index.js +236 -0
- package/lib/module/components/modals/modal-journey-rectification/index.js.map +1 -0
- package/lib/module/components/modals/modal-journey-rectification/interface.d.js +2 -0
- package/lib/module/components/modals/modal-journey-rectification/interface.d.js.map +1 -0
- package/lib/module/components/modals/modal-to-confimations/index.js +179 -0
- package/lib/module/components/modals/modal-to-confimations/index.js.map +1 -0
- package/lib/module/components/modals/modal-to-confimations/interface.js +2 -0
- package/lib/module/components/modals/modal-to-confimations/interface.js.map +1 -0
- package/lib/module/components/selects/select-date-and-hours/index.js +74 -0
- package/lib/module/components/selects/select-date-and-hours/index.js.map +1 -0
- package/lib/module/components/selects/select-date-and-hours/interface.js +4 -0
- package/lib/module/components/selects/select-date-and-hours/interface.js.map +1 -0
- package/lib/module/components/selects/select-date-and-hours/styles.js +31 -0
- package/lib/module/components/selects/select-date-and-hours/styles.js.map +1 -0
- package/lib/module/components/selects/select-option/index.js +4 -2
- package/lib/module/components/selects/select-option/index.js.map +1 -1
- package/lib/module/components/selects/select-option/styles.js +6 -7
- package/lib/module/components/selects/select-option/styles.js.map +1 -1
- package/lib/module/components/supply-error-card/index.js +7 -6
- package/lib/module/components/supply-error-card/index.js.map +1 -1
- package/lib/module/components/toast-message/index.js +8 -7
- package/lib/module/components/toast-message/index.js.map +1 -1
- package/lib/module/components/travel-history/index.js +7 -7
- package/lib/module/components/travel-history/index.js.map +1 -1
- package/lib/module/components/trip-details-card/index.js +94 -13
- package/lib/module/components/trip-details-card/index.js.map +1 -1
- package/lib/module/components/typography/index.js +5 -5
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/list-devices/list-devices.stories.js +140 -0
- package/lib/module/stories/list-devices/list-devices.stories.js.map +1 -0
- package/lib/module/stories/list-supplies/list-supplies.stories.js +63 -0
- package/lib/module/stories/list-supplies/list-supplies.stories.js.map +1 -0
- package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js +57 -0
- package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -0
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +57 -0
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -0
- package/lib/module/stories/supply-error-card/supply-error-card.stories.js +12 -12
- package/lib/module/stories/supply-error-card/supply-error-card.stories.js.map +1 -1
- package/lib/module/stories/trip-details-card/trip-details-card.stories.js +39 -6
- package/lib/module/stories/trip-details-card/trip-details-card.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +1 -0
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/bluetooth/index.d.ts +5 -1
- package/lib/typescript/commonjs/src/common/icons-svg/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/plus-container/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/common/icons-svg/plus-container/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/common/icons-svg/trash/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/common/icons-svg/trash/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/activity-step/components/activite-row/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/activity-step/components/activite-row/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/activity-step/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/activity-step/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/activity-step/interface.d.ts +40 -0
- package/lib/typescript/commonjs/src/components/activity-step/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/activity-step/styles.d.ts +75 -0
- package/lib/typescript/commonjs/src/components/activity-step/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts +59 -0
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/list-devices/helpers/get-icon-by-status.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/list-devices/helpers/get-icon-by-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/list-devices/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/list-devices/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/list-devices/styles.d.ts +57 -0
- package/lib/typescript/commonjs/src/components/list-devices/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/list-supplies/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/list-supplies/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-activity-reason/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/modals/modal-activity-reason/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/helpers/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/helpers/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/interface.d.ts +19 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/styles.d.ts +33 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-exclude-activitie/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-exclude-activitie/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-journey-rectification/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/modals/modal-journey-rectification/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/interface.d.ts +28 -0
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/interface.d.ts +22 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/styles.d.ts +26 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-option/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-option/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/selects/select-option/styles.d.ts +0 -1
- package/lib/typescript/commonjs/src/components/selects/select-option/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/supply-error-card/index.d.ts +3 -8
- package/lib/typescript/commonjs/src/components/supply-error-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/trip-details-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/list-devices/list-devices.stories.d.ts +22 -0
- package/lib/typescript/commonjs/src/stories/list-devices/list-devices.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/list-supplies/list-supplies.stories.d.ts +10 -0
- package/lib/typescript/commonjs/src/stories/list-supplies/list-supplies.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts +10 -0
- package/lib/typescript/commonjs/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +10 -0
- package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/trip-details-card/trip-details-card.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/bluetooth/index.d.ts +5 -1
- package/lib/typescript/module/src/common/icons-svg/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts +2 -0
- package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/plus-container/index.d.ts +11 -0
- package/lib/typescript/module/src/common/icons-svg/plus-container/index.d.ts.map +1 -0
- package/lib/typescript/module/src/common/icons-svg/trash/index.d.ts +11 -0
- package/lib/typescript/module/src/common/icons-svg/trash/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/activity-step/components/activite-row/index.d.ts +11 -0
- package/lib/typescript/module/src/components/activity-step/components/activite-row/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/activity-step/index.d.ts +17 -0
- package/lib/typescript/module/src/components/activity-step/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/activity-step/interface.d.ts +40 -0
- package/lib/typescript/module/src/components/activity-step/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/activity-step/styles.d.ts +75 -0
- package/lib/typescript/module/src/components/activity-step/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts +2 -1
- package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/inputs/input-date-time/index.d.ts +8 -0
- package/lib/typescript/module/src/components/inputs/input-date-time/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts +59 -0
- package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/list-devices/helpers/get-icon-by-status.d.ts +15 -0
- package/lib/typescript/module/src/components/list-devices/helpers/get-icon-by-status.d.ts.map +1 -0
- package/lib/typescript/module/src/components/list-devices/index.d.ts +11 -0
- package/lib/typescript/module/src/components/list-devices/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/list-devices/styles.d.ts +57 -0
- package/lib/typescript/module/src/components/list-devices/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/list-supplies/index.d.ts +8 -0
- package/lib/typescript/module/src/components/list-supplies/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-activity-reason/index.d.ts +8 -0
- package/lib/typescript/module/src/components/modals/modal-activity-reason/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/helpers/index.d.ts +21 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/helpers/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/index.d.ts +8 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/interface.d.ts +19 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/styles.d.ts +33 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-exclude-activitie/index.d.ts +1 -0
- package/lib/typescript/module/src/components/modals/modal-exclude-activitie/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-journey-rectification/index.d.ts +8 -0
- package/lib/typescript/module/src/components/modals/modal-journey-rectification/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-to-confimations/index.d.ts +8 -0
- package/lib/typescript/module/src/components/modals/modal-to-confimations/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-to-confimations/interface.d.ts +28 -0
- package/lib/typescript/module/src/components/modals/modal-to-confimations/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts +13 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/interface.d.ts +22 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/styles.d.ts +26 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-option/index.d.ts +1 -0
- package/lib/typescript/module/src/components/selects/select-option/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/selects/select-option/styles.d.ts +0 -1
- package/lib/typescript/module/src/components/selects/select-option/styles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/supply-error-card/index.d.ts +3 -8
- package/lib/typescript/module/src/components/supply-error-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/trip-details-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +7 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/list-devices/list-devices.stories.d.ts +22 -0
- package/lib/typescript/module/src/stories/list-devices/list-devices.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/list-supplies/list-supplies.stories.d.ts +10 -0
- package/lib/typescript/module/src/stories/list-supplies/list-supplies.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts +10 -0
- package/lib/typescript/module/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +10 -0
- package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/trip-details-card/trip-details-card.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/common/icons-svg/bluetooth/index.tsx +51 -24
- package/src/common/icons-svg/constants/index.ts +67 -65
- package/src/common/icons-svg/index.tsx +289 -280
- package/src/common/icons-svg/plus-container/index.tsx +32 -0
- package/src/common/icons-svg/trash/index.tsx +31 -0
- package/src/components/activity-step/components/activite-row/index.tsx +141 -0
- package/src/components/activity-step/index.tsx +73 -0
- package/src/components/activity-step/interface.ts +54 -0
- package/src/components/activity-step/styles.ts +72 -0
- package/src/components/card-scheduled-journey/index.tsx +140 -138
- package/src/components/card-scheduled-journey/interface.d.ts +145 -140
- package/src/components/inputs/input-date-time/index.tsx +133 -0
- package/src/components/inputs/input-date-time/interface.d.ts +25 -0
- package/src/components/inputs/input-date-time/styles.ts +63 -0
- package/src/components/list-devices/helpers/get-icon-by-status.tsx +20 -0
- package/src/components/list-devices/index.tsx +102 -0
- package/src/components/list-devices/interface.d.ts +36 -0
- package/src/components/list-devices/styles.ts +68 -0
- package/src/components/list-supplies/index.tsx +153 -0
- package/src/components/list-supplies/interface.d.ts +9 -0
- package/src/components/maintenance-description-input/index.tsx +1 -0
- package/src/components/maintenance-description-input/styles.ts +1 -1
- package/src/components/modals/modal-activity-reason/index.tsx +168 -0
- package/src/components/modals/modal-activity-reason/interface.d.ts +9 -0
- package/src/components/modals/modal-create-activitie/helpers/index.ts +14 -0
- package/src/components/modals/modal-create-activitie/index.tsx +210 -0
- package/src/components/modals/modal-create-activitie/interface.ts +22 -0
- package/src/components/modals/modal-create-activitie/styles.ts +24 -0
- package/src/components/modals/modal-exclude-activitie/index.ts +0 -0
- package/src/components/modals/modal-journey-rectification/index.tsx +236 -0
- package/src/components/modals/modal-journey-rectification/interface.d.ts +10 -0
- package/src/components/modals/modal-to-confimations/index.tsx +182 -0
- package/src/components/modals/modal-to-confimations/interface.ts +36 -0
- package/src/components/selects/select-date-and-hours/index.tsx +70 -0
- package/src/components/selects/select-date-and-hours/interface.ts +31 -0
- package/src/components/selects/select-date-and-hours/styles.ts +24 -0
- package/src/components/selects/select-option/index.tsx +2 -1
- package/src/components/selects/select-option/interface.d.ts +1 -1
- package/src/components/selects/select-option/styles.ts +74 -75
- package/src/components/supply-error-card/index.tsx +10 -6
- package/src/components/supply-error-card/interface.d.ts +3 -9
- package/src/components/toast-message/index.tsx +75 -74
- package/src/components/travel-history/index.tsx +7 -7
- package/src/components/trip-details-card/index.tsx +89 -12
- package/src/components/trip-details-card/interface.d.ts +4 -1
- package/src/components/typography/index.tsx +78 -78
- package/src/index.tsx +7 -0
- package/src/stories/list-devices/list-devices.stories.tsx +114 -0
- package/src/stories/list-supplies/list-supplies.stories.tsx +66 -0
- package/src/stories/modal-activity-reason/modal-activity-reason.stories.tsx +60 -0
- package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +60 -0
- package/src/stories/supply-error-card/supply-error-card.stories.tsx +12 -12
- package/src/stories/trip-details-card/trip-details-card.stories.tsx +38 -5
- package/src/styles/theme/theme.ts +1 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { type IListDevices } from "./interface";
|
|
3
|
+
import { theme } from "../../styles/theme/theme";
|
|
4
|
+
|
|
5
|
+
type Extra = { disabled?: boolean; isSelected?: boolean };
|
|
6
|
+
|
|
7
|
+
const styles = (props: Partial<IListDevices & Extra> = {}) =>
|
|
8
|
+
StyleSheet.create({
|
|
9
|
+
containerIndicator: {
|
|
10
|
+
width: "100%",
|
|
11
|
+
flexDirection: "row",
|
|
12
|
+
justifyContent: "flex-start",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
marginTop: 8,
|
|
15
|
+
paddingVertical: 8,
|
|
16
|
+
paddingHorizontal: 8,
|
|
17
|
+
opacity: props.disabled ? 0.6 : 1,
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
containerIndicatorSelected: {
|
|
21
|
+
backgroundColor: theme.colors.green[250],
|
|
22
|
+
borderRadius: 30,
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
separator: {
|
|
26
|
+
borderBottomWidth: 1,
|
|
27
|
+
borderBottomColor: props.isSelected
|
|
28
|
+
? "transparent"
|
|
29
|
+
: theme.colors.gray[700],
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
title: {
|
|
33
|
+
color: props.titleColor ?? theme.colors.black[10],
|
|
34
|
+
textAlign: "center",
|
|
35
|
+
lineHeight: 20,
|
|
36
|
+
fontSize: theme.fontSizes.sm,
|
|
37
|
+
fontWeight: "500",
|
|
38
|
+
marginLeft: theme.margins.xs,
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
titleSelected: {
|
|
42
|
+
color: theme.colors.neutral[25],
|
|
43
|
+
fontWeight: "600",
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
titleDescription: {
|
|
47
|
+
color: props.textColorDescription ?? theme.colors.gray[600],
|
|
48
|
+
textAlign: "center",
|
|
49
|
+
lineHeight: 16,
|
|
50
|
+
fontSize: 18,
|
|
51
|
+
fontFamily: theme.fonts.inter_light_300,
|
|
52
|
+
marginLeft: theme.margins.xs,
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
descSelected: {
|
|
56
|
+
color: theme.colors.neutral[25],
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
containerMain: {
|
|
60
|
+
width: "100%",
|
|
61
|
+
flexDirection: "column",
|
|
62
|
+
alignItems: "flex-start",
|
|
63
|
+
marginLeft: 2,
|
|
64
|
+
justifyContent: "center",
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export { styles };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { useEffect } from "react";
|
|
5
|
+
import { Image, View, UIManager, Platform } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../../components/box";
|
|
9
|
+
import Typography from "../../components/typography";
|
|
10
|
+
|
|
11
|
+
// style
|
|
12
|
+
import { theme } from "../../styles/theme/theme";
|
|
13
|
+
|
|
14
|
+
// typings
|
|
15
|
+
import type { IListSupplies } from "./interface";
|
|
16
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
17
|
+
|
|
18
|
+
const ListSupplies: React.FC<IListSupplies> = ({
|
|
19
|
+
dataRegistro,
|
|
20
|
+
namePosto,
|
|
21
|
+
litragem,
|
|
22
|
+
valor,
|
|
23
|
+
imagemUrl,
|
|
24
|
+
corBarra,
|
|
25
|
+
}) => {
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
|
|
29
|
+
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
30
|
+
}
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Box
|
|
35
|
+
width={"100%"}
|
|
36
|
+
flexStyle={{ flexDirection: "row" }}
|
|
37
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
38
|
+
borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
|
|
39
|
+
>
|
|
40
|
+
{/* faixa lateral */}
|
|
41
|
+
<View
|
|
42
|
+
style={{
|
|
43
|
+
width: 15,
|
|
44
|
+
backgroundColor: corBarra ?? theme.colors.blue[375],
|
|
45
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
46
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium,
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
<Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings["2xs"] }}>
|
|
51
|
+
<Box
|
|
52
|
+
marginStyle={{ marginBottom: theme.margins.fn}}
|
|
53
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
54
|
+
>
|
|
55
|
+
<Typography
|
|
56
|
+
text={`${namePosto || "Não informado"}`}
|
|
57
|
+
color={theme.colors.black[25]}
|
|
58
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
59
|
+
size={theme.fontSizes.sm}
|
|
60
|
+
/>
|
|
61
|
+
</Box>
|
|
62
|
+
|
|
63
|
+
<Box
|
|
64
|
+
marginStyle={{ marginBottom: theme.margins.fn}}
|
|
65
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
66
|
+
>
|
|
67
|
+
<Typography
|
|
68
|
+
text="Litragem: "
|
|
69
|
+
color={theme.colors.black[25]}
|
|
70
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
71
|
+
size={theme.fontSizes.sm}
|
|
72
|
+
/>
|
|
73
|
+
<Box
|
|
74
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
75
|
+
>
|
|
76
|
+
<Typography
|
|
77
|
+
text={`${litragem || "Não informado"}`}
|
|
78
|
+
color={theme.colors.black[25]}
|
|
79
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
80
|
+
size={theme.fontSizes.sm}
|
|
81
|
+
/>
|
|
82
|
+
<Typography
|
|
83
|
+
text={` LT`}
|
|
84
|
+
color={theme.colors.red[400]}
|
|
85
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
86
|
+
size={theme.fontSizes.sm}
|
|
87
|
+
/>
|
|
88
|
+
</Box>
|
|
89
|
+
</Box>
|
|
90
|
+
|
|
91
|
+
<Box
|
|
92
|
+
marginStyle={{ marginBottom: theme.margins.fn}}
|
|
93
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
94
|
+
>
|
|
95
|
+
<Typography
|
|
96
|
+
text="Valor: "
|
|
97
|
+
color={theme.colors.black[25]}
|
|
98
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
99
|
+
size={theme.fontSizes.sm}
|
|
100
|
+
/>
|
|
101
|
+
<Typography
|
|
102
|
+
text={`R$ ${valor || "Não informado"}`}
|
|
103
|
+
color={theme.colors.gray[700]}
|
|
104
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
105
|
+
size={theme.fontSizes.sm}
|
|
106
|
+
/>
|
|
107
|
+
</Box>
|
|
108
|
+
|
|
109
|
+
<Box
|
|
110
|
+
marginStyle={{ marginBottom: theme.margins.fn}}
|
|
111
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
112
|
+
>
|
|
113
|
+
<Typography
|
|
114
|
+
text={"Data: "}
|
|
115
|
+
color={theme.colors.black[25]}
|
|
116
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
117
|
+
size={theme.fontSizes.sm}
|
|
118
|
+
/>
|
|
119
|
+
<Typography
|
|
120
|
+
text={`${dataRegistro || "Não informado"}`}
|
|
121
|
+
color={theme.colors.gray[700]}
|
|
122
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
123
|
+
size={theme.fontSizes.sm}
|
|
124
|
+
/>
|
|
125
|
+
</Box>
|
|
126
|
+
<Box
|
|
127
|
+
borderStyled={{
|
|
128
|
+
borderWidth: 1,
|
|
129
|
+
borderColor: theme.colors.black[25],
|
|
130
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
131
|
+
}}
|
|
132
|
+
flexStyle={{
|
|
133
|
+
justifyContent: "center",
|
|
134
|
+
alignItems: "center",
|
|
135
|
+
}}
|
|
136
|
+
>
|
|
137
|
+
<Image
|
|
138
|
+
source={{ uri: imagemUrl ?? "https://placehold.co/300x300" }}
|
|
139
|
+
style={{
|
|
140
|
+
width: "100%",
|
|
141
|
+
height: 139,
|
|
142
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
143
|
+
}}
|
|
144
|
+
resizeMode="cover"
|
|
145
|
+
/>
|
|
146
|
+
</Box>
|
|
147
|
+
</Box>
|
|
148
|
+
</Box>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
ListSupplies.displayName = "ListSupplies";
|
|
153
|
+
export default asBaseComponent(ListSupplies);
|
|
@@ -43,6 +43,7 @@ const MaintenanceDescriptionInput = forwardRef<any, MaintenanceDescriptionInputP
|
|
|
43
43
|
|
|
44
44
|
<Box
|
|
45
45
|
flexStyle={{ flexDirection: "row", justifyContent: error ? "space-between" : "flex-end" }}
|
|
46
|
+
marginStyle={{ marginBottom: 16 }}
|
|
46
47
|
>
|
|
47
48
|
{error && <Text style={stylesInput.errorText}>{error}</Text>}
|
|
48
49
|
<Text style={stylesInput.charCount}>{`${text.length}/${MAX_LENGTH}`}</Text>
|
|
@@ -3,7 +3,7 @@ import { theme } from "../../styles/theme/theme";
|
|
|
3
3
|
|
|
4
4
|
const stylesInput = StyleSheet.create({
|
|
5
5
|
label: {
|
|
6
|
-
fontFamily: theme.fonts.
|
|
6
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
7
7
|
fontSize: theme.fontSizes.md,
|
|
8
8
|
color: theme.colors.black[100],
|
|
9
9
|
marginBottom: theme.margins["1xs"],
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Modal, View } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../../box";
|
|
9
|
+
import Typography from "../../typography";
|
|
10
|
+
import Button from "../../button";
|
|
11
|
+
import MaintenanceDescriptionInput from "../../maintenance-description-input";
|
|
12
|
+
|
|
13
|
+
// commons / svg
|
|
14
|
+
import { Icons } from "../../../common/icons-svg";
|
|
15
|
+
|
|
16
|
+
// typings
|
|
17
|
+
import type { IModalActivityReasonProps } from ".//interface";
|
|
18
|
+
import { asBaseComponent } from "../../../@types/as-base-component";
|
|
19
|
+
|
|
20
|
+
// styles
|
|
21
|
+
import { theme } from "../../../styles/theme/theme";
|
|
22
|
+
|
|
23
|
+
const MAX_LEN = 150;
|
|
24
|
+
|
|
25
|
+
const ModalActivityReason: React.FC<IModalActivityReasonProps<any>> = ({
|
|
26
|
+
visible,
|
|
27
|
+
onClose,
|
|
28
|
+
modalConfirm,
|
|
29
|
+
textTitle,
|
|
30
|
+
}) => {
|
|
31
|
+
const [textInput, setTextInput] = React.useState("");
|
|
32
|
+
|
|
33
|
+
const messaError =
|
|
34
|
+
textInput.length >= MAX_LEN ? `Limite máximo de ${MAX_LEN} caracteres atingido!` : "";
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Modal animationType="fade" transparent visible={visible}>
|
|
38
|
+
<View
|
|
39
|
+
style={{
|
|
40
|
+
flex: 1,
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
backgroundColor: theme.shadows.z1,
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<Box
|
|
47
|
+
width={"90%"}
|
|
48
|
+
backgroundColor={theme.colors.orange[500]}
|
|
49
|
+
borderStyled={{
|
|
50
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
51
|
+
}}
|
|
52
|
+
paddingStyle={{
|
|
53
|
+
paddingLeft: theme.paddings["2xs"],
|
|
54
|
+
paddingRight: theme.paddings["2xs"],
|
|
55
|
+
paddingTop: theme.paddings.sm,
|
|
56
|
+
paddingBottom: theme.paddings.sm,
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
<Box
|
|
60
|
+
marginStyle={{ marginBottom: 10, marginLeft: 4 }}
|
|
61
|
+
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
62
|
+
>
|
|
63
|
+
<Icons
|
|
64
|
+
icon="EXCLAMATION_TRIANGLE"
|
|
65
|
+
color={theme.colors.orange[500]}
|
|
66
|
+
background={theme.colors.neutral[300]}
|
|
67
|
+
size={22}
|
|
68
|
+
/>
|
|
69
|
+
<Typography
|
|
70
|
+
text={`${textTitle ?? "Motivo da exclusão"}`}
|
|
71
|
+
color={theme.colors.neutral[25]}
|
|
72
|
+
marginLeft={theme.margins["2xs"]}
|
|
73
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
74
|
+
size={theme.fontSizes.lg}
|
|
75
|
+
/>
|
|
76
|
+
</Box>
|
|
77
|
+
|
|
78
|
+
<Box
|
|
79
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
80
|
+
paddingStyle={{
|
|
81
|
+
padding: theme.paddings.xs,
|
|
82
|
+
}}
|
|
83
|
+
borderStyled={{
|
|
84
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
<Box width="100%">
|
|
88
|
+
<MaintenanceDescriptionInput
|
|
89
|
+
label={`${textTitle || "Motivo da exclusão"}`}
|
|
90
|
+
placeholderTextColor={theme.colors.gray[700]}
|
|
91
|
+
placeholder="Motivo da exclusão"
|
|
92
|
+
onChangeText={setTextInput}
|
|
93
|
+
error={messaError}
|
|
94
|
+
/>
|
|
95
|
+
</Box>
|
|
96
|
+
<Box
|
|
97
|
+
marginStyle={{ marginTop: 4 }}
|
|
98
|
+
flexStyle={{
|
|
99
|
+
flexDirection: "row",
|
|
100
|
+
justifyContent: "space-between",
|
|
101
|
+
}}
|
|
102
|
+
>
|
|
103
|
+
<Button
|
|
104
|
+
title="CANCELAR"
|
|
105
|
+
onPress={onClose}
|
|
106
|
+
width={"48%"}
|
|
107
|
+
height={40}
|
|
108
|
+
isLoading={false}
|
|
109
|
+
disabled={false}
|
|
110
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
111
|
+
buttonTextStyle={{
|
|
112
|
+
color: theme.colors.blue[100],
|
|
113
|
+
fontFamily: "Inter-Medium",
|
|
114
|
+
fontSize: theme.fontSizes.xs,
|
|
115
|
+
fontWeight: "500",
|
|
116
|
+
}}
|
|
117
|
+
flexStyle={{
|
|
118
|
+
flexDirection: "row",
|
|
119
|
+
alignItems: "center",
|
|
120
|
+
justifyContent: "center",
|
|
121
|
+
textAlign: "center",
|
|
122
|
+
}}
|
|
123
|
+
borderStyled={{
|
|
124
|
+
borderWidth: theme.borderWidths.thin,
|
|
125
|
+
borderColor: theme.colors.blue[100],
|
|
126
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
127
|
+
}}
|
|
128
|
+
/>
|
|
129
|
+
<Button
|
|
130
|
+
title="CONFIRMAR"
|
|
131
|
+
onPress={() => {
|
|
132
|
+
modalConfirm(textInput);
|
|
133
|
+
onClose();
|
|
134
|
+
}}
|
|
135
|
+
width={"48%"}
|
|
136
|
+
height={40}
|
|
137
|
+
isLoading={false}
|
|
138
|
+
disabled={false}
|
|
139
|
+
backgroundColor={theme.colors.blue[500]}
|
|
140
|
+
buttonTextStyle={{
|
|
141
|
+
color: theme.colors.neutral[25],
|
|
142
|
+
fontFamily: "Inter-Medium",
|
|
143
|
+
fontSize: theme.fontSizes.xs,
|
|
144
|
+
fontWeight: "500",
|
|
145
|
+
}}
|
|
146
|
+
flexStyle={{
|
|
147
|
+
flexDirection: "row",
|
|
148
|
+
alignItems: "center",
|
|
149
|
+
justifyContent: "center",
|
|
150
|
+
textAlign: "center",
|
|
151
|
+
}}
|
|
152
|
+
borderStyled={{
|
|
153
|
+
borderWidth: theme.borderWidths.thin,
|
|
154
|
+
borderColor: theme.colors.blue[100],
|
|
155
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
156
|
+
}}
|
|
157
|
+
/>
|
|
158
|
+
</Box>
|
|
159
|
+
</Box>
|
|
160
|
+
</Box>
|
|
161
|
+
</View>
|
|
162
|
+
</Modal>
|
|
163
|
+
);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
ModalActivityReason.displayName = "ModalActivityReason";
|
|
167
|
+
|
|
168
|
+
export default asBaseComponent(ModalActivityReason);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
const OPTIONS = [
|
|
5
|
+
{ label: "Disp com veículo parado", value: "option1" },
|
|
6
|
+
{ label: "Operação com veículo", value: "option2" },
|
|
7
|
+
{ label: "Em carga", value: "option3" },
|
|
8
|
+
{ label: "Em descarga", value: "option4" },
|
|
9
|
+
] as const;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* EXPORTS
|
|
13
|
+
*/
|
|
14
|
+
export { OPTIONS };
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { useMemo, useState, useCallback } from "react";
|
|
5
|
+
import { Modal, View, Pressable } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../../box";
|
|
9
|
+
import Button from "../../button";
|
|
10
|
+
|
|
11
|
+
import Typography from "../../typography";
|
|
12
|
+
|
|
13
|
+
import ActivityFields from "../../selects/select-date-and-hours";
|
|
14
|
+
|
|
15
|
+
import SelectOption from "../../selects/select-option";
|
|
16
|
+
|
|
17
|
+
// commons
|
|
18
|
+
import { Icons } from "../../../common/icons-svg";
|
|
19
|
+
import { asBaseComponent } from "../../../@types/as-base-component";
|
|
20
|
+
|
|
21
|
+
// helpers
|
|
22
|
+
import { OPTIONS } from "./helpers";
|
|
23
|
+
|
|
24
|
+
// typings
|
|
25
|
+
import type { IDateAndHoursProps, IModalCreateActivitieProps } from "./interface";
|
|
26
|
+
|
|
27
|
+
// styles / theme
|
|
28
|
+
import { theme } from "../../../styles/theme/theme";
|
|
29
|
+
import { styles } from "./styles";
|
|
30
|
+
|
|
31
|
+
const ModalCreteActivitie: React.FC<IModalCreateActivitieProps<any>> = React.memo(
|
|
32
|
+
({ visible, onClose, onPressConfirm, textTitle }) => {
|
|
33
|
+
const [dateAndHours, setDateAndHours] = useState<IDateAndHoursProps>({
|
|
34
|
+
date: "",
|
|
35
|
+
hours: "00:00",
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// estados controlados mínimos
|
|
39
|
+
const [selectedActivitie, setSelectedActivitie] = useState<string | null>(
|
|
40
|
+
OPTIONS[0]?.value ?? null
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
// label do motivo derivada com memo
|
|
44
|
+
const activitieLabel = useMemo(
|
|
45
|
+
() => OPTIONS.find((activitie) => activitie.value === selectedActivitie)?.label ?? null,
|
|
46
|
+
[selectedActivitie]
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
// handlers estáveis
|
|
50
|
+
const handleChangeReason = useCallback((value: string | null) => {
|
|
51
|
+
setSelectedActivitie(value);
|
|
52
|
+
}, []);
|
|
53
|
+
|
|
54
|
+
const handleCancel = useCallback(() => {
|
|
55
|
+
onClose?.();
|
|
56
|
+
}, [onClose]);
|
|
57
|
+
|
|
58
|
+
const handleConfirm = useCallback(() => {
|
|
59
|
+
onPressConfirm?.({
|
|
60
|
+
reasonValue: selectedActivitie,
|
|
61
|
+
label: activitieLabel,
|
|
62
|
+
dateAndHours: dateAndHours,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
onClose?.();
|
|
66
|
+
}, [onPressConfirm, onClose, activitieLabel, selectedActivitie, dateAndHours]);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<Modal
|
|
70
|
+
animationType="fade"
|
|
71
|
+
transparent
|
|
72
|
+
visible={visible}
|
|
73
|
+
onRequestClose={handleCancel}
|
|
74
|
+
statusBarTranslucent
|
|
75
|
+
>
|
|
76
|
+
<Pressable style={styles.overlay} onPress={handleCancel}>
|
|
77
|
+
<Box
|
|
78
|
+
width="90%"
|
|
79
|
+
backgroundColor={theme.colors.orange[500]}
|
|
80
|
+
borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
|
|
81
|
+
paddingStyle={{
|
|
82
|
+
paddingLeft: theme.paddings["2xs"],
|
|
83
|
+
paddingRight: theme.paddings["2xs"],
|
|
84
|
+
paddingTop: theme.paddings.sm,
|
|
85
|
+
paddingBottom: theme.paddings.sm,
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
<View style={styles.headerRow}>
|
|
89
|
+
<Icons
|
|
90
|
+
icon="EXCLAMATION_TRIANGLE"
|
|
91
|
+
color={theme.colors.orange[500]}
|
|
92
|
+
background={theme.colors.neutral[300]}
|
|
93
|
+
size={22}
|
|
94
|
+
/>
|
|
95
|
+
<Typography
|
|
96
|
+
text={textTitle ?? "Incluir atividade"}
|
|
97
|
+
color={theme.colors.neutral[25]}
|
|
98
|
+
marginLeft={theme.margins["2xs"]}
|
|
99
|
+
fontFamily={theme.fonts.inter_bold}
|
|
100
|
+
fontWeight="700"
|
|
101
|
+
size={theme.fontSizes.lg}
|
|
102
|
+
/>
|
|
103
|
+
</View>
|
|
104
|
+
|
|
105
|
+
<Box
|
|
106
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
107
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
108
|
+
borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
|
|
109
|
+
>
|
|
110
|
+
<Typography
|
|
111
|
+
text="Preencha os dados da atividade que deseja incluir."
|
|
112
|
+
color={theme.colors.black[100]}
|
|
113
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
114
|
+
fontWeight="400"
|
|
115
|
+
lineHeight={theme.lineHeight["2xl"]}
|
|
116
|
+
size={theme.fontSizes.sm}
|
|
117
|
+
marginBottom={16}
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
<SelectOption
|
|
121
|
+
titleLabel="Selecione um motivo"
|
|
122
|
+
sizeTitleLabel={18}
|
|
123
|
+
dataOption={OPTIONS as any}
|
|
124
|
+
handleSelectDown={handleChangeReason}
|
|
125
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
126
|
+
/>
|
|
127
|
+
|
|
128
|
+
<ActivityFields
|
|
129
|
+
disabled={false}
|
|
130
|
+
icon={"CALENDAR"}
|
|
131
|
+
value={"09/09/2025"}
|
|
132
|
+
onPressConfirm={(value) =>
|
|
133
|
+
setDateAndHours({ date: value, hours: dateAndHours?.hours })
|
|
134
|
+
}
|
|
135
|
+
/>
|
|
136
|
+
|
|
137
|
+
<ActivityFields
|
|
138
|
+
disabled={false}
|
|
139
|
+
icon={"TIMER"}
|
|
140
|
+
value={"00:00"}
|
|
141
|
+
onPressConfirm={(value) =>
|
|
142
|
+
setDateAndHours({ date: dateAndHours?.date, hours: value })
|
|
143
|
+
}
|
|
144
|
+
/>
|
|
145
|
+
|
|
146
|
+
<View style={styles.actions}>
|
|
147
|
+
<Button
|
|
148
|
+
title="CANCELAR"
|
|
149
|
+
onPress={handleCancel}
|
|
150
|
+
width="48%"
|
|
151
|
+
height={40}
|
|
152
|
+
isLoading={false}
|
|
153
|
+
disabled={false}
|
|
154
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
155
|
+
buttonTextStyle={{
|
|
156
|
+
color: theme.colors.blue[500],
|
|
157
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
158
|
+
fontSize: theme.fontSizes.xs,
|
|
159
|
+
fontWeight: "500",
|
|
160
|
+
}}
|
|
161
|
+
flexStyle={{
|
|
162
|
+
flexDirection: "row",
|
|
163
|
+
alignItems: "center",
|
|
164
|
+
justifyContent: "center",
|
|
165
|
+
textAlign: "center",
|
|
166
|
+
}}
|
|
167
|
+
borderStyled={{
|
|
168
|
+
borderWidth: theme.borderWidths.thin,
|
|
169
|
+
borderColor: theme.colors.blue[100],
|
|
170
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
171
|
+
}}
|
|
172
|
+
/>
|
|
173
|
+
|
|
174
|
+
<Button
|
|
175
|
+
title="CONFIRMAR"
|
|
176
|
+
onPress={handleConfirm}
|
|
177
|
+
width="48%"
|
|
178
|
+
height={40}
|
|
179
|
+
isLoading={false}
|
|
180
|
+
disabled={false}
|
|
181
|
+
backgroundColor={theme.colors.blue[500]}
|
|
182
|
+
buttonTextStyle={{
|
|
183
|
+
color: theme.colors.neutral[25],
|
|
184
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
185
|
+
fontSize: theme.fontSizes.xs,
|
|
186
|
+
fontWeight: "500",
|
|
187
|
+
}}
|
|
188
|
+
flexStyle={{
|
|
189
|
+
flexDirection: "row",
|
|
190
|
+
alignItems: "center",
|
|
191
|
+
justifyContent: "center",
|
|
192
|
+
textAlign: "center",
|
|
193
|
+
}}
|
|
194
|
+
borderStyled={{
|
|
195
|
+
borderWidth: theme.borderWidths.thin,
|
|
196
|
+
borderColor: theme.colors.blue[100],
|
|
197
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
198
|
+
}}
|
|
199
|
+
/>
|
|
200
|
+
</View>
|
|
201
|
+
</Box>
|
|
202
|
+
</Box>
|
|
203
|
+
</Pressable>
|
|
204
|
+
</Modal>
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
ModalCreteActivitie.displayName = "ModalCreteActivitie";
|
|
210
|
+
export default asBaseComponent(ModalCreteActivitie);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
/**
|
|
3
|
+
* IMPORTS
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
type IModalCreateActivitieProps<T> = {
|
|
7
|
+
visible: boolean;
|
|
8
|
+
textTitle?: string;
|
|
9
|
+
options?: T;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
onPressConfirm: (value: T) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type IDateAndHoursProps = {
|
|
15
|
+
date: string;
|
|
16
|
+
hours: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* EXPORTS
|
|
21
|
+
*/
|
|
22
|
+
export type { IModalCreateActivitieProps, IDateAndHoursProps };
|