feat: implement calendar exceptions, realtime updates, and notifications
This commit is contained in:
@@ -70,7 +70,7 @@ export default function ShopDetails() {
|
||||
Alert.alert('Sucesso', 'Produto adicionado ao carrinho.');
|
||||
};
|
||||
|
||||
const schedule = shop.schedule || defaultSchedule;
|
||||
const schedule = (shop.schedule || defaultSchedule).filter(s => !s.isException);
|
||||
const currentDayIndex = new Date().getDay() === 0 ? 6 : new Date().getDay() - 1;
|
||||
const isFav = isFavorite(shop.id);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export type Barber = { id: string; name: string; imageUrl?: string; specialties: string[]; schedule: { day: string; slots: string[] }[] };
|
||||
export type Service = { id: string; name: string; price: number; duration: number; barberIds: string[] };
|
||||
export type Product = { id: string; name: string; price: number; stock: number };
|
||||
export type ShopSchedule = { day: string; open: string; close: string; closed?: boolean };
|
||||
export type ShopSchedule = { day: string; open: string; close: string; closed?: boolean; date?: string; isException?: boolean };
|
||||
export type BarberShop = {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -15,6 +15,7 @@ export type BarberShop = {
|
||||
paymentMethods?: string[];
|
||||
socialNetworks?: { whatsapp?: string; instagram?: string; facebook?: string };
|
||||
contacts?: { phone1?: string; phone2?: string };
|
||||
ownerId?: string;
|
||||
};
|
||||
export type AppointmentStatus = 'pendente' | 'confirmado' | 'concluido' | 'cancelado';
|
||||
export type OrderStatus = 'pendente' | 'confirmado' | 'concluido' | 'cancelado';
|
||||
|
||||
Reference in New Issue
Block a user