Skip to content

Commit

Permalink
whatsapp CSA
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan-Alkosto committed Jun 12, 2024
1 parent a1d65ee commit 66b80fa
Show file tree
Hide file tree
Showing 7 changed files with 977 additions and 7 deletions.
38 changes: 37 additions & 1 deletion dist/alkomprar/json/service-centers.json
Original file line number Diff line number Diff line change
Expand Up @@ -2977,6 +2977,9 @@
"phone": [
"018005191055"
],
"whatsapp": [
"3122100100"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 4:00 p.m",
"Sab 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -3163,6 +3166,9 @@
"phone": [
"01 8000111966"
],
"whatsapp": [
"3222783347"
],
"schedule": [
"Lun a Vie de 7:00 a.m a 5:00 p.m",
"Sab de 8:00 a.m a 1:00 p.m"
Expand Down Expand Up @@ -3859,6 +3865,9 @@
"phone": [
"018000180382"
],
"whatsapp": [
"3160250327"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 5:00 p.m",
"Sab de 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -4108,6 +4117,9 @@
"phone": [
"018005191055"
],
"whatsapp": [
"3122100100"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 4:00 p.m",
"Sab de 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -4194,6 +4206,9 @@
"phone": [
"018000511000"
],
"whatsapp": [
"3164539797"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 5:00 p.m",
"Sab de 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -4613,6 +4628,9 @@
"irobot-linea-nacional": {
"name": "IROBOT, Alkosto/Ktronix",
"address": "Almacén donde realizó la compra",
"whatsapp": [
"3122025959"
],
"schedule": [
"Dom a Dom de 8:00 a.m a 9:00 p.m"
],
Expand Down Expand Up @@ -4710,6 +4728,9 @@
"phone": [
"018000524065"
],
"whatsapp": [
"3336424616"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 4:00 p.m",
"Sab de 9:00 a.m a 1:00 p.m"
Expand Down Expand Up @@ -5138,6 +5159,9 @@
"cell": [
"3222634570"
],
"whatsapp": [
"3173720142"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 6:00 p.m",
"Sab y Dom de 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -5349,6 +5373,9 @@
"phone": [
"018005191055"
],
"whatsapp": [
"3122100100"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 4:00 p.m",
"Sab de 8:00 a.m a 12:00 p.m"
Expand All @@ -5361,6 +5388,9 @@
"phone": [
"018000180425"
],
"whatsapp": [
"3103724585"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 12:00 p.m",
"Sab de 1:00 a.m a 5:00 p.m"
Expand Down Expand Up @@ -6140,6 +6170,9 @@
"phone": [
"018000524066"
],
"whatsapp": [
"3174428097"
],
"schedule": [
"Lun a Vie de 7:00 a.m a 7:00 p.m",
"Sab de 8:00 a.m a 3:00 p.m"
Expand Down Expand Up @@ -7434,7 +7467,7 @@
},
"samsung-call-center": {
"name": "Samsung Call Center",
"cell": [
"whatsapp": [
"3138698800"
],
"phone": [
Expand Down Expand Up @@ -9139,6 +9172,9 @@
"phone": [
"3557645"
],
"whatsapp": [
"3118760622"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 6:00 p.m",
"Sab de 8:00 a.m a 2:00 p.m"
Expand Down
42 changes: 41 additions & 1 deletion dist/alkosto/json/service-centers.json
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,10 @@
"7245151",
"018000112057"
],
"whatsapp": [
"3174361131",
"3174361132"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 5:00 p.m"
],
Expand Down Expand Up @@ -2980,6 +2984,9 @@
"phone": [
"018005191055"
],
"whatsapp": [
"3122100100"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 4:00 p.m",
"Sab 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -3166,6 +3173,9 @@
"phone": [
"01 8000111966"
],
"whatsapp": [
"3222783347"
],
"schedule": [
"Lun a Vie de 7:00 a.m a 5:00 p.m",
"Sab de 8:00 a.m a 1:00 p.m"
Expand Down Expand Up @@ -3862,6 +3872,9 @@
"phone": [
"018000180382"
],
"whatsapp": [
"3160250327"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 5:00 p.m",
"Sab de 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -4111,6 +4124,9 @@
"phone": [
"018005191055"
],
"whatsapp": [
"3122100100"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 4:00 p.m",
"Sab de 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -4197,6 +4213,9 @@
"phone": [
"018000511000"
],
"whatsapp": [
"3164539797"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 5:00 p.m",
"Sab de 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -4616,6 +4635,9 @@
"irobot-linea-nacional": {
"name": "IROBOT, Alkosto/Ktronix",
"address": "Almacén donde realizó la compra",
"whatsapp": [
"3122025959"
],
"schedule": [
"Dom a Dom de 8:00 a.m a 9:00 p.m"
],
Expand Down Expand Up @@ -4713,6 +4735,9 @@
"phone": [
"018000524065"
],
"whatsapp": [
"3336424616"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 4:00 p.m",
"Sab de 9:00 a.m a 1:00 p.m"
Expand Down Expand Up @@ -5141,6 +5166,9 @@
"cell": [
"3222634570"
],
"whatsapp": [
"3173720142"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 6:00 p.m",
"Sab y Dom de 8:00 a.m a 12:00 p.m"
Expand Down Expand Up @@ -5352,6 +5380,9 @@
"phone": [
"018005191055"
],
"whatsapp": [
"3122100100"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 4:00 p.m",
"Sab de 8:00 a.m a 12:00 p.m"
Expand All @@ -5364,6 +5395,9 @@
"phone": [
"018000180425"
],
"whatsapp": [
"3103724585"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 12:00 p.m",
"Sab de 1:00 a.m a 5:00 p.m"
Expand Down Expand Up @@ -6244,6 +6278,9 @@
"phone": [
"018000524066"
],
"whatsapp": [
"3174428097"
],
"schedule": [
"Lun a Vie de 7:00 a.m a 7:00 p.m",
"Sab de 8:00 a.m a 3:00 p.m"
Expand Down Expand Up @@ -7417,7 +7454,7 @@
},
"samsung-call-center": {
"name": "Samsung Call Center",
"cell": [
"whatsapp": [
"3138698800"
],
"phone": [
Expand Down Expand Up @@ -9122,6 +9159,9 @@
"phone": [
"3557645"
],
"whatsapp": [
"3118760622"
],
"schedule": [
"Lun a Vie de 8:00 a.m a 6:00 p.m",
"Sab de 8:00 a.m a 2:00 p.m"
Expand Down
68 changes: 67 additions & 1 deletion dist/common/js/map-2f0055f7.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,68 @@
/*! service-centers - release: 1.4.2 */
import{getFormatedPhone as e,getFormatedCellphone as t}from"./menu-d4e6eb5c.js";import"./servicio.js";const n=window.google;class s{constructor({$element:e,baseSite:t,center:s}){this.$element=document.querySelector(e),this.baseSite=t,this.bounds,this.center=s,this.geocoder=new n.maps.Geocoder,this.infoWindow=new n.maps.InfoWindow,this.markers={},this.map,this.init()}bounceMarker(e,t){void 0!==this.markers[e]&&("start"===t?this.markers[e].setAnimation(n.maps.Animation.BOUNCE):this.markers[e].setAnimation(null))}clickMarker(e){void 0!==this.markers[e]&&n.maps.event.trigger(this.markers[e],"click")}async init(){return this.map=await new n.maps.Map(this.$element,{center:new n.maps.LatLng(this.center),disableDefaultUI:!0,draggable:!0,zoom:10,zoomControl:!0}),this.map}setInfoWindow(n){const{address:s,cellphone:i,map:o,name:a,phone:r}=n,c=e(n,!1),m=t(n,!1);return`<div class="service-centers__map__info-window">\n <button class="service-centers__map__info-window__close"><span class="alk-icon-close"></span></button>\n <h4>${a}</h4>\n ${s.length?`<p><strong>Dirección:</strong><br />\n ${s}\n </p>`:""}\n ${r.length?`<p><strong>Contacto telefónico:</strong><br />\n ${c.join(" ")}\n </p>`:""}\n ${s.length||r.length||!i.length?"":`<p><strong>Contacto telefónico:</strong><br />\n ${m.join(" ")}\n </p>`}\n ${o.length?` <p><i class="alk-icon-exportar"></i>\n <a rel="noopener" href="${o}" title="Indicaciones para llegar a ${a}" target="_blank">¿Cómo llegar?</a>\n </p>`:""}\n </div>`}setMarkers(e){return this.bounds=new n.maps.LatLngBounds,this.clearMarkers(),this.markers={},e.map((e=>{const{coordinates:t,id:s,name:i}=e,o=new n.maps.Marker({position:new n.maps.LatLng(t.lat,t.lng),map:this.map,icon:`https://cdn.jsdelivr.net/gh/ux-alkosto/service-centers/dist/${this.baseSite}/img/pin.svg`,title:i});o.addListener("click",(()=>{this.infoWindow.setContent(this.setInfoWindow(e)),this.infoWindow.open(this.map,o),this.map.panTo(o.getPosition()),document.dispatchEvent(new CustomEvent("updateCenter",{detail:{center:s}}))})),this.bounds.extend(o.getPosition()),this.markers[s]=o})),this.map.setCenter(this.bounds.getCenter()),this.map.fitBounds(this.bounds),this.map.getZoom()>18&&this.map.setZoom(18),this.markers}clearMarkers(){return Object.values(this.markers).map((e=>e.setMap(null)))}}export{s as Map};
import {
getFormatedPhone as e,
getFormatedCellphone as t
} from "./menu-d4e6eb5c.js";
import "./servicio.js";
const n = window.google;
class s {
constructor({
$element: e,
baseSite: t,
center: s,
}) {
this.$element = document.querySelector(e), this.baseSite = t, this.bounds, this.center = s, this.geocoder = new n.maps.Geocoder, this.infoWindow = new n.maps.InfoWindow, this.markers = {}, this.map, this.init()
}
bounceMarker(e, t) {
void 0 !== this.markers[e] && ("start" === t ? this.markers[e].setAnimation(n.maps.Animation.BOUNCE) : this.markers[e].setAnimation(null))
}
clickMarker(e) {
void 0 !== this.markers[e] && n.maps.event.trigger(this.markers[e], "click")
}
async init() {
return this.map = await new n.maps.Map(this.$element, {
center: new n.maps.LatLng(this.center),
disableDefaultUI: !0,
draggable: !0,
zoom: 10,
zoomControl: !0
}), this.map
}
setInfoWindow(n) {
const {
address: s,
cellphone: i,
map: o,
name: a,
phone: r
} = n, c = e(n, !1), m = t(n, !1);
return `<div class="service-centers__map__info-window">\n<button class="service-centers__map__info-window__close"><span class="alk-icon-close"></span></button>\n<h4>${a}</h4>\n${s.length?`<p><strong>Dirección:</strong><br />\n ${s}\n</p>`:""}\n${r.length?`<p><strong>Contacto telefónico:</strong><br />\n ${c.join(" ")}\n</p>`:""}\n${s.length||r.length||!i.length?"":`<p><strong>Contacto telefónico:</strong><br />\n ${m.join(" ")}\n</p>`}\n${o.length?` <p><i class="alk-icon-exportar"></i>\n <a rel="noopener" href="${o}" title="Indicaciones para llegar a ${a}" target="_blank">¿Cómo llegar?</a>\n</p>`:""}\n </div>`
}
setMarkers(e) {
return this.bounds = new n.maps.LatLngBounds, this.clearMarkers(), this.markers = {}, e.map((e => {
const {
coordinates: t,
id: s,
name: i
} = e, o = new n.maps.Marker({
position: new n.maps.LatLng(t.lat, t.lng),
map: this.map,
icon: `https://cdn.jsdelivr.net/gh/ux-alkosto/service-centers/dist/${this.baseSite}/img/pin.svg`,
title: i
});
o.addListener("click", (() => {
this.infoWindow.setContent(this.setInfoWindow(e)), this.infoWindow.open(this.map, o), this.map.panTo(o.getPosition()), document.dispatchEvent(new CustomEvent("updateCenter", {
detail: {
center: s
}
}))
})), this.bounds.extend(o.getPosition()), this.markers[s] = o
})), this.map.setCenter(this.bounds.getCenter()), this.map.fitBounds(this.bounds), this.map.getZoom() > 18 && this.map.setZoom(18), this.markers
}
clearMarkers() {
return Object.values(this.markers).map((e => e.setMap(null)))
}
}
export {
s as Map
};
Loading

0 comments on commit 66b80fa

Please sign in to comment.