preciazo/db-datos/supermercado.ts

34 lines
1 KiB
TypeScript
Raw Permalink Normal View History

export enum Supermercado {
Dia = "Dia",
Carrefour = "Carrefour",
Coto = "Coto",
2024-01-04 22:25:17 +00:00
Jumbo = "Jumbo",
2024-02-07 02:20:04 +00:00
Farmacity = "Farmacity",
}
2024-01-04 22:32:16 +00:00
export const supermercados: Supermercado[] = [
Supermercado.Carrefour,
Supermercado.Coto,
Supermercado.Dia,
Supermercado.Jumbo,
2024-02-07 02:20:04 +00:00
Supermercado.Farmacity,
2024-01-04 22:32:16 +00:00
];
export const hosts: { [host: string]: Supermercado } = {
"diaonline.supermercadosdia.com.ar": Supermercado.Dia,
"www.carrefour.com.ar": Supermercado.Carrefour,
"www.cotodigital3.com.ar": Supermercado.Coto,
2024-01-04 22:25:17 +00:00
"www.jumbo.com.ar": Supermercado.Jumbo,
2024-02-07 02:20:04 +00:00
"www.farmacity.com": Supermercado.Farmacity,
};
2024-02-06 01:36:00 +00:00
export const hostBySupermercado = Object.fromEntries(
Object.entries(hosts).map(([a, b]) => [b, a])
) as Record<Supermercado, string>;
2024-02-07 02:20:04 +00:00
// también actualizar en sitio/src/routes/ean/[ean]/+page.svelte
export const colorBySupermercado: { [supermercado in Supermercado]: string } = {
[Supermercado.Dia]: "#d52b1e",
[Supermercado.Carrefour]: "#19549d",
[Supermercado.Coto]: "#e20025",
2024-01-04 22:25:17 +00:00
[Supermercado.Jumbo]: "#2dc850",
2024-02-07 02:20:04 +00:00
[Supermercado.Farmacity]: "#EF7603",
};