Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
71dbad595d
commit
6b55b0ec97
@@ -131,6 +131,19 @@ function UsersPage() {
|
||||
load();
|
||||
};
|
||||
|
||||
const handleRateSave = async (userId: string, rate: number | null) => {
|
||||
const { error } = await supabase
|
||||
.from("profiles")
|
||||
.update({ hourly_rate: rate })
|
||||
.eq("id", userId);
|
||||
if (error) {
|
||||
toast.error("Could not save rate", { description: error.message });
|
||||
return;
|
||||
}
|
||||
toast.success("Rate updated");
|
||||
load();
|
||||
};
|
||||
|
||||
return (
|
||||
<PageContainer>
|
||||
<PageHeader
|
||||
@@ -173,6 +186,7 @@ function UsersPage() {
|
||||
<TableHead>Name</TableHead>
|
||||
<TableHead>Email</TableHead>
|
||||
<TableHead>Role</TableHead>
|
||||
<TableHead className="w-[140px]">Hourly rate</TableHead>
|
||||
<TableHead className="w-[80px]"></TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
|
||||
Reference in New Issue
Block a user