IO-2431 Created By for Appointments

This commit is contained in:
Allan Carr
2023-10-30 16:51:26 -07:00
parent dfdaf36ed1
commit 9b7c0af025
4 changed files with 16 additions and 1 deletions

View File

@@ -16,13 +16,17 @@ import { QUERY_LBR_HRS_BY_PK, UPDATE_JOBS } from "../../graphql/jobs.queries";
import { setEmailOptions } from "../../redux/email/email.actions";
import { toggleModalVisible } from "../../redux/modals/modals.actions";
import { selectSchedule } from "../../redux/modals/modals.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import {
selectBodyshop,
selectCurrentUser,
} from "../../redux/user/user.selectors";
import { TemplateList } from "../../utils/TemplateConstants";
import ScheduleJobModalComponent from "./schedule-job-modal.component";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
scheduleModal: selectSchedule,
currentUser: selectCurrentUser,
});
const mapDispatchToProps = (dispatch) => ({
toggleModalVisible: () => dispatch(toggleModalVisible("schedule")),
@@ -34,6 +38,7 @@ export function ScheduleJobModalContainer({
bodyshop,
toggleModalVisible,
setEmailOptions,
currentUser,
}) {
const { visible, context, actions } = scheduleModal;
const { jobId, job, previousEvent } = context;
@@ -122,6 +127,7 @@ export function ScheduleJobModalContainer({
end: moment(values.start).add(bodyshop.appt_length || 60, "minutes"),
color: values.color,
note: values.note,
created_by: currentUser.email,
},
jobId: jobId,
altTransport: values.alt_transport,

View File

@@ -110,6 +110,7 @@
- canceled
- color
- created_at
- created_by
- end
- id
- isintake
@@ -128,6 +129,7 @@
- canceled
- color
- created_at
- created_by
- end
- id
- isintake
@@ -156,6 +158,7 @@
- canceled
- color
- created_at
- created_by
- end
- id
- isintake

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."appointments" add column "created_by" text
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."appointments" add column "created_by" text
null;