Merge branch 'release/2023-11-10' into test

This commit is contained in:
Patrick Fic
2023-11-09 13:39:46 -08:00
5 changed files with 59 additions and 4 deletions

View File

@@ -364,6 +364,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>unblock</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>viewjob</name>
<definition_loaded>false</definition_loaded>

View File

@@ -4,6 +4,7 @@ import {
Divider,
Dropdown,
Form,
Input,
Menu,
notification,
Popover,
@@ -34,6 +35,8 @@ import ScheduleManualEvent from "../schedule-manual-event/schedule-manual-event.
import ScheduleAtChange from "./job-at-change.component";
import ScheduleEventColor from "./schedule-event.color.component";
import ScheduleEventNote from "./schedule-event.note.component";
import { useMutation } from "@apollo/client";
import { UPDATE_APPOINTMENT } from "../../graphql/appointments.queries";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -58,16 +61,44 @@ export function ScheduleEventComponent({
const [visible, setVisible] = useState(false);
const history = useHistory();
const searchParams = queryString.parse(useLocation().search);
const [updateAppointment] = useMutation(UPDATE_APPOINTMENT);
const [title, setTitle] = useState(event.title);
const blockContent = (
<div>
<Space direction="vertical" wrap>
<Input
value={title}
onChange={(e) => setTitle(e.currentTarget.value)}
onBlur={async () => {
await updateAppointment({
variables: {
appid: event.id,
app: {
title: title,
},
},
optimisticResponse: {
update_appointments: {
__typename: "appointments_mutation_response",
returning: [
{
...event,
title: title,
__typename: "appointments",
},
],
},
},
});
}}
/>
<Button
onClick={() => handleCancel({ id: event.id })}
disabled={event.arrived}
>
{t("appointments.actions.cancel")}
{t("appointments.actions.unblock")}
</Button>
</div>
</Space>
);
const popoverContent = (

View File

@@ -27,6 +27,7 @@
"preview": "Preview",
"reschedule": "Reschedule",
"sendreminder": "Send Reminder",
"unblock": "Unblock",
"viewjob": "View Job"
},
"errors": {

View File

@@ -27,6 +27,7 @@
"preview": "",
"reschedule": "Reprogramar",
"sendreminder": "",
"unblock": "",
"viewjob": "Ver trabajo"
},
"errors": {

View File

@@ -27,6 +27,7 @@
"preview": "",
"reschedule": "Replanifier",
"sendreminder": "",
"unblock": "",
"viewjob": "Voir le travail"
},
"errors": {