|
|
@@ -343,6 +343,7 @@ import diarinho from "src/assets/diarinho_perfil_cliente_favoritos.svg";
|
|
|
|
|
|
import { avatarColorsWithPurple as avatarColors } from "src/helpers/avatarColors";
|
|
|
|
|
|
+import { Share } from "@capacitor/share";
|
|
|
import { computed, onMounted, ref } from "vue";
|
|
|
|
|
|
import {
|
|
|
@@ -437,18 +438,25 @@ const nextSelectedHours = () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const openIndicateDialog = (item) => {
|
|
|
+const openIndicateDialog = async (item) => {
|
|
|
const message = t("profile.favorites.indicate_whatsapp_message", {
|
|
|
city: item?.city_name ?? "",
|
|
|
name: item?.provider_name ?? "",
|
|
|
});
|
|
|
|
|
|
- console.log("[Indicar diarista - WhatsApp]", message);
|
|
|
+ try {
|
|
|
+ await Share.share({
|
|
|
+ title: t("profile.favorites.indicate_title"),
|
|
|
+ text: message,
|
|
|
+ dialogTitle: t("profile.favorites.indicate_btn"),
|
|
|
+ });
|
|
|
+ } catch (error) {
|
|
|
+ if (error?.name === "AbortError") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- $q.notify({
|
|
|
- message: t("profile.favorites.indicate_coming_soon"),
|
|
|
- type: "info",
|
|
|
- });
|
|
|
+ console.error("Erro ao indicar diarista:", error);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const prevHighlight = () => {
|