添加首页加载skeleton

This commit is contained in:
2026-05-26 17:04:04 +08:00
parent 9680276b3f
commit 2f528c049f
10 changed files with 1329 additions and 410 deletions

View File

@@ -79,6 +79,7 @@ ALTER TABLE public.ml_delivery_staff ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.ml_delivery_stations ENABLE ROW LEVEL SECURITY;
DROP POLICY IF EXISTS delivery_staff_self_select ON public.ml_delivery_staff;
DROP POLICY IF EXISTS delivery_staff_self_update ON public.ml_delivery_staff;
CREATE POLICY delivery_staff_self_select
ON public.ml_delivery_staff
FOR SELECT
@@ -93,6 +94,29 @@ CREATE POLICY delivery_staff_self_select
)
);
CREATE POLICY delivery_staff_self_update
ON public.ml_delivery_staff
FOR UPDATE
TO authenticated
USING (
deleted_at IS NULL
AND EXISTS (
SELECT 1
FROM public.ak_users u
WHERE u.id = ml_delivery_staff.uid
AND u.auth_id = auth.uid()
)
)
WITH CHECK (
deleted_at IS NULL
AND EXISTS (
SELECT 1
FROM public.ak_users u
WHERE u.id = ml_delivery_staff.uid
AND u.auth_id = auth.uid()
)
);
DROP POLICY IF EXISTS delivery_stations_select_active ON public.ml_delivery_stations;
CREATE POLICY delivery_stations_select_active
ON public.ml_delivery_stations