Implement State mangement to save data for form processing
clicked create service: fetch the latest service id
{
sales: {
employee_id: 1,
total_amount: sales_item.total_amount in total length
}
service: {
name: service #id
description: Handled by <employee> in <date>
status: active;
has_sales: will be updated when clicked
has_borrow: will be update when clicked
has_jo: will be updated when clicked
has_reservation: will be updated when clicked
}
?borrow: {
},
?reservation: {
}
?sales_item: {
...item_data,
quantity,
total_amount: price * quantity,
type: borrow, reservation, joborder
}
?joborder: {
},
?customer: {
}
}
Ideally use dictionary or hashmap to save all necessary data. Just base Idea here
Implement State mangement to save data for form processing
Ideally use dictionary or hashmap to save all necessary data. Just base Idea here