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
|
BabelEdit project file
|
||||||
@@ -500,6 +500,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>time</name>
|
<name>time</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Button, Popover, Space } from "antd";
|
import { Button, Popover, Space } from "antd";
|
||||||
|
import { AlertFilled } from "@ant-design/icons";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -83,6 +84,9 @@ export function ScheduleEventComponent({
|
|||||||
{(event.job && event.job.alt_transport) || ""}
|
{(event.job && event.job.alt_transport) || ""}
|
||||||
<ScheduleAtChange job={event && event.job} />
|
<ScheduleAtChange job={event && event.job} />
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
|
<DataLabel label={t("appointments.fields.note")}>
|
||||||
|
{event.note || ""}
|
||||||
|
</DataLabel>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
@@ -161,6 +165,7 @@ export function ScheduleEventComponent({
|
|||||||
const RegularEvent = event.isintake ? (
|
const RegularEvent = event.isintake ? (
|
||||||
<div style={{ display: "flex", flexWrap: "wrap" }}>
|
<div style={{ display: "flex", flexWrap: "wrap" }}>
|
||||||
<Space>
|
<Space>
|
||||||
|
{event.note && <AlertFilled className="production-alert" />}
|
||||||
<strong>{`${event.job.ro_number || t("general.labels.na")}`}</strong>
|
<strong>{`${event.job.ro_number || t("general.labels.na")}`}</strong>
|
||||||
<span>{`${(event.job && event.job.ownr_fn) || ""} ${
|
<span>{`${(event.job && event.job.ownr_fn) || ""} ${
|
||||||
(event.job && event.job.ownr_ln) || ""
|
(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 axios from "axios";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
@@ -91,7 +91,7 @@ export function ScheduleJobModalComponent({
|
|||||||
<DateTimePicker onlyFuture />
|
<DateTimePicker onlyFuture />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<Card title={t("appointments.labels.smartscheduling")}>
|
<LayoutFormRow header={t("appointments.labels.smartscheduling")}>
|
||||||
<Button onClick={handleSmartScheduling} loading={loading}>
|
<Button onClick={handleSmartScheduling} loading={loading}>
|
||||||
{t("appointments.actions.calculate")}
|
{t("appointments.actions.calculate")}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -115,7 +115,7 @@ export function ScheduleJobModalComponent({
|
|||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="notifyCustomer"
|
name="notifyCustomer"
|
||||||
@@ -124,12 +124,9 @@ export function ScheduleJobModalComponent({
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item shouldUpdate>
|
|
||||||
{() => (
|
<Form.Item name="email" label={t("jobs.fields.ownr_ea")}>
|
||||||
<Form.Item name="email" label={t("jobs.fields.ownr_ea")}>
|
<EmailInput disabled={!form.getFieldValue("notifyCustomer")} />
|
||||||
<EmailInput disabled={!form.getFieldValue("notifyCustomer")} />
|
|
||||||
</Form.Item>
|
|
||||||
)}
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow>
|
||||||
@@ -158,6 +155,9 @@ export function ScheduleJobModalComponent({
|
|||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item name={"note"} label={t("appointments.fields.note")}>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
{t("appointments.labels.history")}
|
{t("appointments.labels.history")}
|
||||||
<ScheduleExistingAppointmentsList
|
<ScheduleExistingAppointmentsList
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ export function ScheduleJobModalContainer({
|
|||||||
start: moment(values.start),
|
start: moment(values.start),
|
||||||
end: moment(values.start).add(bodyshop.appt_length || 60, "minutes"),
|
end: moment(values.start).add(bodyshop.appt_length || 60, "minutes"),
|
||||||
color: values.color,
|
color: values.color,
|
||||||
|
note:values.note
|
||||||
},
|
},
|
||||||
jobId: jobId,
|
jobId: jobId,
|
||||||
altTransport: values.alt_transport,
|
altTransport: values.alt_transport,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
|||||||
isintake
|
isintake
|
||||||
block
|
block
|
||||||
color
|
color
|
||||||
|
note
|
||||||
job {
|
job {
|
||||||
alt_transport
|
alt_transport
|
||||||
ro_number
|
ro_number
|
||||||
@@ -69,6 +70,7 @@ export const INSERT_APPOINTMENT_BLOCK = gql`
|
|||||||
title
|
title
|
||||||
isintake
|
isintake
|
||||||
block
|
block
|
||||||
|
note
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,6 +92,7 @@ export const INSERT_APPOINTMENT = gql`
|
|||||||
isintake
|
isintake
|
||||||
block
|
block
|
||||||
color
|
color
|
||||||
|
note
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
update_jobs(
|
update_jobs(
|
||||||
@@ -116,6 +119,7 @@ export const QUERY_APPOINTMENT_BY_DATE = gql`
|
|||||||
isintake
|
isintake
|
||||||
block
|
block
|
||||||
color
|
color
|
||||||
|
note
|
||||||
job {
|
job {
|
||||||
alt_transport
|
alt_transport
|
||||||
ro_number
|
ro_number
|
||||||
@@ -168,6 +172,7 @@ export const UPDATE_APPOINTMENT = gql`
|
|||||||
isintake
|
isintake
|
||||||
block
|
block
|
||||||
color
|
color
|
||||||
|
note
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,6 +203,7 @@ export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
|||||||
canceled
|
canceled
|
||||||
created_at
|
created_at
|
||||||
block
|
block
|
||||||
|
note
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"alt_transport": "Alt. Trans.",
|
"alt_transport": "Alt. Trans.",
|
||||||
"color": "Appointment Color",
|
"color": "Appointment Color",
|
||||||
|
"note": "Appt. Note",
|
||||||
"time": "Appointment Time",
|
"time": "Appointment Time",
|
||||||
"title": "Title"
|
"title": "Title"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"alt_transport": "",
|
"alt_transport": "",
|
||||||
"color": "",
|
"color": "",
|
||||||
|
"note": "",
|
||||||
"time": "",
|
"time": "",
|
||||||
"title": "Título"
|
"title": "Título"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"alt_transport": "",
|
"alt_transport": "",
|
||||||
"color": "",
|
"color": "",
|
||||||
|
"note": "",
|
||||||
"time": "",
|
"time": "",
|
||||||
"title": "Titre"
|
"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
|
- id
|
||||||
- isintake
|
- isintake
|
||||||
- jobid
|
- jobid
|
||||||
|
- note
|
||||||
- start
|
- start
|
||||||
- title
|
- title
|
||||||
- updated_at
|
- updated_at
|
||||||
@@ -132,6 +133,7 @@ tables:
|
|||||||
- id
|
- id
|
||||||
- isintake
|
- isintake
|
||||||
- jobid
|
- jobid
|
||||||
|
- note
|
||||||
- start
|
- start
|
||||||
- title
|
- title
|
||||||
- updated_at
|
- updated_at
|
||||||
@@ -159,6 +161,7 @@ tables:
|
|||||||
- id
|
- id
|
||||||
- isintake
|
- isintake
|
||||||
- jobid
|
- jobid
|
||||||
|
- note
|
||||||
- start
|
- start
|
||||||
- title
|
- title
|
||||||
- updated_at
|
- 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