Assign Staff To Booking

Function Number: 8

Function Name: Assign Staff To Booking

Link to Function Implementation

Function Type: Insertion

Description: This function accepts as inputs Booking ID and Staff ID. It will then create a record in the table 'assign_staff' linking a particular Staff ID to a specific Booking ID.

Primary Users: Resort staff responsible for creating or managing reservations and tracking staff assignments

Tables Affected: assign_staff

Sample Input: Booking ID = 1, Staff ID = 6

Sample Output: "Staff has been assigned"

Notes: This function consists of one insert query on one table (assign_staff). Booking ID and Staff ID are associated within the created record. A third column exists in the table which can be modified using the 'assign_feedback' function in order to memorialize feedback provided for a particular staff member by a booking during that booking's checkout survey. Error checking is performed to ensure that Staff ID and Booking ID exist in the database, and if any errors occur during insertion these are displayed to the user. For example, attempting to create a duplicate assignment will result in the following error message: "ERROR Making Assignment: Duplicate entry '1-1' for key 'PRIMARY.' " In this case, the association of Guest ID 1 and Staff ID 1 already exists in the table.

Main Menu