diff --git a/app/controllers/customer.controller.js b/app/controllers/customer.controller.js
index 6817cff..a846190 100644
--- a/app/controllers/customer.controller.js
+++ b/app/controllers/customer.controller.js
@@ -194,6 +194,7 @@ exports.createCustomer = (req, res) => {
// Additional Information
note: req.body.note || '',
+ notes_for_driver: req.body.notes_for_driver || '',
private_note: req.body.private_note || '',
// Other fields
diff --git a/app/models/customer.model.js b/app/models/customer.model.js
index d500fde..5da3da6 100644
--- a/app/models/customer.model.js
+++ b/app/models/customer.model.js
@@ -223,6 +223,7 @@ module.exports = mongoose => {
// Additional Information
note: String,
+ notes_for_driver: String,
private_note: String,
// Other legacy fields
diff --git a/client/src/components/customers/UpdateCustomer.js b/client/src/components/customers/UpdateCustomer.js
index 9ca582a..dcf0f44 100644
--- a/client/src/components/customers/UpdateCustomer.js
+++ b/client/src/components/customers/UpdateCustomer.js
@@ -157,6 +157,7 @@ const UpdateCustomer = () => {
// Additional Information
const [note, setNote] = useState('');
+ const [notesForDriver, setNotesForDriver] = useState('');
const [selectedFile, setSelectedFile] = useState();
const [showDeleteModal, setShowDeleteModal] = useState(false);
@@ -564,6 +565,7 @@ const UpdateCustomer = () => {
// Additional Information
setNote(currentCustomer.note || currentCustomer.private_note || '');
+ setNotesForDriver(currentCustomer.notes_for_driver || '');
}
}, [currentCustomer]);
@@ -768,6 +770,7 @@ const UpdateCustomer = () => {
// Additional Information
note,
+ notes_for_driver: notesForDriver,
edit_by: localStorage.getItem('user') && JSON.parse(localStorage.getItem('user'))?.name || '',
status: 'active',
@@ -1760,6 +1763,16 @@ const UpdateCustomer = () => {
style={{width: '400px'}}
/>
+
diff --git a/client/src/components/customers/ViewCustomer.js b/client/src/components/customers/ViewCustomer.js
index 2450793..bacb906 100644
--- a/client/src/components/customers/ViewCustomer.js
+++ b/client/src/components/customers/ViewCustomer.js
@@ -758,6 +758,10 @@ const ViewCustomer = () => {
Notes And Attachments
{currentCustomer?.note || currentCustomer?.private_note}
+
+
Notes for Driver
+
{currentCustomer?.notes_for_driver}
+
diff --git a/client/src/components/trans-routes/RouteCustomerEditor.js b/client/src/components/trans-routes/RouteCustomerEditor.js
index 975ac3f..9df7901 100644
--- a/client/src/components/trans-routes/RouteCustomerEditor.js
+++ b/client/src/components/trans-routes/RouteCustomerEditor.js
@@ -329,7 +329,7 @@ const RouteCustomerEditor = ({currentRoute, setNewCustomerList = (a) => {}, view
customer_type: customer.type,
customer_pickup_status: customer.pickup_status,
customer_note: customer.note,
- customer_special_needs: customer.special_needs,
+ customer_special_needs: customer.notes_for_driver || '',
customer_phone: customer.phone || customer.mobile_phone || customer.home_phone,
customer_route_status: PERSONAL_ROUTE_STATUS.NO_STATUS,
customer_pickup_order: customers.length + newRouteCustomerList.length + 1,
@@ -354,7 +354,7 @@ const RouteCustomerEditor = ({currentRoute, setNewCustomerList = (a) => {}, view
customer_type: customer.type,
customer_pickup_status: customer.pickup_status,
customer_note: customer.note,
- customer_special_needs: customer.special_needs,
+ customer_special_needs: customer.notes_for_driver || '',
customer_phone: customer.phone || customer.mobile_phone || customer.home_phone,
customer_route_status: PERSONAL_ROUTE_STATUS.NO_STATUS,
customer_pickup_order: customers.length + 1,
@@ -447,7 +447,7 @@ const RouteCustomerEditor = ({currentRoute, setNewCustomerList = (a) => {}, view
customer_type: customerData.type,
customer_pickup_status: customerData.pickup_status,
customer_note: customerData.note,
- customer_special_needs: customerData.special_needs,
+ customer_special_needs: customerData.notes_for_driver || '',
customer_phone: customerData.phone || customerData.mobile_phone || customerData.home_phone,
customer_route_status: PERSONAL_ROUTE_STATUS.NO_STATUS,
customer_pickup_order: customers.length + 1,