mozrest-sdk-react-dev 0.3.42 → 0.3.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mozrest-sdk.es.js +391 -231
- package/package.json +1 -1
package/mozrest-sdk.es.js
CHANGED
|
@@ -7421,6 +7421,10 @@ const PHONE$4 = "Phone";
|
|
|
7421
7421
|
const PLATFORM$4 = "Platform";
|
|
7422
7422
|
const POSITIVE$4 = "Positive";
|
|
7423
7423
|
const POSTREPLY$4 = "Post reply";
|
|
7424
|
+
const UPDATEREPLY$4 = "Update reply";
|
|
7425
|
+
const AUTOREPLYACTIVATED$4 = "Auto Reply Feature Activated!";
|
|
7426
|
+
const AUTOREPLYDESCRIPTION$4 = "Your AI assistant will now automatically reply to unreplied reviews from the last 30 days. You'll receive a report to check the results.";
|
|
7427
|
+
const UNDERSTOOD$4 = "Understood";
|
|
7424
7428
|
const PUBLISH$4 = "Publish";
|
|
7425
7429
|
const QUERIES$4 = "Queries";
|
|
7426
7430
|
const REPLY$4 = "Reply";
|
|
@@ -7836,6 +7840,7 @@ const Year$5 = "Year";
|
|
|
7836
7840
|
const Covers$4 = "Covered";
|
|
7837
7841
|
const NO_AVAILABLE_CHANNELS$4 = "No available channels";
|
|
7838
7842
|
const select$4 = "Select";
|
|
7843
|
+
const AUTOREPLYREVIEWS$4 = "Auto reply reviews";
|
|
7839
7844
|
const en = {
|
|
7840
7845
|
errors: errors$4,
|
|
7841
7846
|
SPECIALCLOSINGDATES: SPECIALCLOSINGDATES$4,
|
|
@@ -7919,6 +7924,10 @@ const en = {
|
|
|
7919
7924
|
PLATFORM: PLATFORM$4,
|
|
7920
7925
|
POSITIVE: POSITIVE$4,
|
|
7921
7926
|
POSTREPLY: POSTREPLY$4,
|
|
7927
|
+
UPDATEREPLY: UPDATEREPLY$4,
|
|
7928
|
+
AUTOREPLYACTIVATED: AUTOREPLYACTIVATED$4,
|
|
7929
|
+
AUTOREPLYDESCRIPTION: AUTOREPLYDESCRIPTION$4,
|
|
7930
|
+
UNDERSTOOD: UNDERSTOOD$4,
|
|
7922
7931
|
PUBLISH: PUBLISH$4,
|
|
7923
7932
|
QUERIES: QUERIES$4,
|
|
7924
7933
|
REPLY: REPLY$4,
|
|
@@ -8386,7 +8395,8 @@ const en = {
|
|
|
8386
8395
|
Covers: Covers$4,
|
|
8387
8396
|
"dd/mm/yyyy": "dd/mm/yyyy",
|
|
8388
8397
|
NO_AVAILABLE_CHANNELS: NO_AVAILABLE_CHANNELS$4,
|
|
8389
|
-
select: select$4
|
|
8398
|
+
select: select$4,
|
|
8399
|
+
AUTOREPLYREVIEWS: AUTOREPLYREVIEWS$4
|
|
8390
8400
|
};
|
|
8391
8401
|
const errors$3 = { "required": "Este campo es requerido", "email": "Este correo electrónico no es válido", "phone": "Número de teléfono no válido", "url": "URL no válida" };
|
|
8392
8402
|
const SPECIALCLOSINGDATES$3 = "Fechas de cierre especiales u horarios de apertura diferentes (días especiales, festivos, eventos privados…)";
|
|
@@ -8470,6 +8480,10 @@ const PHONE$3 = "Teléfono";
|
|
|
8470
8480
|
const PLATFORM$3 = "Plataforma";
|
|
8471
8481
|
const POSITIVE$3 = "Positivo";
|
|
8472
8482
|
const POSTREPLY$3 = "Publicar respuesta";
|
|
8483
|
+
const UPDATEREPLY$3 = "Actualizar respuesta";
|
|
8484
|
+
const AUTOREPLYACTIVATED$3 = "¡Función de Respuesta Automática Activada!";
|
|
8485
|
+
const AUTOREPLYDESCRIPTION$3 = "Tu asistente de IA ahora responderá automáticamente a las reseñas sin respuesta de los últimos 30 días. Recibirás un informe para revisar los resultados.";
|
|
8486
|
+
const UNDERSTOOD$3 = "Entendido";
|
|
8473
8487
|
const PUBLISH$3 = "Publicar";
|
|
8474
8488
|
const QUERIES$3 = "Consultas";
|
|
8475
8489
|
const REPLY$3 = "Responder";
|
|
@@ -8886,6 +8900,7 @@ const Bookings$3 = "Reservas";
|
|
|
8886
8900
|
const Covers$3 = "Coberturas";
|
|
8887
8901
|
const NO_AVAILABLE_CHANNELS$3 = "No hay canales disponibles";
|
|
8888
8902
|
const select$3 = "Seleccione";
|
|
8903
|
+
const AUTOREPLYREVIEWS$3 = "Auto responder reseñas";
|
|
8889
8904
|
const es$2 = {
|
|
8890
8905
|
errors: errors$3,
|
|
8891
8906
|
SPECIALCLOSINGDATES: SPECIALCLOSINGDATES$3,
|
|
@@ -8969,6 +8984,10 @@ const es$2 = {
|
|
|
8969
8984
|
PLATFORM: PLATFORM$3,
|
|
8970
8985
|
POSITIVE: POSITIVE$3,
|
|
8971
8986
|
POSTREPLY: POSTREPLY$3,
|
|
8987
|
+
UPDATEREPLY: UPDATEREPLY$3,
|
|
8988
|
+
AUTOREPLYACTIVATED: AUTOREPLYACTIVATED$3,
|
|
8989
|
+
AUTOREPLYDESCRIPTION: AUTOREPLYDESCRIPTION$3,
|
|
8990
|
+
UNDERSTOOD: UNDERSTOOD$3,
|
|
8972
8991
|
PUBLISH: PUBLISH$3,
|
|
8973
8992
|
QUERIES: QUERIES$3,
|
|
8974
8993
|
REPLY: REPLY$3,
|
|
@@ -9437,7 +9456,8 @@ const es$2 = {
|
|
|
9437
9456
|
Covers: Covers$3,
|
|
9438
9457
|
"dd/mm/yyyy": "dd/mm/yyyy",
|
|
9439
9458
|
NO_AVAILABLE_CHANNELS: NO_AVAILABLE_CHANNELS$3,
|
|
9440
|
-
select: select$3
|
|
9459
|
+
select: select$3,
|
|
9460
|
+
AUTOREPLYREVIEWS: AUTOREPLYREVIEWS$3
|
|
9441
9461
|
};
|
|
9442
9462
|
const errors$2 = { "required": "Ce champ est requis", "email": "Cet email n'est pas valide", "phone": "Numéro de téléphone non valide", "url": "Cette URL n'est pas valide" };
|
|
9443
9463
|
const SPECIALCLOSINGDATES$2 = "Fermetures exceptionnelles et horaires d’ouverture modifiés (jours fériés, événements, etc.) ";
|
|
@@ -9521,6 +9541,10 @@ const PHONE$2 = "Téléphone";
|
|
|
9521
9541
|
const PLATFORM$2 = "Canal";
|
|
9522
9542
|
const POSITIVE$2 = "Positif";
|
|
9523
9543
|
const POSTREPLY$2 = "Répondre";
|
|
9544
|
+
const UPDATEREPLY$2 = "Modifier la réponse";
|
|
9545
|
+
const AUTOREPLYACTIVATED$2 = "Fonction de Réponse Automatique Activée !";
|
|
9546
|
+
const AUTOREPLYDESCRIPTION$2 = "Votre assistant IA répondra maintenant automatiquement aux avis sans réponse des 30 derniers jours. Vous recevrez un rapport pour vérifier les résultats.";
|
|
9547
|
+
const UNDERSTOOD$2 = "Compris";
|
|
9524
9548
|
const PUBLISH$2 = "Publier";
|
|
9525
9549
|
const QUERIES$2 = "Requêtes";
|
|
9526
9550
|
const REPLY$2 = "Répondre";
|
|
@@ -9937,6 +9961,7 @@ const Bookings$2 = "Réservations";
|
|
|
9937
9961
|
const Covers$2 = "Couverts";
|
|
9938
9962
|
const NO_AVAILABLE_CHANNELS$2 = "Aucun canal disponible";
|
|
9939
9963
|
const select$2 = "Selectionner";
|
|
9964
|
+
const AUTOREPLYREVIEWS$2 = "Auto répondre aux avis";
|
|
9940
9965
|
const fr$1 = {
|
|
9941
9966
|
errors: errors$2,
|
|
9942
9967
|
SPECIALCLOSINGDATES: SPECIALCLOSINGDATES$2,
|
|
@@ -10020,6 +10045,10 @@ const fr$1 = {
|
|
|
10020
10045
|
PLATFORM: PLATFORM$2,
|
|
10021
10046
|
POSITIVE: POSITIVE$2,
|
|
10022
10047
|
POSTREPLY: POSTREPLY$2,
|
|
10048
|
+
UPDATEREPLY: UPDATEREPLY$2,
|
|
10049
|
+
AUTOREPLYACTIVATED: AUTOREPLYACTIVATED$2,
|
|
10050
|
+
AUTOREPLYDESCRIPTION: AUTOREPLYDESCRIPTION$2,
|
|
10051
|
+
UNDERSTOOD: UNDERSTOOD$2,
|
|
10023
10052
|
PUBLISH: PUBLISH$2,
|
|
10024
10053
|
QUERIES: QUERIES$2,
|
|
10025
10054
|
REPLY: REPLY$2,
|
|
@@ -10487,7 +10516,8 @@ const fr$1 = {
|
|
|
10487
10516
|
Covers: Covers$2,
|
|
10488
10517
|
"dd/mm/yyyy": "JJ/MM/AAAA",
|
|
10489
10518
|
NO_AVAILABLE_CHANNELS: NO_AVAILABLE_CHANNELS$2,
|
|
10490
|
-
select: select$2
|
|
10519
|
+
select: select$2,
|
|
10520
|
+
AUTOREPLYREVIEWS: AUTOREPLYREVIEWS$2
|
|
10491
10521
|
};
|
|
10492
10522
|
const errors$1 = { "required": "Dieses Feld ist erforderlich", "email": "Diese E-Mail ist nicht gültig", "phone": "Diese Telefonnummer ist nicht gültig", "url": "Diese URL ist nicht gültig" };
|
|
10493
10523
|
const SPECIALCLOSINGDATES$1 = "Besondere Schließungstage oder abweichende Öffnungszeiten (besondere Tage, Feiertage, private Veranstaltungen…)";
|
|
@@ -10571,6 +10601,10 @@ const PHONE$1 = "Telefon";
|
|
|
10571
10601
|
const PLATFORM$1 = "Plattform";
|
|
10572
10602
|
const POSITIVE$1 = "Positiv";
|
|
10573
10603
|
const POSTREPLY$1 = "Antwort posten";
|
|
10604
|
+
const UPDATEREPLY$1 = "Antwort aktualisieren";
|
|
10605
|
+
const AUTOREPLYACTIVATED$1 = "Automatische Antwort-Funktion aktiviert!";
|
|
10606
|
+
const AUTOREPLYDESCRIPTION$1 = "Ihr KI-Assistent wird nun automatisch auf unbeantwortete Bewertungen der letzten 30 Tage antworten. Sie erhalten einen Bericht zur Überprüfung der Ergebnisse.";
|
|
10607
|
+
const UNDERSTOOD$1 = "Verstanden";
|
|
10574
10608
|
const PUBLISH$1 = "Veröffentlichen";
|
|
10575
10609
|
const QUERIES$1 = "Anfragen";
|
|
10576
10610
|
const REPLY$1 = "Antworten";
|
|
@@ -10987,6 +11021,7 @@ const Bookings$1 = "Buchungen";
|
|
|
10987
11021
|
const Covers$1 = "Covered";
|
|
10988
11022
|
const NO_AVAILABLE_CHANNELS$1 = "Keine verfügbaren Kanäle";
|
|
10989
11023
|
const select$1 = "Auswählen";
|
|
11024
|
+
const AUTOREPLYREVIEWS$1 = "Automatische Antworten für Bewertungen";
|
|
10990
11025
|
const de$1 = {
|
|
10991
11026
|
errors: errors$1,
|
|
10992
11027
|
SPECIALCLOSINGDATES: SPECIALCLOSINGDATES$1,
|
|
@@ -11070,6 +11105,10 @@ const de$1 = {
|
|
|
11070
11105
|
PLATFORM: PLATFORM$1,
|
|
11071
11106
|
POSITIVE: POSITIVE$1,
|
|
11072
11107
|
POSTREPLY: POSTREPLY$1,
|
|
11108
|
+
UPDATEREPLY: UPDATEREPLY$1,
|
|
11109
|
+
AUTOREPLYACTIVATED: AUTOREPLYACTIVATED$1,
|
|
11110
|
+
AUTOREPLYDESCRIPTION: AUTOREPLYDESCRIPTION$1,
|
|
11111
|
+
UNDERSTOOD: UNDERSTOOD$1,
|
|
11073
11112
|
PUBLISH: PUBLISH$1,
|
|
11074
11113
|
QUERIES: QUERIES$1,
|
|
11075
11114
|
REPLY: REPLY$1,
|
|
@@ -11538,7 +11577,8 @@ const de$1 = {
|
|
|
11538
11577
|
Covers: Covers$1,
|
|
11539
11578
|
"dd/mm/yyyy": "dd/mm/yyyy",
|
|
11540
11579
|
NO_AVAILABLE_CHANNELS: NO_AVAILABLE_CHANNELS$1,
|
|
11541
|
-
select: select$1
|
|
11580
|
+
select: select$1,
|
|
11581
|
+
AUTOREPLYREVIEWS: AUTOREPLYREVIEWS$1
|
|
11542
11582
|
};
|
|
11543
11583
|
const errors = { "required": "Dit veld is verplicht", "email": "Dit e-mailadres is ongeldig", "phone": "Ongeldig telefoonnummer", "url": "Deze URL is ongeldig" };
|
|
11544
11584
|
const SPECIALCLOSINGDATES = "Speciale sluitingsdagen of afwijkende openingstijden (feestdagen, evenementen, enz.)";
|
|
@@ -11622,6 +11662,10 @@ const PHONE = "Telefoon";
|
|
|
11622
11662
|
const PLATFORM = "Platform";
|
|
11623
11663
|
const POSITIVE = "Positief";
|
|
11624
11664
|
const POSTREPLY = "Antwoord plaatsen";
|
|
11665
|
+
const UPDATEREPLY = "Antwoord bijwerken";
|
|
11666
|
+
const AUTOREPLYACTIVATED = "Automatische Antwoord-functie Geactiveerd!";
|
|
11667
|
+
const AUTOREPLYDESCRIPTION = "Uw AI-assistent zal nu automatisch reageren op onbeantwoorde beoordelingen van de laatste 30 dagen. U ontvangt een rapport om de resultaten te controleren.";
|
|
11668
|
+
const UNDERSTOOD = "Begrepen";
|
|
11625
11669
|
const PUBLISH = "Publiceren";
|
|
11626
11670
|
const QUERIES = "Vragen";
|
|
11627
11671
|
const REPLY = "Antwoorden";
|
|
@@ -12038,6 +12082,7 @@ const Year$1 = "Jaar";
|
|
|
12038
12082
|
const Bookings = "Reserveringen";
|
|
12039
12083
|
const Covers = "Covered";
|
|
12040
12084
|
const select = "Selecteer";
|
|
12085
|
+
const AUTOREPLYREVIEWS = "Automatische antwoorden voor beoordelingen";
|
|
12041
12086
|
const nl$1 = {
|
|
12042
12087
|
errors,
|
|
12043
12088
|
SPECIALCLOSINGDATES,
|
|
@@ -12121,6 +12166,10 @@ const nl$1 = {
|
|
|
12121
12166
|
PLATFORM,
|
|
12122
12167
|
POSITIVE,
|
|
12123
12168
|
POSTREPLY,
|
|
12169
|
+
UPDATEREPLY,
|
|
12170
|
+
AUTOREPLYACTIVATED,
|
|
12171
|
+
AUTOREPLYDESCRIPTION,
|
|
12172
|
+
UNDERSTOOD,
|
|
12124
12173
|
PUBLISH,
|
|
12125
12174
|
QUERIES,
|
|
12126
12175
|
REPLY,
|
|
@@ -12589,7 +12638,8 @@ const nl$1 = {
|
|
|
12589
12638
|
Bookings,
|
|
12590
12639
|
Covers,
|
|
12591
12640
|
"dd/mm/yyyy": "dd/mm/yyyy",
|
|
12592
|
-
select
|
|
12641
|
+
select,
|
|
12642
|
+
AUTOREPLYREVIEWS
|
|
12593
12643
|
};
|
|
12594
12644
|
instance.use(initReactI18next).init({
|
|
12595
12645
|
// the translations
|
|
@@ -16739,7 +16789,8 @@ const Provider = ({
|
|
|
16739
16789
|
children: /* @__PURE__ */ jsx$1(ProviderContext, {
|
|
16740
16790
|
lang: lang2,
|
|
16741
16791
|
children: /* @__PURE__ */ jsx$1(Children2, {
|
|
16742
|
-
...props
|
|
16792
|
+
...props,
|
|
16793
|
+
lang: lang2
|
|
16743
16794
|
})
|
|
16744
16795
|
})
|
|
16745
16796
|
});
|
|
@@ -39770,14 +39821,17 @@ const useService = (executer, { onSuccess, onError, successText } = {}) => {
|
|
|
39770
39821
|
const AddReviewReply = async ({
|
|
39771
39822
|
reviewId,
|
|
39772
39823
|
data: data2,
|
|
39773
|
-
accessToken
|
|
39824
|
+
accessToken,
|
|
39825
|
+
isUpdate = false
|
|
39774
39826
|
}) => {
|
|
39775
|
-
|
|
39776
|
-
|
|
39827
|
+
const endpoint = isUpdate ? `listing/venue-listing/review/${reviewId}/reply/update` : `listing/venue-listing/review/${reviewId}/reply`;
|
|
39828
|
+
const method4 = isUpdate ? "put" : "post";
|
|
39829
|
+
await instance$1[method4](
|
|
39830
|
+
endpoint,
|
|
39777
39831
|
data2,
|
|
39778
39832
|
formatHeader(accessToken)
|
|
39779
39833
|
);
|
|
39780
|
-
return { data: "created" };
|
|
39834
|
+
return { data: isUpdate ? "updated" : "created" };
|
|
39781
39835
|
};
|
|
39782
39836
|
const formatHeader = (accessToken) => {
|
|
39783
39837
|
return {
|
|
@@ -48600,11 +48654,15 @@ const ReplyForm = ({
|
|
|
48600
48654
|
isMobile: isMobile2 = false,
|
|
48601
48655
|
onSuggestTemplate,
|
|
48602
48656
|
isSuggesting = false,
|
|
48603
|
-
locale: locale2
|
|
48657
|
+
locale: locale2,
|
|
48658
|
+
platform: platform2,
|
|
48659
|
+
reply: reply2
|
|
48604
48660
|
}) => {
|
|
48605
48661
|
const {
|
|
48606
48662
|
t: t2
|
|
48607
48663
|
} = useTranslation();
|
|
48664
|
+
const canUpdate = platform2 === "facebook" || platform2 === "google";
|
|
48665
|
+
const isUpdate = reply2 && canUpdate;
|
|
48608
48666
|
const initialValues = {
|
|
48609
48667
|
comment: ""
|
|
48610
48668
|
};
|
|
@@ -48639,10 +48697,16 @@ const ReplyForm = ({
|
|
|
48639
48697
|
if (!result) return;
|
|
48640
48698
|
await execute({
|
|
48641
48699
|
reviewId,
|
|
48642
|
-
data: data2
|
|
48700
|
+
data: data2,
|
|
48701
|
+
isUpdate
|
|
48643
48702
|
});
|
|
48644
48703
|
onSucess();
|
|
48645
48704
|
};
|
|
48705
|
+
useEffect(() => {
|
|
48706
|
+
if (reply2) {
|
|
48707
|
+
setValue("comment", reply2 == null ? void 0 : reply2.comment);
|
|
48708
|
+
}
|
|
48709
|
+
}, [reply2]);
|
|
48646
48710
|
return /* @__PURE__ */ jsx$1("form", {
|
|
48647
48711
|
onSubmit: handleSubmit(handleExecute),
|
|
48648
48712
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -48711,7 +48775,7 @@ const ReplyForm = ({
|
|
|
48711
48775
|
isLoading: isExecuting || isSuggesting,
|
|
48712
48776
|
size: "small",
|
|
48713
48777
|
mode: "secondary",
|
|
48714
|
-
children: t2("POSTREPLY")
|
|
48778
|
+
children: isUpdate ? t2("UPDATEREPLY") : t2("POSTREPLY")
|
|
48715
48779
|
})]
|
|
48716
48780
|
})]
|
|
48717
48781
|
})]
|
|
@@ -48837,6 +48901,9 @@ const styles$1V = {
|
|
|
48837
48901
|
platform: platform$1,
|
|
48838
48902
|
"container--reply": "_container--reply_ypeoh_55"
|
|
48839
48903
|
};
|
|
48904
|
+
const ContextLang = React__default.createContext([
|
|
48905
|
+
"en"
|
|
48906
|
+
]);
|
|
48840
48907
|
const Comment = ({
|
|
48841
48908
|
children,
|
|
48842
48909
|
showTranslation,
|
|
@@ -48846,6 +48913,7 @@ const Comment = ({
|
|
|
48846
48913
|
const {
|
|
48847
48914
|
t: t2
|
|
48848
48915
|
} = useTranslation();
|
|
48916
|
+
const [lang2] = useContext(ContextLang);
|
|
48849
48917
|
return /* @__PURE__ */ jsxs("div", {
|
|
48850
48918
|
children: [/* @__PURE__ */ jsx$1(Label$2, {
|
|
48851
48919
|
htmlFor: "",
|
|
@@ -48854,11 +48922,11 @@ const Comment = ({
|
|
|
48854
48922
|
}), /* @__PURE__ */ jsx$1("p", {
|
|
48855
48923
|
className: styles$27.comment,
|
|
48856
48924
|
children
|
|
48857
|
-
}), !showTranslation && locale2 !==
|
|
48925
|
+
}), !showTranslation && locale2 !== lang2 && /* @__PURE__ */ jsx$1("span", {
|
|
48858
48926
|
className: styles$27.translate,
|
|
48859
48927
|
onClick: () => setShowTranslation(true),
|
|
48860
48928
|
children: t2("SHOWTRANSLATION")
|
|
48861
|
-
}), showTranslation && locale2 !==
|
|
48929
|
+
}), showTranslation && locale2 !== lang2 && /* @__PURE__ */ jsx$1("span", {
|
|
48862
48930
|
className: styles$27.translate,
|
|
48863
48931
|
onClick: () => setShowTranslation(false),
|
|
48864
48932
|
children: t2("HIDETRANSLATION")
|
|
@@ -48902,13 +48970,14 @@ const CommentTranslation = ({
|
|
|
48902
48970
|
const {
|
|
48903
48971
|
t: t2
|
|
48904
48972
|
} = useTranslation();
|
|
48973
|
+
const [lang2] = useContext(ContextLang);
|
|
48905
48974
|
const {
|
|
48906
48975
|
data: data2,
|
|
48907
48976
|
isLoading
|
|
48908
48977
|
} = useFetch(GetReviewTranslation, {
|
|
48909
48978
|
cacheId: `review-translation-${commentId}`,
|
|
48910
48979
|
id: commentId,
|
|
48911
|
-
locale:
|
|
48980
|
+
locale: lang2
|
|
48912
48981
|
});
|
|
48913
48982
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
48914
48983
|
children: [isLoading && /* @__PURE__ */ jsxs("span", {
|
|
@@ -54720,7 +54789,7 @@ const DetailMobile = ({
|
|
|
54720
54789
|
})]
|
|
54721
54790
|
}), platform2 !== "tripadvisor" ? /* @__PURE__ */ jsx$1("div", {
|
|
54722
54791
|
className: styles$1V["container--reply"],
|
|
54723
|
-
children: reply2 ? /* @__PURE__ */ jsx$1(Reply, {
|
|
54792
|
+
children: reply2 && platform2 !== "facebook" && platform2 !== "google" ? /* @__PURE__ */ jsx$1(Reply, {
|
|
54724
54793
|
reply: reply2
|
|
54725
54794
|
}) : /* @__PURE__ */ jsx$1(ReplyForm, {
|
|
54726
54795
|
reviewId: id2,
|
|
@@ -54729,7 +54798,10 @@ const DetailMobile = ({
|
|
|
54729
54798
|
onSucess: onReload,
|
|
54730
54799
|
isMobile: true,
|
|
54731
54800
|
isSuggesting,
|
|
54732
|
-
locale: locale2
|
|
54801
|
+
locale: locale2,
|
|
54802
|
+
hasReply: false,
|
|
54803
|
+
platform: platform2,
|
|
54804
|
+
reply: reply2
|
|
54733
54805
|
})
|
|
54734
54806
|
}) : /* @__PURE__ */ jsx$1("div", {
|
|
54735
54807
|
className: styles$1V["container--reply"],
|
|
@@ -54740,7 +54812,7 @@ const DetailMobile = ({
|
|
|
54740
54812
|
open: showTemplates,
|
|
54741
54813
|
rating,
|
|
54742
54814
|
onClose: closeModal
|
|
54743
|
-
}),
|
|
54815
|
+
}), platform2 !== "tripadvisor" ? /* @__PURE__ */ jsxs(Fragment, {
|
|
54744
54816
|
children: [/* @__PURE__ */ jsx$1(Button$1, {
|
|
54745
54817
|
isLoading: isSuggesting,
|
|
54746
54818
|
onClick: () => onSuggestTemplate(),
|
|
@@ -54891,7 +54963,7 @@ const DetailDesktop = ({
|
|
|
54891
54963
|
})]
|
|
54892
54964
|
}), platform2 !== "tripadvisor" ? /* @__PURE__ */ jsx$1("div", {
|
|
54893
54965
|
className: styles$1J.reply,
|
|
54894
|
-
children: reply2 ? /* @__PURE__ */ jsx$1(Reply, {
|
|
54966
|
+
children: reply2 && platform2 !== "facebook" && platform2 !== "google" ? /* @__PURE__ */ jsx$1(Reply, {
|
|
54895
54967
|
reply: reply2
|
|
54896
54968
|
}) : /* @__PURE__ */ jsx$1(ReplyForm, {
|
|
54897
54969
|
reviewId: id2,
|
|
@@ -54901,7 +54973,9 @@ const DetailDesktop = ({
|
|
|
54901
54973
|
setShowTemplates: setShowTemplate,
|
|
54902
54974
|
onSuggestTemplate,
|
|
54903
54975
|
isSuggesting,
|
|
54904
|
-
locale: locale2
|
|
54976
|
+
locale: locale2,
|
|
54977
|
+
platform: platform2,
|
|
54978
|
+
reply: reply2
|
|
54905
54979
|
})
|
|
54906
54980
|
}) : /* @__PURE__ */ jsx$1("div", {
|
|
54907
54981
|
className: styles$1J.reply,
|
|
@@ -55252,14 +55326,23 @@ const Reviews = ({
|
|
|
55252
55326
|
isEmpty,
|
|
55253
55327
|
onReload,
|
|
55254
55328
|
multiVenue,
|
|
55255
|
-
setShowTemplate
|
|
55329
|
+
setShowTemplate,
|
|
55330
|
+
selectedReviewId
|
|
55256
55331
|
}) => {
|
|
55257
55332
|
const {
|
|
55258
55333
|
t: t2
|
|
55259
55334
|
} = useTranslation();
|
|
55260
55335
|
const [, setReview] = useContext(ContextReview);
|
|
55261
55336
|
const [, setTemplate] = useContext(ContextTemplate);
|
|
55262
|
-
const [reviewSelected, setReviewSelected] = useState();
|
|
55337
|
+
const [reviewSelected, setReviewSelected] = useState(selectedReviewId || "");
|
|
55338
|
+
useEffect(() => {
|
|
55339
|
+
if (selectedReviewId && reviews.length > 0) {
|
|
55340
|
+
const selected = reviews.find((review) => review.id === selectedReviewId);
|
|
55341
|
+
if (selected) {
|
|
55342
|
+
setReview(selected);
|
|
55343
|
+
}
|
|
55344
|
+
}
|
|
55345
|
+
}, [selectedReviewId, reviews, setReview]);
|
|
55263
55346
|
const handleToggleForm = (id2) => () => {
|
|
55264
55347
|
setTemplate("change");
|
|
55265
55348
|
setReviewSelected((current) => {
|
|
@@ -60940,7 +61023,7 @@ const customStyles = {
|
|
|
60940
61023
|
borderRadius: 0,
|
|
60941
61024
|
boxShadow: state.isFocused ? "0 0 5px var(--moz-input-border)" : "none",
|
|
60942
61025
|
color: "var(--moz-text-input)",
|
|
60943
|
-
padding: "
|
|
61026
|
+
padding: "4px 0px 4px 0px"
|
|
60944
61027
|
}),
|
|
60945
61028
|
singleValue: (provided) => ({
|
|
60946
61029
|
...provided,
|
|
@@ -61230,7 +61313,8 @@ const formatData$j = (data2) => {
|
|
|
61230
61313
|
const SelectVenueListing$1 = ({
|
|
61231
61314
|
onChange: onChange2,
|
|
61232
61315
|
multiVenue,
|
|
61233
|
-
showLabel = true
|
|
61316
|
+
showLabel = true,
|
|
61317
|
+
selectedValue
|
|
61234
61318
|
}) => {
|
|
61235
61319
|
const {
|
|
61236
61320
|
t: t2
|
|
@@ -61248,13 +61332,14 @@ const SelectVenueListing$1 = ({
|
|
|
61248
61332
|
id: "",
|
|
61249
61333
|
label: t2("ALL")
|
|
61250
61334
|
}, ...(data2 == null ? void 0 : data2.data) || []];
|
|
61335
|
+
const selectedOption = selectedValue ? options2.find((option) => option.id === selectedValue) || options2[0] : options2[0];
|
|
61251
61336
|
return /* @__PURE__ */ jsx$1(Select, {
|
|
61252
61337
|
label: showLabel ? t2("SELECTVENUE") : void 0,
|
|
61253
61338
|
options: options2,
|
|
61254
61339
|
isLoading,
|
|
61255
61340
|
getOptionValue: (item2) => item2.id,
|
|
61256
61341
|
onChange: onChange2,
|
|
61257
|
-
|
|
61342
|
+
value: selectedOption
|
|
61258
61343
|
});
|
|
61259
61344
|
};
|
|
61260
61345
|
const countries$1 = [
|
|
@@ -86034,7 +86119,8 @@ const Header$3 = ({
|
|
|
86034
86119
|
lg: 4,
|
|
86035
86120
|
children: /* @__PURE__ */ jsx$1(SelectVenueListing$1, {
|
|
86036
86121
|
multiVenue,
|
|
86037
|
-
onChange: handleChangeVenueListing
|
|
86122
|
+
onChange: handleChangeVenueListing,
|
|
86123
|
+
selectedValue: filters2.venueListing
|
|
86038
86124
|
})
|
|
86039
86125
|
})]
|
|
86040
86126
|
})
|
|
@@ -86120,7 +86206,9 @@ const Error$1 = ({
|
|
|
86120
86206
|
};
|
|
86121
86207
|
const ReviewsPage = ({
|
|
86122
86208
|
venueId,
|
|
86123
|
-
roles
|
|
86209
|
+
roles,
|
|
86210
|
+
lang: lang2,
|
|
86211
|
+
filters: filtersProps
|
|
86124
86212
|
}) => {
|
|
86125
86213
|
const {
|
|
86126
86214
|
t: t2
|
|
@@ -86128,14 +86216,29 @@ const ReviewsPage = ({
|
|
|
86128
86216
|
const [context, setContext] = useState("");
|
|
86129
86217
|
const [review, setReview] = useState();
|
|
86130
86218
|
const [showReplyTemplates, setShowReplyTemplates] = useState(false);
|
|
86131
|
-
const [filter2, setFilters] = useState({
|
|
86132
|
-
|
|
86133
|
-
|
|
86134
|
-
|
|
86135
|
-
|
|
86136
|
-
|
|
86137
|
-
|
|
86138
|
-
|
|
86219
|
+
const [filter2, setFilters] = useState(() => {
|
|
86220
|
+
if (filtersProps) {
|
|
86221
|
+
return {
|
|
86222
|
+
range: {
|
|
86223
|
+
from: filtersProps.from || subtractDate(void 0, 7, "day"),
|
|
86224
|
+
till: filtersProps.till || subtractDate(void 0, 0, "day")
|
|
86225
|
+
},
|
|
86226
|
+
module: filtersProps.module,
|
|
86227
|
+
rating: filtersProps.rating || "",
|
|
86228
|
+
reply: filtersProps.reply || "",
|
|
86229
|
+
venueListing: filtersProps.venueListing || "",
|
|
86230
|
+
reviewId: filtersProps.reviewId || ""
|
|
86231
|
+
};
|
|
86232
|
+
}
|
|
86233
|
+
return {
|
|
86234
|
+
range: {
|
|
86235
|
+
from: subtractDate(void 0, 7, "day"),
|
|
86236
|
+
till: subtractDate(void 0, 0, "day")
|
|
86237
|
+
},
|
|
86238
|
+
module: void 0,
|
|
86239
|
+
rating: "",
|
|
86240
|
+
reply: ""
|
|
86241
|
+
};
|
|
86139
86242
|
});
|
|
86140
86243
|
const {
|
|
86141
86244
|
data: data2
|
|
@@ -86154,7 +86257,13 @@ const ReviewsPage = ({
|
|
|
86154
86257
|
isLoadingMore
|
|
86155
86258
|
} = useInfinite(GetReviews, {
|
|
86156
86259
|
cacheId: `reviews`,
|
|
86157
|
-
params:
|
|
86260
|
+
params: (() => {
|
|
86261
|
+
const {
|
|
86262
|
+
reviewId,
|
|
86263
|
+
...apiParams
|
|
86264
|
+
} = filter2;
|
|
86265
|
+
return apiParams;
|
|
86266
|
+
})()
|
|
86158
86267
|
});
|
|
86159
86268
|
if (error3) {
|
|
86160
86269
|
return /* @__PURE__ */ jsx$1(Error$1, {
|
|
@@ -86175,30 +86284,34 @@ const ReviewsPage = ({
|
|
|
86175
86284
|
value: [context, setContext],
|
|
86176
86285
|
children: /* @__PURE__ */ jsx$1(ContextReview.Provider, {
|
|
86177
86286
|
value: [review, setReview],
|
|
86178
|
-
children: /* @__PURE__ */
|
|
86179
|
-
|
|
86180
|
-
|
|
86181
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
86182
|
-
|
|
86183
|
-
|
|
86184
|
-
|
|
86185
|
-
|
|
86186
|
-
|
|
86187
|
-
|
|
86188
|
-
|
|
86189
|
-
|
|
86190
|
-
|
|
86191
|
-
|
|
86192
|
-
|
|
86193
|
-
|
|
86194
|
-
|
|
86195
|
-
|
|
86287
|
+
children: /* @__PURE__ */ jsx$1(ContextLang.Provider, {
|
|
86288
|
+
value: [lang2],
|
|
86289
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
86290
|
+
children: [isLoadingInitialData && /* @__PURE__ */ jsx$1(SkeletonPage, {}), !isLoadingInitialData && /* @__PURE__ */ jsxs("div", {
|
|
86291
|
+
className: styles$1u.grid,
|
|
86292
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
86293
|
+
children: [/* @__PURE__ */ jsx$1(Reviews, {
|
|
86294
|
+
reviews: issues,
|
|
86295
|
+
isEmpty,
|
|
86296
|
+
onReload: reload,
|
|
86297
|
+
multiVenue,
|
|
86298
|
+
setShowTemplate: setShowReplyTemplates,
|
|
86299
|
+
selectedReviewId: filter2.reviewId
|
|
86300
|
+
}), !isReachingEnd && /* @__PURE__ */ jsx$1("div", {
|
|
86301
|
+
className: styles$1u.footer,
|
|
86302
|
+
children: /* @__PURE__ */ jsx$1(Button$1, {
|
|
86303
|
+
type: "button",
|
|
86304
|
+
onClick: loadMore,
|
|
86305
|
+
isLoading: isLoadingMore,
|
|
86306
|
+
children: t2("LOADMOREREVIEWS")
|
|
86307
|
+
})
|
|
86308
|
+
})]
|
|
86309
|
+
}), /* @__PURE__ */ jsx$1(Templates, {
|
|
86310
|
+
open: showReplyTemplates,
|
|
86311
|
+
onClose: () => setShowReplyTemplates(false)
|
|
86196
86312
|
})]
|
|
86197
|
-
}), /* @__PURE__ */ jsx$1(Templates, {
|
|
86198
|
-
open: showReplyTemplates,
|
|
86199
|
-
onClose: () => setShowReplyTemplates(false)
|
|
86200
86313
|
})]
|
|
86201
|
-
})
|
|
86314
|
+
})
|
|
86202
86315
|
})
|
|
86203
86316
|
})
|
|
86204
86317
|
})
|
|
@@ -91734,6 +91847,23 @@ const EmailForm = ({
|
|
|
91734
91847
|
})
|
|
91735
91848
|
});
|
|
91736
91849
|
};
|
|
91850
|
+
const GetUser = async () => {
|
|
91851
|
+
const user = await instance$1.get("user-me");
|
|
91852
|
+
sessionStorage.setItem("sdk_user", JSON.stringify(user));
|
|
91853
|
+
return { data: user };
|
|
91854
|
+
};
|
|
91855
|
+
const UpdateUserSettings = async ({
|
|
91856
|
+
data: data2
|
|
91857
|
+
}) => {
|
|
91858
|
+
await instance$1.put(`listing/user-settings`, formatData$g(data2));
|
|
91859
|
+
return { data: data2 };
|
|
91860
|
+
};
|
|
91861
|
+
const formatData$g = (data2) => {
|
|
91862
|
+
return {
|
|
91863
|
+
aiPrompt: data2.aiPrompt ?? null,
|
|
91864
|
+
autoReplyReviews: data2.autoReplyReviews ? "true" : "false"
|
|
91865
|
+
};
|
|
91866
|
+
};
|
|
91737
91867
|
const Modal2 = ({
|
|
91738
91868
|
open,
|
|
91739
91869
|
children,
|
|
@@ -91832,17 +91962,6 @@ const TextAreaField = React__default.forwardRef((props, ref) => {
|
|
|
91832
91962
|
})]
|
|
91833
91963
|
});
|
|
91834
91964
|
});
|
|
91835
|
-
const UpdateUserSettings = async ({
|
|
91836
|
-
data: data2
|
|
91837
|
-
}) => {
|
|
91838
|
-
await instance$1.put(`listing/user-settings`, formatData$g(data2));
|
|
91839
|
-
return { data: data2 };
|
|
91840
|
-
};
|
|
91841
|
-
const formatData$g = (data2) => {
|
|
91842
|
-
return {
|
|
91843
|
-
aiPrompt: data2.aiPrompt ?? null
|
|
91844
|
-
};
|
|
91845
|
-
};
|
|
91846
91965
|
const AiPromptForm = ({
|
|
91847
91966
|
open,
|
|
91848
91967
|
onCloseForm,
|
|
@@ -91897,10 +92016,145 @@ const AiPromptForm = ({
|
|
|
91897
92016
|
})
|
|
91898
92017
|
});
|
|
91899
92018
|
};
|
|
91900
|
-
const
|
|
91901
|
-
|
|
91902
|
-
|
|
91903
|
-
|
|
92019
|
+
const ConfirmationModal = ({
|
|
92020
|
+
onAccept,
|
|
92021
|
+
isLoading,
|
|
92022
|
+
title: title2,
|
|
92023
|
+
text: text2 = "AREYOUSURE?",
|
|
92024
|
+
icon: icon2,
|
|
92025
|
+
submitButtonText = "ACCEPT",
|
|
92026
|
+
cancelButtonText = "CANCEL",
|
|
92027
|
+
...props
|
|
92028
|
+
}) => {
|
|
92029
|
+
const {
|
|
92030
|
+
t: t2
|
|
92031
|
+
} = useTranslation();
|
|
92032
|
+
return /* @__PURE__ */ jsxs(Modal$1, {
|
|
92033
|
+
...props,
|
|
92034
|
+
title: title2,
|
|
92035
|
+
width: 500,
|
|
92036
|
+
children: [icon2 && /* @__PURE__ */ jsx$1("div", {
|
|
92037
|
+
style: {
|
|
92038
|
+
display: "flex",
|
|
92039
|
+
justifyContent: "center"
|
|
92040
|
+
},
|
|
92041
|
+
children: /* @__PURE__ */ jsx$1(Icon, {
|
|
92042
|
+
icon: icon2,
|
|
92043
|
+
size: "large"
|
|
92044
|
+
})
|
|
92045
|
+
}), /* @__PURE__ */ jsx$1("h3", {
|
|
92046
|
+
style: {
|
|
92047
|
+
marginTop: 0,
|
|
92048
|
+
paddingTop: 20
|
|
92049
|
+
},
|
|
92050
|
+
children: t2(text2)
|
|
92051
|
+
}), /* @__PURE__ */ jsx$1("div", {
|
|
92052
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
92053
|
+
style: {
|
|
92054
|
+
display: "flex",
|
|
92055
|
+
justifyContent: "center",
|
|
92056
|
+
gap: 20,
|
|
92057
|
+
marginTop: 20
|
|
92058
|
+
},
|
|
92059
|
+
children: [/* @__PURE__ */ jsx$1(Button$1, {
|
|
92060
|
+
size: "small",
|
|
92061
|
+
mode: "tertiary",
|
|
92062
|
+
onClick: props.onClose,
|
|
92063
|
+
disabled: isLoading,
|
|
92064
|
+
children: t2(cancelButtonText)
|
|
92065
|
+
}), /* @__PURE__ */ jsx$1(Button$1, {
|
|
92066
|
+
size: "small",
|
|
92067
|
+
type: "submit",
|
|
92068
|
+
onClick: () => onAccept(),
|
|
92069
|
+
isLoading,
|
|
92070
|
+
children: t2(submitButtonText)
|
|
92071
|
+
})]
|
|
92072
|
+
})
|
|
92073
|
+
})]
|
|
92074
|
+
});
|
|
92075
|
+
};
|
|
92076
|
+
const AiPromptCard = ({
|
|
92077
|
+
reload
|
|
92078
|
+
}) => {
|
|
92079
|
+
var _a2, _b, _c, _d, _e2, _f, _g, _h;
|
|
92080
|
+
const {
|
|
92081
|
+
t: t2
|
|
92082
|
+
} = useTranslation();
|
|
92083
|
+
const [showAiPromptModal, setShowAiPromptModal] = useState(false);
|
|
92084
|
+
const [showAutoReplyModal, setShowAutoReplyModal] = useState(false);
|
|
92085
|
+
const closeAiPromptModal = () => setShowAiPromptModal(false);
|
|
92086
|
+
const openAiPromptModal = () => setShowAiPromptModal(true);
|
|
92087
|
+
const closeAutoReplyModal = () => setShowAutoReplyModal(false);
|
|
92088
|
+
const openAutoReplyModal = () => setShowAutoReplyModal(true);
|
|
92089
|
+
const {
|
|
92090
|
+
data: userData2,
|
|
92091
|
+
reload: reloadUserData
|
|
92092
|
+
} = useFetch(GetUser, {
|
|
92093
|
+
cacheId: `user-data`
|
|
92094
|
+
});
|
|
92095
|
+
const showAiPrompt = (_b = (_a2 = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _a2.roles) == null ? void 0 : _b.some((role) => role === "ROLE_COMPANY_SUPER_ADMIN" || role === "ROLE_COMPANY_SUPER_ADMIN_BOT");
|
|
92096
|
+
useService(UpdateUserSettings, {
|
|
92097
|
+
onSuccess: async () => {
|
|
92098
|
+
var _a3, _b2;
|
|
92099
|
+
await reloadUserData();
|
|
92100
|
+
if (((_b2 = (_a3 = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _a3.company) == null ? void 0 : _b2.autoReplyReviews) === true) {
|
|
92101
|
+
openAutoReplyModal();
|
|
92102
|
+
}
|
|
92103
|
+
}
|
|
92104
|
+
});
|
|
92105
|
+
if (!showAiPrompt) {
|
|
92106
|
+
return null;
|
|
92107
|
+
}
|
|
92108
|
+
const initialValues = {
|
|
92109
|
+
autoReplyReviews: ((_d = (_c = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _c.company) == null ? void 0 : _d.autoReplyReviews) || false,
|
|
92110
|
+
aiPrompt: ((_f = (_e2 = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _e2.company) == null ? void 0 : _f.aiPrompt) || ""
|
|
92111
|
+
};
|
|
92112
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
92113
|
+
children: [/* @__PURE__ */ jsx$1(Formik, {
|
|
92114
|
+
initialValues,
|
|
92115
|
+
onSubmit: () => {
|
|
92116
|
+
},
|
|
92117
|
+
enableReinitialize: true,
|
|
92118
|
+
children: ({
|
|
92119
|
+
values
|
|
92120
|
+
}) => {
|
|
92121
|
+
var _a3;
|
|
92122
|
+
return /* @__PURE__ */ jsxs(Card$1, {
|
|
92123
|
+
header: {
|
|
92124
|
+
title: t2("AIPROMPT"),
|
|
92125
|
+
icon: "edit",
|
|
92126
|
+
onClickIcon: openAiPromptModal
|
|
92127
|
+
},
|
|
92128
|
+
children: [/* @__PURE__ */ jsx$1("p", {
|
|
92129
|
+
children: t2("Ai prompt for generate reviews.")
|
|
92130
|
+
}), /* @__PURE__ */ jsx$1("br", {}), /* @__PURE__ */ jsxs("div", {
|
|
92131
|
+
className: styles$1l.item,
|
|
92132
|
+
children: [/* @__PURE__ */ jsx$1("div", {
|
|
92133
|
+
children: /* @__PURE__ */ jsx$1(Icon, {
|
|
92134
|
+
icon: "robot"
|
|
92135
|
+
})
|
|
92136
|
+
}), ((_a3 = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _a3.company.aiPrompt) || t2("NOTDEFINED")]
|
|
92137
|
+
})]
|
|
92138
|
+
});
|
|
92139
|
+
}
|
|
92140
|
+
}), /* @__PURE__ */ jsx$1(AiPromptForm, {
|
|
92141
|
+
open: showAiPromptModal,
|
|
92142
|
+
onCloseForm: closeAiPromptModal,
|
|
92143
|
+
initialValues: {
|
|
92144
|
+
aiPrompt: ((_h = (_g = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _g.company) == null ? void 0 : _h.aiPrompt) ?? ""
|
|
92145
|
+
},
|
|
92146
|
+
reload: reloadUserData
|
|
92147
|
+
}), /* @__PURE__ */ jsx$1(ConfirmationModal, {
|
|
92148
|
+
open: showAutoReplyModal,
|
|
92149
|
+
onClose: closeAutoReplyModal,
|
|
92150
|
+
onAccept: closeAutoReplyModal,
|
|
92151
|
+
title: t2("AUTOREPLYACTIVATED"),
|
|
92152
|
+
text: "AUTOREPLYDESCRIPTION",
|
|
92153
|
+
icon: "robot",
|
|
92154
|
+
submitButtonText: "UNDERSTOOD",
|
|
92155
|
+
cancelButtonText: "CLOSE"
|
|
92156
|
+
})]
|
|
92157
|
+
});
|
|
91904
92158
|
};
|
|
91905
92159
|
const styles$1c = {
|
|
91906
92160
|
"ui-list": "_ui-list_4zr5h_1",
|
|
@@ -91921,16 +92175,12 @@ const Notifications = ({
|
|
|
91921
92175
|
venueId,
|
|
91922
92176
|
venueListingId
|
|
91923
92177
|
}) => {
|
|
91924
|
-
var _a2, _b, _c, _d;
|
|
91925
92178
|
const {
|
|
91926
92179
|
t: t2
|
|
91927
92180
|
} = useTranslation();
|
|
91928
92181
|
const [showModal, setShowmodal] = useState(false);
|
|
91929
92182
|
const closeModal = () => setShowmodal(false);
|
|
91930
92183
|
const openModal = () => setShowmodal(true);
|
|
91931
|
-
const [showAiPromptModal, setShowAiPromptModal] = useState(false);
|
|
91932
|
-
const closeAiPromptModal = () => setShowAiPromptModal(false);
|
|
91933
|
-
const openAiPromptModal = () => setShowAiPromptModal(true);
|
|
91934
92184
|
const {
|
|
91935
92185
|
data: data2,
|
|
91936
92186
|
isLoading,
|
|
@@ -91939,13 +92189,6 @@ const Notifications = ({
|
|
|
91939
92189
|
} = useFetch(GetUserNotificationSettings, {
|
|
91940
92190
|
cacheId: `user-notifications-settings`
|
|
91941
92191
|
});
|
|
91942
|
-
const {
|
|
91943
|
-
data: userData2,
|
|
91944
|
-
reload: reloadUserData
|
|
91945
|
-
} = useFetch(GetUser, {
|
|
91946
|
-
cacheId: `user-data`
|
|
91947
|
-
});
|
|
91948
|
-
const showAiPrompt = (_b = (_a2 = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _a2.roles) == null ? void 0 : _b.some((role) => role === "ROLE_COMPANY_SUPER_ADMIN" || role === "ROLE_COMPANY_SUPER_ADMIN_BOT");
|
|
91949
92192
|
const _reload = () => {
|
|
91950
92193
|
reload();
|
|
91951
92194
|
};
|
|
@@ -91984,101 +92227,77 @@ const Notifications = ({
|
|
|
91984
92227
|
enableReinitialize: true,
|
|
91985
92228
|
children: ({
|
|
91986
92229
|
handleSubmit: handleSubmit2
|
|
91987
|
-
}) => {
|
|
91988
|
-
|
|
91989
|
-
|
|
91990
|
-
|
|
91991
|
-
|
|
91992
|
-
|
|
91993
|
-
|
|
91994
|
-
|
|
91995
|
-
|
|
91996
|
-
|
|
91997
|
-
|
|
91998
|
-
|
|
91999
|
-
|
|
92000
|
-
|
|
92001
|
-
|
|
92002
|
-
|
|
92003
|
-
|
|
92004
|
-
|
|
92005
|
-
|
|
92006
|
-
|
|
92007
|
-
|
|
92008
|
-
|
|
92009
|
-
name: t2("MONTHLYREPORT"),
|
|
92010
|
-
onChange: () => setTimeout(handleSubmit2, 100)
|
|
92011
|
-
})]
|
|
92230
|
+
}) => /* @__PURE__ */ jsxs("div", {
|
|
92231
|
+
className: styles$1l.container,
|
|
92232
|
+
children: [/* @__PURE__ */ jsxs(Card$1, {
|
|
92233
|
+
header: {
|
|
92234
|
+
title: t2("REVIEWSREPORT")
|
|
92235
|
+
},
|
|
92236
|
+
children: [/* @__PURE__ */ jsx$1("p", {
|
|
92237
|
+
children: t2("Get a daily report by email to help you keep track of all your activity.")
|
|
92238
|
+
}), /* @__PURE__ */ jsxs(UIList$1, {
|
|
92239
|
+
mode: "vertical",
|
|
92240
|
+
children: [/* @__PURE__ */ jsx$1(Item$1, {
|
|
92241
|
+
id: "dailyReport",
|
|
92242
|
+
name: t2("DAILYREPORT"),
|
|
92243
|
+
onChange: () => setTimeout(handleSubmit2, 100)
|
|
92244
|
+
}), /* @__PURE__ */ jsx$1(Item$1, {
|
|
92245
|
+
id: "weeklyReport",
|
|
92246
|
+
name: t2("WEEKLYREPORT"),
|
|
92247
|
+
onChange: () => setTimeout(handleSubmit2, 100)
|
|
92248
|
+
}), /* @__PURE__ */ jsx$1(Item$1, {
|
|
92249
|
+
id: "monthlyReport",
|
|
92250
|
+
name: t2("MONTHLYREPORT"),
|
|
92251
|
+
onChange: () => setTimeout(handleSubmit2, 100)
|
|
92012
92252
|
})]
|
|
92013
|
-
})
|
|
92014
|
-
|
|
92015
|
-
|
|
92016
|
-
|
|
92017
|
-
|
|
92018
|
-
|
|
92019
|
-
|
|
92020
|
-
|
|
92021
|
-
|
|
92022
|
-
|
|
92023
|
-
|
|
92024
|
-
|
|
92025
|
-
|
|
92026
|
-
|
|
92027
|
-
|
|
92028
|
-
|
|
92029
|
-
|
|
92253
|
+
})]
|
|
92254
|
+
}), /* @__PURE__ */ jsxs(Card$1, {
|
|
92255
|
+
header: {
|
|
92256
|
+
title: t2("REVIEWS")
|
|
92257
|
+
},
|
|
92258
|
+
children: [/* @__PURE__ */ jsx$1("p", {
|
|
92259
|
+
children: t2("Get an instant email when you receive a negative review so that you can initiate an immediate response to your customer.")
|
|
92260
|
+
}), /* @__PURE__ */ jsxs(UIList$1, {
|
|
92261
|
+
mode: "vertical",
|
|
92262
|
+
children: [/* @__PURE__ */ jsx$1(Item$1, {
|
|
92263
|
+
id: "allReviewAlert",
|
|
92264
|
+
name: t2("ALLREVIEWS"),
|
|
92265
|
+
onChange: () => setTimeout(handleSubmit2, 100)
|
|
92266
|
+
}), /* @__PURE__ */ jsx$1(Item$1, {
|
|
92267
|
+
id: "negativeReviewAlert",
|
|
92268
|
+
name: t2("NEGATIVEREVIEWS1"),
|
|
92269
|
+
onChange: () => setTimeout(handleSubmit2, 100)
|
|
92030
92270
|
})]
|
|
92031
|
-
})
|
|
92032
|
-
|
|
92033
|
-
|
|
92034
|
-
|
|
92035
|
-
|
|
92036
|
-
|
|
92037
|
-
|
|
92038
|
-
|
|
92039
|
-
|
|
92040
|
-
|
|
92041
|
-
|
|
92042
|
-
children: [/* @__PURE__ */ jsx$1("div", {
|
|
92043
|
-
children: /* @__PURE__ */ jsx$1(Icon, {
|
|
92044
|
-
icon: "mail"
|
|
92045
|
-
})
|
|
92046
|
-
}), email3 || t2("NOTDEFINED")]
|
|
92047
|
-
}, index2);
|
|
92048
|
-
}), !(data2 == null ? void 0 : data2.emails) && /* @__PURE__ */ jsxs("div", {
|
|
92271
|
+
})]
|
|
92272
|
+
}), /* @__PURE__ */ jsxs(Card$1, {
|
|
92273
|
+
header: {
|
|
92274
|
+
title: t2("Email"),
|
|
92275
|
+
icon: "edit",
|
|
92276
|
+
onClickIcon: openModal
|
|
92277
|
+
},
|
|
92278
|
+
children: [/* @__PURE__ */ jsx$1("p", {
|
|
92279
|
+
children: t2("Get all the notifications on these emails.")
|
|
92280
|
+
}), /* @__PURE__ */ jsx$1("br", {}), data2 == null ? void 0 : data2.emails.map((email3, index2) => {
|
|
92281
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
92049
92282
|
className: styles$1l.item,
|
|
92050
92283
|
children: [/* @__PURE__ */ jsx$1("div", {
|
|
92051
92284
|
children: /* @__PURE__ */ jsx$1(Icon, {
|
|
92052
92285
|
icon: "mail"
|
|
92053
92286
|
})
|
|
92054
|
-
}), t2("NOTDEFINED")]
|
|
92055
|
-
})
|
|
92056
|
-
}), (
|
|
92057
|
-
|
|
92058
|
-
|
|
92059
|
-
|
|
92060
|
-
|
|
92061
|
-
|
|
92062
|
-
|
|
92063
|
-
children: t2("Ai prompt for generate reviews.")
|
|
92064
|
-
}), /* @__PURE__ */ jsx$1("br", {}), /* @__PURE__ */ jsxs("div", {
|
|
92065
|
-
className: styles$1l.item,
|
|
92066
|
-
children: [/* @__PURE__ */ jsx$1("div", {
|
|
92067
|
-
children: /* @__PURE__ */ jsx$1(Icon, {
|
|
92068
|
-
icon: "robot"
|
|
92069
|
-
})
|
|
92070
|
-
}), ((_b2 = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _b2.company.aiPrompt) || t2("NOTDEFINED")]
|
|
92071
|
-
})]
|
|
92287
|
+
}), email3 || t2("NOTDEFINED")]
|
|
92288
|
+
}, index2);
|
|
92289
|
+
}), !(data2 == null ? void 0 : data2.emails) && /* @__PURE__ */ jsxs("div", {
|
|
92290
|
+
className: styles$1l.item,
|
|
92291
|
+
children: [/* @__PURE__ */ jsx$1("div", {
|
|
92292
|
+
children: /* @__PURE__ */ jsx$1(Icon, {
|
|
92293
|
+
icon: "mail"
|
|
92294
|
+
})
|
|
92295
|
+
}), t2("NOTDEFINED")]
|
|
92072
92296
|
})]
|
|
92073
|
-
})
|
|
92074
|
-
|
|
92075
|
-
|
|
92076
|
-
|
|
92077
|
-
onCloseForm: closeAiPromptModal,
|
|
92078
|
-
initialValues: {
|
|
92079
|
-
aiPrompt: ((_d = (_c = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _c.company) == null ? void 0 : _d.aiPrompt) ?? ""
|
|
92080
|
-
},
|
|
92081
|
-
reload: reloadUserData
|
|
92297
|
+
}), /* @__PURE__ */ jsx$1(AiPromptCard, {
|
|
92298
|
+
reload: _reload
|
|
92299
|
+
})]
|
|
92300
|
+
})
|
|
92082
92301
|
}), /* @__PURE__ */ jsx$1(EmailForm, {
|
|
92083
92302
|
open: showModal,
|
|
92084
92303
|
onCloseForm: closeModal,
|
|
@@ -147417,63 +147636,6 @@ const ModalTripadvisorConnect = ({
|
|
|
147417
147636
|
})
|
|
147418
147637
|
});
|
|
147419
147638
|
};
|
|
147420
|
-
const ConfirmationModal = ({
|
|
147421
|
-
onAccept,
|
|
147422
|
-
isLoading,
|
|
147423
|
-
title: title2,
|
|
147424
|
-
text: text2 = "AREYOUSURE?",
|
|
147425
|
-
icon: icon2,
|
|
147426
|
-
submitButtonText = "ACCEPT",
|
|
147427
|
-
cancelButtonText = "CANCEL",
|
|
147428
|
-
...props
|
|
147429
|
-
}) => {
|
|
147430
|
-
const {
|
|
147431
|
-
t: t2
|
|
147432
|
-
} = useTranslation();
|
|
147433
|
-
return /* @__PURE__ */ jsxs(Modal$1, {
|
|
147434
|
-
...props,
|
|
147435
|
-
title: title2,
|
|
147436
|
-
width: 500,
|
|
147437
|
-
children: [icon2 && /* @__PURE__ */ jsx$1("div", {
|
|
147438
|
-
style: {
|
|
147439
|
-
display: "flex",
|
|
147440
|
-
justifyContent: "center"
|
|
147441
|
-
},
|
|
147442
|
-
children: /* @__PURE__ */ jsx$1(Icon, {
|
|
147443
|
-
icon: icon2,
|
|
147444
|
-
size: "large"
|
|
147445
|
-
})
|
|
147446
|
-
}), /* @__PURE__ */ jsx$1("h3", {
|
|
147447
|
-
style: {
|
|
147448
|
-
marginTop: 0,
|
|
147449
|
-
paddingTop: 20
|
|
147450
|
-
},
|
|
147451
|
-
children: t2(text2)
|
|
147452
|
-
}), /* @__PURE__ */ jsx$1("div", {
|
|
147453
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
147454
|
-
style: {
|
|
147455
|
-
display: "flex",
|
|
147456
|
-
justifyContent: "center",
|
|
147457
|
-
gap: 20,
|
|
147458
|
-
marginTop: 20
|
|
147459
|
-
},
|
|
147460
|
-
children: [/* @__PURE__ */ jsx$1(Button$1, {
|
|
147461
|
-
size: "small",
|
|
147462
|
-
mode: "tertiary",
|
|
147463
|
-
onClick: props.onClose,
|
|
147464
|
-
disabled: isLoading,
|
|
147465
|
-
children: t2(cancelButtonText)
|
|
147466
|
-
}), /* @__PURE__ */ jsx$1(Button$1, {
|
|
147467
|
-
size: "small",
|
|
147468
|
-
type: "submit",
|
|
147469
|
-
onClick: () => onAccept(),
|
|
147470
|
-
isLoading,
|
|
147471
|
-
children: t2(submitButtonText)
|
|
147472
|
-
})]
|
|
147473
|
-
})
|
|
147474
|
-
})]
|
|
147475
|
-
});
|
|
147476
|
-
};
|
|
147477
147639
|
const VenueListingDetail = ({
|
|
147478
147640
|
venueListingId,
|
|
147479
147641
|
singleVenue: singleVenue2 = false
|
|
@@ -152846,7 +153008,6 @@ const index$7 = ({
|
|
|
152846
153008
|
}
|
|
152847
153009
|
};
|
|
152848
153010
|
useEffect(() => {
|
|
152849
|
-
console.log(data2, "data");
|
|
152850
153011
|
if (data2) {
|
|
152851
153012
|
const tableOptions2 = data2.map((item2) => {
|
|
152852
153013
|
var _a2, _b;
|
|
@@ -152879,7 +153040,6 @@ const index$7 = ({
|
|
|
152879
153040
|
setTimeByDayOptions(filtersData == null ? void 0 : filtersData.hours);
|
|
152880
153041
|
}
|
|
152881
153042
|
if ((filtersData == null ? void 0 : filtersData.tables) && !selectedBooking) {
|
|
152882
|
-
console.log(filtersData.tables, "filtersData.tables");
|
|
152883
153043
|
setTableOptions(filtersData.tables.map((item2) => ({
|
|
152884
153044
|
value: item2.id,
|
|
152885
153045
|
label: item2.label
|