IO-1275 WIP Appointment notes.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<babeledit_project be_version="2.7.1" version="1.2">
|
||||
<babeledit_project version="1.2" be_version="2.7.1">
|
||||
<!--
|
||||
|
||||
BabelEdit project file
|
||||
@@ -500,6 +500,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>note</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>time</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Button, Popover, Space } from "antd";
|
||||
import { AlertFilled } from "@ant-design/icons";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -83,6 +84,9 @@ export function ScheduleEventComponent({
|
||||
{(event.job && event.job.alt_transport) || ""}
|
||||
<ScheduleAtChange job={event && event.job} />
|
||||
</DataLabel>
|
||||
<DataLabel label={t("appointments.fields.note")}>
|
||||
{event.note || ""}
|
||||
</DataLabel>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@@ -161,6 +165,7 @@ export function ScheduleEventComponent({
|
||||
const RegularEvent = event.isintake ? (
|
||||
<div style={{ display: "flex", flexWrap: "wrap" }}>
|
||||
<Space>
|
||||
{event.note && <AlertFilled className="production-alert" />}
|
||||
<strong>{`${event.job.ro_number || t("general.labels.na")}`}</strong>
|
||||
<span>{`${(event.job && event.job.ownr_fn) || ""} ${
|
||||
(event.job && event.job.ownr_ln) || ""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Card, Col, Form, Row, Select, Switch } from "antd";
|
||||
import { Button, Col, Form, Input, Row, Select, Switch } from "antd";
|
||||
import axios from "axios";
|
||||
import moment from "moment";
|
||||
import React, { useState } from "react";
|
||||
@@ -91,7 +91,7 @@ export function ScheduleJobModalComponent({
|
||||
<DateTimePicker onlyFuture />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<Card title={t("appointments.labels.smartscheduling")}>
|
||||
<LayoutFormRow header={t("appointments.labels.smartscheduling")}>
|
||||
<Button onClick={handleSmartScheduling} loading={loading}>
|
||||
{t("appointments.actions.calculate")}
|
||||
</Button>
|
||||
@@ -115,7 +115,7 @@ export function ScheduleJobModalComponent({
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
</Card>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow grow>
|
||||
<Form.Item
|
||||
name="notifyCustomer"
|
||||
@@ -124,12 +124,9 @@ export function ScheduleJobModalComponent({
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item shouldUpdate>
|
||||
{() => (
|
||||
<Form.Item name="email" label={t("jobs.fields.ownr_ea")}>
|
||||
<EmailInput disabled={!form.getFieldValue("notifyCustomer")} />
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
<Form.Item name="email" label={t("jobs.fields.ownr_ea")}>
|
||||
<EmailInput disabled={!form.getFieldValue("notifyCustomer")} />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow grow>
|
||||
@@ -158,6 +155,9 @@ export function ScheduleJobModalComponent({
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item name={"note"} label={t("appointments.fields.note")}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
{t("appointments.labels.history")}
|
||||
<ScheduleExistingAppointmentsList
|
||||
|
||||
@@ -105,6 +105,7 @@ export function ScheduleJobModalContainer({
|
||||
start: moment(values.start),
|
||||
end: moment(values.start).add(bodyshop.appt_length || 60, "minutes"),
|
||||
color: values.color,
|
||||
note:values.note
|
||||
},
|
||||
jobId: jobId,
|
||||
altTransport: values.alt_transport,
|
||||
|
||||
@@ -20,6 +20,7 @@ export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
job {
|
||||
alt_transport
|
||||
ro_number
|
||||
@@ -69,6 +70,7 @@ export const INSERT_APPOINTMENT_BLOCK = gql`
|
||||
title
|
||||
isintake
|
||||
block
|
||||
note
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,6 +92,7 @@ export const INSERT_APPOINTMENT = gql`
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
}
|
||||
}
|
||||
update_jobs(
|
||||
@@ -116,6 +119,7 @@ export const QUERY_APPOINTMENT_BY_DATE = gql`
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
job {
|
||||
alt_transport
|
||||
ro_number
|
||||
@@ -168,6 +172,7 @@ export const UPDATE_APPOINTMENT = gql`
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,6 +203,7 @@ export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
||||
canceled
|
||||
created_at
|
||||
block
|
||||
note
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"fields": {
|
||||
"alt_transport": "Alt. Trans.",
|
||||
"color": "Appointment Color",
|
||||
"note": "Appt. Note",
|
||||
"time": "Appointment Time",
|
||||
"title": "Title"
|
||||
},
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"fields": {
|
||||
"alt_transport": "",
|
||||
"color": "",
|
||||
"note": "",
|
||||
"time": "",
|
||||
"title": "Título"
|
||||
},
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"fields": {
|
||||
"alt_transport": "",
|
||||
"color": "",
|
||||
"note": "",
|
||||
"time": "",
|
||||
"title": "Titre"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."appointments" DROP COLUMN "note";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."appointments" ADD COLUMN "note" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: true
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,39 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: true
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -115,6 +115,7 @@ tables:
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
@@ -132,6 +133,7 @@ tables:
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
@@ -159,6 +161,7 @@ tables:
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
|
||||
4781
package-lock.json
generated
4781
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user