deleteWorkshop(id: number)
takes in the id number of a workshop and calls delete from workshop API. It throws an error -> "Error deleting workshop."
Updated:
workshop-list.component.HTML
added a delete button for each workshop. This is connected to the workshop list component. Subscribes to see if there is an error or it was successful.
workshop-list.component.ts
deleteWorkshop(id:number)
calls workshop-delete service's deleteWorkshop() and passes in the workshop id.
onDelSuccess(msg: Workshop)
Calls a window alert to tell you that "workshop has been deleted." It then updates the list of workshops by calling getWorkshops().
onDelError(err: Error)
If there is a message, it calls a window alert with it. If not, it calls a window alert with "unknown error."
Issue 33
Added:
workshop-delete.service
Updated:
workshop-list.component.HTML
workshop-list.component.ts
deleteWorkshop(id:number) calls workshop-delete service's deleteWorkshop() and passes in the workshop id.
onDelSuccess(msg: Workshop) Calls a window alert to tell you that "workshop has been deleted." It then updates the list of workshops by calling getWorkshops().
onDelError(err: Error) If there is a message, it calls a window alert with it. If not, it calls a window alert with "unknown error."