Include transition to the transitive status
This commit is contained in:
parent
c1e40af2c4
commit
63d07096bf
@ -29,6 +29,7 @@ export default function guestsTable() {
|
|||||||
const handleInviteGuest = (e: React.MouseEvent<HTMLElement>) => handleGuestChange(e, 'invited');
|
const handleInviteGuest = (e: React.MouseEvent<HTMLElement>) => handleGuestChange(e, 'invited');
|
||||||
const handleConfirmGuest = (e: React.MouseEvent<HTMLElement>) => handleGuestChange(e, 'confirmed');
|
const handleConfirmGuest = (e: React.MouseEvent<HTMLElement>) => handleGuestChange(e, 'confirmed');
|
||||||
const handleDeclineGuest = (e: React.MouseEvent<HTMLElement>) => handleGuestChange(e, 'declined');
|
const handleDeclineGuest = (e: React.MouseEvent<HTMLElement>) => handleGuestChange(e, 'declined');
|
||||||
|
const handleTentativeGuest = (e: React.MouseEvent<HTMLElement>) => handleGuestChange(e, 'tentative');
|
||||||
|
|
||||||
const handleGuestChange = (e: React.MouseEvent<HTMLElement>, status:string) => {
|
const handleGuestChange = (e: React.MouseEvent<HTMLElement>, status:string) => {
|
||||||
fetch("/api/guests/bulk_update.json",
|
fetch("/api/guests/bulk_update.json",
|
||||||
@ -105,12 +106,13 @@ export default function guestsTable() {
|
|||||||
{guest.status === 'Considered' && (<button data-guest-id={guest.id} onClick={handleInviteGuest} className={`${ctaClassName} bg-blue-400 hover:bg-blue-600`}>
|
{guest.status === 'Considered' && (<button data-guest-id={guest.id} onClick={handleInviteGuest} className={`${ctaClassName} bg-blue-400 hover:bg-blue-600`}>
|
||||||
Invite
|
Invite
|
||||||
</button>)}
|
</button>)}
|
||||||
{guest.status === 'Invited' && (<button data-guest-id={guest.id} onClick={handleConfirmGuest} className={`${ctaClassName} bg-green-500 hover:bg-green-600`}>
|
{guest.status === 'Invited' && (
|
||||||
Confirm
|
<>
|
||||||
</button>)}
|
<button data-guest-id={guest.id} onClick={handleConfirmGuest} className={`${ctaClassName} bg-green-500 hover:bg-green-600`}>Confirm</button>
|
||||||
{guest.status === 'Invited' && (<button data-guest-id={guest.id} onClick={handleDeclineGuest} className={`${ctaClassName} bg-red-500 hover:bg-red-600`}>
|
<button data-guest-id={guest.id} onClick={handleDeclineGuest} className={`${ctaClassName} bg-yellow-500 hover:bg-yellow-700`}>Tentative</button>
|
||||||
Decline
|
<button data-guest-id={guest.id} onClick={handleDeclineGuest} className={`${ctaClassName} bg-red-500 hover:bg-red-600`}>Decline</button>
|
||||||
</button>)}
|
</>
|
||||||
|
)}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user