Improvement in an example CRUD project
Budget: €8 – €30 EUR
First of all delete old tables and import new sql dump laravel-vue-crud-sample_2022_03_31.sql
Generally:
When a user creates, changes or deletes a record, the user id and the time should be saved in the corresponding fields.
We do not delete records, but use softdelete.
(https://www.laravelcode.com/post/laravel-8-soft-delete-example-tutorial)
Only those data records should be displayed in the lists that were not created using softdelete.
Only those data records should be displayed in the lists that have the same company_id as the company_id of the logged-in user.
Change details/edit function
pic1.png 1.
show here the fuel type name (client_company_vehicle_drive_fuel_types.name)
if client_company_vehicle_drive_fuel_types.id = 1 or 2
show additionally client_vehicles.max_fuel_capacity
if client_company_vehicle_drive_fuel_types.id = 3
show additionally client_vehicles.max_battery_capacity
if client_company_vehicle_drive_fuel_types.id = 4 or 5
show additionally client_vehicles.max_fuel_capacity and client_vehicles.max_battery_capacity
pic1.png 2.
If you click on the "Edit" button, the area should switch to edit mode. Input fields are then displayed instead of the texts.
See picture pic2.png
It is supposed to be a vue.js function. The entire page should not be reloaded.
pic2.png 1.
If you click on the "Cancel" button, you should return to Details mode without saving. (pic1.png)
pic2.png 2.
If you click on the "Save" button, the changes should be filtered and you should switch back to the details mode. (pic1.png)
pic2.png 3.
A dropdown should be displayed in which the names from the table client_company_vehicle_drive_fuel_types are displayed.
It is a mandatory field. If nothing is selected here, a corresponding error message shall appear.
By default, nothing should be selected here. We do this because the user is then forced to select one of the entries.
When saving, client_company_vehicle_drive_fuel_types.id should be saved in the field client_vehicles.drive_fuel_type.
It is supposed to be a vue.js function. The entire page should not be reloaded.
Generally:
When a user creates, changes or deletes a record, the user id and the time should be saved in the corresponding fields.
We do not delete records, but use softdelete.
(https://www.laravelcode.com/post/laravel-8-soft-delete-example-tutorial)
Only those data records should be displayed in the lists that were not created using softdelete.
Only those data records should be displayed in the lists that have the same company_id as the company_id of the logged-in user.
Change details/edit function
pic1.png 1.
show here the fuel type name (client_company_vehicle_drive_fuel_types.name)
if client_company_vehicle_drive_fuel_types.id = 1 or 2
show additionally client_vehicles.max_fuel_capacity
if client_company_vehicle_drive_fuel_types.id = 3
show additionally client_vehicles.max_battery_capacity
if client_company_vehicle_drive_fuel_types.id = 4 or 5
show additionally client_vehicles.max_fuel_capacity and client_vehicles.max_battery_capacity
pic1.png 2.
If you click on the "Edit" button, the area should switch to edit mode. Input fields are then displayed instead of the texts.
See picture pic2.png
It is supposed to be a vue.js function. The entire page should not be reloaded.
pic2.png 1.
If you click on the "Cancel" button, you should return to Details mode without saving. (pic1.png)
pic2.png 2.
If you click on the "Save" button, the changes should be filtered and you should switch back to the details mode. (pic1.png)
pic2.png 3.
A dropdown should be displayed in which the names from the table client_company_vehicle_drive_fuel_types are displayed.
It is a mandatory field. If nothing is selected here, a corresponding error message shall appear.
By default, nothing should be selected here. We do this because the user is then forced to select one of the entries.
When saving, client_company_vehicle_drive_fuel_types.id should be saved in the field client_vehicles.drive_fuel_type.
It is supposed to be a vue.js function. The entire page should not be reloaded.