From 8761dafdff7ba4810744a4e20bed5efe696ae637 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 6 Feb 2020 15:06:13 -0800 Subject: [PATCH] Removed job status table. Added existing appointments timeline to modal. Refetching on calendar on delete. --- bodyshop_translations.babel | 126 +++++++++ .../job-detail-cards.component.jsx | 41 +-- .../jobs-detail-header.component.jsx | 26 +- .../jobs-list/jobs-list.component.jsx | 2 +- .../schedule-calendar.component.jsx | 2 +- .../schedule-event.container.jsx | 18 +- ...e-existing-appointments-list.component.jsx | 44 ++++ .../schedule-job-modal.component.jsx | 17 +- .../schedule-job-modal.container.jsx | 12 +- client/src/graphql/appointments.queries.js | 13 + client/src/graphql/jobs.queries.js | 18 +- client/src/translations/en_us/common.json | 8 +- client/src/translations/es/common.json | 8 +- client/src/translations/fr/common.json | 8 +- .../down.yaml | 34 +++ .../up.yaml | 34 +++ .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 243 +++++++++++++++++ .../up.yaml | 244 ++++++++++++++++++ .../down.yaml | 241 +++++++++++++++++ .../up.yaml | 242 +++++++++++++++++ .../down.yaml | 243 +++++++++++++++++ .../up.yaml | 244 ++++++++++++++++++ .../down.yaml | 28 ++ .../up.yaml | 6 + .../down.yaml | 26 ++ .../up.yaml | 6 + .../down.yaml | 28 ++ .../up.yaml | 6 + .../down.yaml | 16 ++ .../up.yaml | 6 + 32 files changed, 1940 insertions(+), 56 deletions(-) create mode 100644 client/src/components/schedule-existing-appointments-list/schedule-existing-appointments-list.component.jsx create mode 100644 hasura/migrations/1581028719187_update_permission_user_public_table_appointments/down.yaml create mode 100644 hasura/migrations/1581028719187_update_permission_user_public_table_appointments/up.yaml create mode 100644 hasura/migrations/1581029855396_alter_table_public_jobs_add_column_status/down.yaml create mode 100644 hasura/migrations/1581029855396_alter_table_public_jobs_add_column_status/up.yaml create mode 100644 hasura/migrations/1581029864710_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1581029864710_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1581029870003_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1581029870003_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1581029875101_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1581029875101_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1581029890395_delete_permission_user_public_table_job_status/down.yaml create mode 100644 hasura/migrations/1581029890395_delete_permission_user_public_table_job_status/up.yaml create mode 100644 hasura/migrations/1581029895198_delete_permission_user_public_table_job_status/down.yaml create mode 100644 hasura/migrations/1581029895198_delete_permission_user_public_table_job_status/up.yaml create mode 100644 hasura/migrations/1581029899124_delete_permission_user_public_table_job_status/down.yaml create mode 100644 hasura/migrations/1581029899124_delete_permission_user_public_table_job_status/up.yaml create mode 100644 hasura/migrations/1581029904239_delete_permission_user_public_table_job_status/down.yaml create mode 100644 hasura/migrations/1581029904239_delete_permission_user_public_table_job_status/up.yaml diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 385c7c93f..5082e9758 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -113,6 +113,27 @@ errors + + canceling + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + saving false @@ -139,6 +160,48 @@ labels + + arrivedon + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + cancelledappointment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + nodateselected false @@ -160,11 +223,74 @@ + + priorappointments + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + scheduledfor + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + successes + + canceled + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + created false diff --git a/client/src/components/job-detail-cards/job-detail-cards.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.component.jsx index 5c900483d..458ea0da7 100644 --- a/client/src/components/job-detail-cards/job-detail-cards.component.jsx +++ b/client/src/components/job-detail-cards/job-detail-cards.component.jsx @@ -18,8 +18,6 @@ import JobDetailCardsPartsComponent from "./job-detail-cards.parts.component"; import "./job-detail-cards.styles.scss"; import JobDetailCardsTotalsComponent from "./job-detail-cards.totals.component"; - - export default function JobDetailCards({ selectedJob }) { const { loading, error, data, refetch } = useQuery(QUERY_JOB_CARD_DETAILS, { fetchPolicy: "network-only", @@ -33,10 +31,10 @@ export default function JobDetailCards({ selectedJob }) { return
{t("jobs.errors.nojobselected")}
; } if (loading) return ; - if (error) return ; + if (error) return ; return ( -
+
window.history.back()} tags={ - - {data.jobs_by_pk.job_status ? ( - {data.jobs_by_pk.job_status.name} + + {data.jobs_by_pk.status ? ( + {data.jobs_by_pk.status} ) : null} } @@ -68,31 +66,34 @@ export default function JobDetailCards({ selectedJob }) { } extra={[ + key="documents" + to={`/manage/jobs/${data.jobs_by_pk.id}#documents`} + > , - , , - - ]}> + ]} + > { // loading ? ( // @@ -113,7 +114,7 @@ export default function JobDetailCards({ selectedJob }) { // ) } -
+
{ - setscheduleModalVisible(true); - }} - > - {t("jobs.actions.schedule")} - , + + + ,