From 036bed2fa6ab53fb73c52a378216c79c2ba5b394 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Tue, 16 Jan 2024 20:35:33 +0100 Subject: [PATCH] Use add_*_carousel_slide and translate_*_carousel_slide in demo.sql No point on having these functions and not exercise them, even if there are unit tests. --- demo/demo.sql | 61 ++++++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/demo/demo.sql b/demo/demo.sql index 008aba6..55775d2 100644 --- a/demo/demo.sql +++ b/demo/demo.sql @@ -73,45 +73,36 @@ select add_media(52, 'wooden_lodges_carousel9.avif', 'image/avif', decode('m4_es select add_media(52, 'wooden_lodges_carouselA.avif', 'image/avif', decode('m4_esyscmd([[base64 -w0 demo/wooden_lodges_carouselA.avif]])', 'base64')); select add_media(52, 'wooden_lodges_carouselB.avif', 'image/avif', decode('m4_esyscmd([[base64 -w0 demo/wooden_lodges_carouselB.avif]])', 'base64')); select add_media(52, 'wooden_lodges_carouselC.avif', 'image/avif', decode('m4_esyscmd([[base64 -w0 demo/wooden_lodges_carouselC.avif]])', 'base64')); -; -insert into home_carousel (media_id, caption) -values (67, 'Volcà de Santa Margarida') - , (68, 'Gorga fosca Sadernes') - , (69, 'Castellfollit de la Roca') - , (70, 'Besalú') - , (71, 'Santa Pau') - , (72, 'Banyoles') - , (73, 'Girona') - , (74, 'Costa Brava') - , (75, 'Barcelona') -; +select add_home_carousel_slide(67, 'Volcà de Santa Margarida'); +select add_home_carousel_slide(68, 'Gorga fosca Sadernes'); +select add_home_carousel_slide(69, 'Castellfollit de la Roca'); +select add_home_carousel_slide(70, 'Besalú'); +select add_home_carousel_slide(71, 'Santa Pau'); +select add_home_carousel_slide(72, 'Banyoles'); +select add_home_carousel_slide(73, 'Girona'); +select add_home_carousel_slide(74, 'Costa Brava'); +select add_home_carousel_slide(75, 'Barcelona'); -insert into home_carousel_i18n (media_id, lang_tag, caption) -values (67, 'en', 'Santa Margarida volcano') - , (67, 'es', 'Volcán de Santa Margarida') - , (68, 'en', 'Sadernes dark gorge') - , (68, 'es', 'Piletón oscuro Sadernes') -; +select translate_home_carousel_slide(67, 'en', 'Santa Margarida volcano'); +select translate_home_carousel_slide(67, 'es', 'Volcán de Santa Margarida'); +select translate_home_carousel_slide(68, 'en', 'Sadernes dark gorge'); +select translate_home_carousel_slide(68, 'es', 'Piletón oscuro Sadernes'); -insert into services_carousel (media_id, caption) -values (76, 'La Garrotxa') - , (77, 'Tenda') - , (78, 'Parceŀles') - , (79, 'Hamaca') - , (63, 'Safari Tents') -; +select add_services_carousel_slide(76, 'La Garrotxa'); +select add_services_carousel_slide(77, 'Tenda'); +select add_services_carousel_slide(78, 'Parceŀles'); +select add_services_carousel_slide(79, 'Hamaca'); +select add_services_carousel_slide(63, 'Safari Tents'); -insert into services_carousel_i18n (media_id, lang_tag, caption) -values (77, 'en', 'Tent') - , (77, 'es', 'Tenda') - , (78, 'en', 'Plots') - , (78, 'es', 'Parcelas') - , (79, 'en', 'Hammock') - , (79, 'es', 'Amaca') - , (63, 'en', 'Safari Tents') - , (63, 'es', 'Tiendas Safari') -; +select translate_services_carousel_slide(77, 'en', 'Tent'); +select translate_services_carousel_slide(77, 'es', 'Tenda'); +select translate_services_carousel_slide(78, 'en', 'Plots'); +select translate_services_carousel_slide(78, 'es', 'Parcelas'); +select translate_services_carousel_slide(79, 'en', 'Hammock'); +select translate_services_carousel_slide(79, 'es', 'Amaca'); +select translate_services_carousel_slide(63, 'en', 'Safari Tents'); +select translate_services_carousel_slide(63, 'es', 'Tiendas Safari'); alter table campsite_type alter column campsite_type_id restart with 72; select add_campsite_type(52, 62, 'Parceŀles', '

Acampa enmig de la natura

Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.

Parcel·les amples amb serveis a prop d’on ets per fer allò que vols.

', '

Proxo/terrassa (13 m²)

Planta baixa (32 m²)

Planta altell (16 m²)

', '

El preu inclou

* Tovalloles: preu extra

', '

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

', '', 6, true);