Closed Clusterpuck closed 5 days ago
Deleting Product -> Remove from incomplete orders only, only change status Nick Deleting Accounts -> Set a status only, don’t delete “removed” Nick Deleting Customers -> Set a status only, don’t delete “removed” Nick Deleting Delivery Routes -> Can only delete active routes -all orders must go back to planned Nick Deleting Orders -> Can only delete undelivered Amelie - DONE Deleting Locations -> Status change to something, can’t be assigned to unfinished order Amelie - DONE Deleting Vehicles -> Status change to out of commission Amelie - DONE Deleting OrderProducts -> Only ever done as part of deleting Order or Product, under those limitations. Amelie - Not relevent, OrderProductController deleted
Accounts: No existing username (handled already by database) Nick Vehicles: No matching license plate. Amelie - DONE Customer: Handled by database Nick DeliveryRoutes: Nick Driver exists: done, (assigned route on same date? Not yet please) All orders are “planned” and exist deliveryDate > Now vehicleID is not “out of commission status” Driver Account is still working there.
Location: no controls Amelie - DONE OrderProducts: Remove entirely from API, not needed outside database Amelie - DONE Orders: Check if product isn’t “discontinued” status. Customer isn’t “inactive” status. Set account by token on request. Location isn’t inactive status. deliveryDate >today. Amelie Products: Managed by database Nick
add LocationIn DTO VehicleIn DTO
make deleting vehicle check if it's assocaited to routes before deleting
Accounts Controller:
Delivery Controller:
Location Controller:
Vehicle Controller:
Post order should not require status, id or OrderID, postion number or delivery ID, or product status. Should give feedback on bad addition
Deleting order does not delete orderproduct
Disallow duplicate fields, such as customer, location and products Don't allow invalid data such as Phone number with letters.