This commit is contained in:
@@ -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
|
||||
|
||||
@@ -223,6 +223,7 @@ module.exports = mongoose => {
|
||||
|
||||
// Additional Information
|
||||
note: String,
|
||||
notes_for_driver: String,
|
||||
private_note: String,
|
||||
|
||||
// Other legacy fields
|
||||
|
||||
@@ -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'}}
|
||||
/>
|
||||
</div>
|
||||
<div className="me-4">
|
||||
<div className="field-label">Notes for Driver</div>
|
||||
<textarea
|
||||
placeholder="e.g., Call before arrival"
|
||||
value={notesForDriver}
|
||||
onChange={e => setNotesForDriver(e.target.value)}
|
||||
rows={4}
|
||||
style={{width: '400px'}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="list row mb-5">
|
||||
|
||||
@@ -758,6 +758,10 @@ const ViewCustomer = () => {
|
||||
<div className="field-label">Notes And Attachments</div>
|
||||
<div className="field-value">{currentCustomer?.note || currentCustomer?.private_note}</div>
|
||||
</div>
|
||||
<div className="field-body">
|
||||
<div className="field-label">Notes for Driver</div>
|
||||
<div className="field-value">{currentCustomer?.notes_for_driver}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user