Browse Source

Merge branch 'feature/diaria-gus-4leva' of Softpar/sfp_front_vue_diarista_prestador into development

zntt 2 days ago
parent
commit
8459eaf288

+ 2 - 19
package-lock.json

@@ -16,8 +16,8 @@
         "@capacitor/geolocation": "^7.1.8",
         "@capacitor/geolocation": "^7.1.8",
         "@capacitor/google-maps": "^7.2.2",
         "@capacitor/google-maps": "^7.2.2",
         "@capacitor/push-notifications": "^7.0.7",
         "@capacitor/push-notifications": "^7.0.7",
-        "@ionic/pwa-elements": "^3.4.0",
         "@capacitor/share": "^7.0.4",
         "@capacitor/share": "^7.0.4",
+        "@ionic/pwa-elements": "^3.4.0",
         "@quasar/cli": "^2.5.0",
         "@quasar/cli": "^2.5.0",
         "@quasar/extras": "^1.17.0",
         "@quasar/extras": "^1.17.0",
         "axios": "^1.9.0",
         "axios": "^1.9.0",
@@ -443,7 +443,6 @@
       "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-7.6.8.tgz",
       "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-7.6.8.tgz",
       "integrity": "sha512-x1xfxvNcTSnj6OoYaAB0n0a0HRvi5f2YjcVnMLxpMhbHDgGDAzzN9z8cnPCYV+SKTvqGF1hezHm82Op32XaAGg==",
       "integrity": "sha512-x1xfxvNcTSnj6OoYaAB0n0a0HRvi5f2YjcVnMLxpMhbHDgGDAzzN9z8cnPCYV+SKTvqGF1hezHm82Op32XaAGg==",
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "tslib": "^2.1.0"
         "tslib": "^2.1.0"
       }
       }
@@ -2767,7 +2766,6 @@
       "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==",
       "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==",
       "devOptional": true,
       "devOptional": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "@types/body-parser": "*",
         "@types/body-parser": "*",
         "@types/express-serve-static-core": "^4.17.33",
         "@types/express-serve-static-core": "^4.17.33",
@@ -3076,7 +3074,6 @@
       "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==",
       "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "engines": {
       "engines": {
         "node": "^18.0.0 || >=20.0.0"
         "node": "^18.0.0 || >=20.0.0"
       },
       },
@@ -3284,7 +3281,6 @@
       "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
       "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "bin": {
       "bin": {
         "acorn": "bin/acorn"
         "acorn": "bin/acorn"
       },
       },
@@ -3868,7 +3864,6 @@
         }
         }
       ],
       ],
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "caniuse-lite": "^1.0.30001726",
         "caniuse-lite": "^1.0.30001726",
         "electron-to-chromium": "^1.5.173",
         "electron-to-chromium": "^1.5.173",
@@ -4095,7 +4090,6 @@
       "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.5.0.tgz",
       "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.5.0.tgz",
       "integrity": "sha512-aYeC/jDgSEx8SHWZvANYMioYMZ2KX02W6f6uVfyteuCGcadDLcYVHdfdygsTQkQ4TKn5lghoojAsPj5pu0SnvQ==",
       "integrity": "sha512-aYeC/jDgSEx8SHWZvANYMioYMZ2KX02W6f6uVfyteuCGcadDLcYVHdfdygsTQkQ4TKn5lghoojAsPj5pu0SnvQ==",
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "@kurkle/color": "^0.3.0"
         "@kurkle/color": "^0.3.0"
       },
       },
@@ -5138,7 +5132,6 @@
       "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==",
       "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "@eslint-community/eslint-utils": "^4.2.0",
         "@eslint-community/eslint-utils": "^4.2.0",
         "@eslint-community/regexpp": "^4.12.1",
         "@eslint-community/regexpp": "^4.12.1",
@@ -5216,7 +5209,6 @@
       "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==",
       "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "bin": {
       "bin": {
         "eslint-config-prettier": "bin/cli.js"
         "eslint-config-prettier": "bin/cli.js"
       },
       },
@@ -6843,7 +6835,6 @@
       "integrity": "sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==",
       "integrity": "sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "acorn": "^8.5.0",
         "acorn": "^8.5.0",
         "eslint-visitor-keys": "^3.0.0",
         "eslint-visitor-keys": "^3.0.0",
@@ -7853,7 +7844,6 @@
       "resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.3.tgz",
       "resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.3.tgz",
       "integrity": "sha512-ttXO/InUULUXkMHpTdp9Fj4hLpD/2AoJdmAbAeW2yu1iy1k+pkFekQXw5VpC0/5p51IOR/jDaDRfRWRnMMsGOA==",
       "integrity": "sha512-ttXO/InUULUXkMHpTdp9Fj4hLpD/2AoJdmAbAeW2yu1iy1k+pkFekQXw5VpC0/5p51IOR/jDaDRfRWRnMMsGOA==",
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "@vue/devtools-api": "^7.7.2"
         "@vue/devtools-api": "^7.7.2"
       },
       },
@@ -7923,7 +7913,6 @@
         }
         }
       ],
       ],
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "nanoid": "^3.3.11",
         "nanoid": "^3.3.11",
         "picocolors": "^1.1.1",
         "picocolors": "^1.1.1",
@@ -7970,7 +7959,6 @@
       "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
       "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "bin": {
       "bin": {
         "prettier": "bin/prettier.cjs"
         "prettier": "bin/prettier.cjs"
       },
       },
@@ -8111,7 +8099,6 @@
       "resolved": "https://registry.npmjs.org/quasar/-/quasar-2.18.1.tgz",
       "resolved": "https://registry.npmjs.org/quasar/-/quasar-2.18.1.tgz",
       "integrity": "sha512-db/P64Mzpt1uXJ0MapaG+IYJQ9hHDb5KtTCoszwC78DR7sA+Uoj7nBW2EytwYykIExEmqavOvKrdasTvqhkgEg==",
       "integrity": "sha512-db/P64Mzpt1uXJ0MapaG+IYJQ9hHDb5KtTCoszwC78DR7sA+Uoj7nBW2EytwYykIExEmqavOvKrdasTvqhkgEg==",
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "engines": {
       "engines": {
         "node": ">= 10.18.1",
         "node": ">= 10.18.1",
         "npm": ">= 6.13.4",
         "npm": ">= 6.13.4",
@@ -8542,7 +8529,6 @@
       "integrity": "sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==",
       "integrity": "sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "@types/estree": "1.0.8"
         "@types/estree": "1.0.8"
       },
       },
@@ -9968,7 +9954,6 @@
       "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
       "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
       "devOptional": true,
       "devOptional": true,
       "license": "Apache-2.0",
       "license": "Apache-2.0",
-      "peer": true,
       "bin": {
       "bin": {
         "tsc": "bin/tsc",
         "tsc": "bin/tsc",
         "tsserver": "bin/tsserver"
         "tsserver": "bin/tsserver"
@@ -10178,7 +10163,6 @@
       "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
       "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "esbuild": "^0.25.0",
         "esbuild": "^0.25.0",
         "fdir": "^6.4.4",
         "fdir": "^6.4.4",
@@ -10381,7 +10365,6 @@
       "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.17.tgz",
       "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.17.tgz",
       "integrity": "sha512-LbHV3xPN9BeljML+Xctq4lbz2lVHCR6DtbpTf5XIO6gugpXUN49j2QQPcMj086r9+AkJ0FfUT8xjulKKBkkr9g==",
       "integrity": "sha512-LbHV3xPN9BeljML+Xctq4lbz2lVHCR6DtbpTf5XIO6gugpXUN49j2QQPcMj086r9+AkJ0FfUT8xjulKKBkkr9g==",
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "@vue/compiler-dom": "3.5.17",
         "@vue/compiler-dom": "3.5.17",
         "@vue/compiler-sfc": "3.5.17",
         "@vue/compiler-sfc": "3.5.17",
@@ -10448,6 +10431,7 @@
       "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
       "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
       "dev": true,
       "dev": true,
       "license": "Apache-2.0",
       "license": "Apache-2.0",
+      "peer": true,
       "engines": {
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
       },
@@ -10819,7 +10803,6 @@
       "integrity": "sha512-E/+VitOorXSLiAqtTd7Yqax0/pAS3xaYMP+AUUJGOK1OZG3rhcj9fcJOM5HJ2VrP1FrStVCWr1muTfQCdj4tAA==",
       "integrity": "sha512-E/+VitOorXSLiAqtTd7Yqax0/pAS3xaYMP+AUUJGOK1OZG3rhcj9fcJOM5HJ2VrP1FrStVCWr1muTfQCdj4tAA==",
       "dev": true,
       "dev": true,
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "eslint-visitor-keys": "^3.0.0",
         "eslint-visitor-keys": "^3.0.0",
         "yaml": "^2.0.0"
         "yaml": "^2.0.0"

+ 1 - 0
package.json

@@ -30,6 +30,7 @@
     "@capacitor/geolocation": "^7.1.8",
     "@capacitor/geolocation": "^7.1.8",
     "@capacitor/google-maps": "^7.2.2",
     "@capacitor/google-maps": "^7.2.2",
     "@capacitor/push-notifications": "^7.0.7",
     "@capacitor/push-notifications": "^7.0.7",
+    "@capacitor/share": "^7.0.4",
     "@ionic/pwa-elements": "^3.4.0",
     "@ionic/pwa-elements": "^3.4.0",
     "@quasar/cli": "^2.5.0",
     "@quasar/cli": "^2.5.0",
     "@quasar/extras": "^1.17.0",
     "@quasar/extras": "^1.17.0",

+ 0 - 1
src-capacitor/package-lock.json

@@ -99,7 +99,6 @@
       "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-7.6.8.tgz",
       "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-7.6.8.tgz",
       "integrity": "sha512-x1xfxvNcTSnj6OoYaAB0n0a0HRvi5f2YjcVnMLxpMhbHDgGDAzzN9z8cnPCYV+SKTvqGF1hezHm82Op32XaAGg==",
       "integrity": "sha512-x1xfxvNcTSnj6OoYaAB0n0a0HRvi5f2YjcVnMLxpMhbHDgGDAzzN9z8cnPCYV+SKTvqGF1hezHm82Op32XaAGg==",
       "license": "MIT",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
       "dependencies": {
         "tslib": "^2.1.0"
         "tslib": "^2.1.0"
       }
       }

+ 80 - 20
src/components/login/LoginStep4Panel.vue

@@ -8,7 +8,14 @@
           :class="selfieDone ? 'photo-circle--done' : 'photo-circle--pending'"
           :class="selfieDone ? 'photo-circle--done' : 'photo-circle--pending'"
           @click="takeSelfie"
           @click="takeSelfie"
         >
         >
+          <img
+            v-if="selfiePreviewUrl"
+            class="photo-circle__thumb"
+            :src="selfiePreviewUrl"
+          />
+
           <q-icon
           <q-icon
+            v-else
             color="white"
             color="white"
             name="photo_camera"
             name="photo_camera"
             size="52px"
             size="52px"
@@ -56,15 +63,40 @@
       <div class="column items-center q-gutter-y-sm">
       <div class="column items-center q-gutter-y-sm">
         <div
         <div
           :ref="fieldRefs.document_front"
           :ref="fieldRefs.document_front"
-          class="photo-circle"
-          :class="docDone ? 'photo-circle--done' : 'photo-circle--pending'"
+          class="cursor-pointer"
           @click="openDocSubStep"
           @click="openDocSubStep"
         >
         >
-          <q-icon
-            color="white"
-            name="mdi-card-account-details-outline"
-            size="52px"
-          />
+          <div
+            v-if="docDone"
+            class="row items-center justify-center q-gutter-x-sm"
+          >
+            <div class="photo-circle photo-circle--small photo-circle--done">
+              <img
+                v-if="documentFrontPreviewUrl"
+                class="photo-circle__thumb"
+                :src="documentFrontPreviewUrl"
+              />
+            </div>
+
+            <div class="photo-circle photo-circle--small photo-circle--done">
+              <img
+                v-if="documentBackPreviewUrl"
+                class="photo-circle__thumb"
+                :src="documentBackPreviewUrl"
+              />
+            </div>
+          </div>
+
+          <div
+            v-else
+            class="photo-circle photo-circle--pending"
+          >
+            <q-icon
+              color="white"
+              name="mdi-card-account-details-outline"
+              size="52px"
+            />
+          </div>
         </div>
         </div>
 
 
         <div
         <div
@@ -344,7 +376,7 @@ import {
   CameraSource,
   CameraSource,
 } from '@capacitor/camera';
 } from '@capacitor/camera';
 import {
 import {
-  computed, inject, onBeforeUnmount, ref,
+  computed, inject, onBeforeUnmount, ref, watch,
 } from 'vue';
 } from 'vue';
 import { useI18n } from 'vue-i18n';
 import { useI18n } from 'vue-i18n';
 
 
@@ -387,6 +419,10 @@ const loadingDocBack = ref(false);
 const docFrontError = ref(false);
 const docFrontError = ref(false);
 const docBackError = ref(false);
 const docBackError = ref(false);
 
 
+const selfiePreviewUrl = ref(null);
+const documentFrontPreviewUrl = ref(null);
+const documentBackPreviewUrl = ref(null);
+
 const docDone = computed(() => (
 const docDone = computed(() => (
   !!form.value.document_back
   !!form.value.document_back
   && !!form.value.document_front
   && !!form.value.document_front
@@ -399,6 +435,18 @@ const docSubStepDone = computed(() => (
 
 
 const selfieDone = computed(() => !!form.value.selfie);
 const selfieDone = computed(() => !!form.value.selfie);
 
 
+const syncPreviewUrl = (previewRef, file) => {
+  if (previewRef.value) {
+    URL.revokeObjectURL(previewRef.value);
+  }
+
+  previewRef.value = file ? URL.createObjectURL(file) : null;
+};
+
+watch(() => form.value.selfie, (file) => syncPreviewUrl(selfiePreviewUrl, file), { immediate: true });
+watch(() => form.value.document_front, (file) => syncPreviewUrl(documentFrontPreviewUrl, file), { immediate: true });
+watch(() => form.value.document_back, (file) => syncPreviewUrl(documentBackPreviewUrl, file), { immediate: true });
+
 const base64ToFile = (base64, filename, mimeType = 'image/jpeg') => {
 const base64ToFile = (base64, filename, mimeType = 'image/jpeg') => {
   const byteString = atob(base64);
   const byteString = atob(base64);
   const ab = new ArrayBuffer(byteString.length);
   const ab = new ArrayBuffer(byteString.length);
@@ -446,12 +494,8 @@ const setDraftFile = (side, file) => {
   const draftRef = side === 'front' ? docFrontDraft : docBackDraft;
   const draftRef = side === 'front' ? docFrontDraft : docBackDraft;
   const previewRef = side === 'front' ? docFrontPreviewUrl : docBackPreviewUrl;
   const previewRef = side === 'front' ? docFrontPreviewUrl : docBackPreviewUrl;
 
 
-  if (previewRef.value) {
-    URL.revokeObjectURL(previewRef.value);
-  }
-
   draftRef.value = file;
   draftRef.value = file;
-  previewRef.value = file ? URL.createObjectURL(file) : null;
+  syncPreviewUrl(previewRef, file);
 };
 };
 
 
 const captureDocSide = async (side) => {
 const captureDocSide = async (side) => {
@@ -522,13 +566,17 @@ const confirmDocCapture = () => {
 };
 };
 
 
 onBeforeUnmount(() => {
 onBeforeUnmount(() => {
-  if (docFrontPreviewUrl.value) {
-    URL.revokeObjectURL(docFrontPreviewUrl.value);
-  }
-
-  if (docBackPreviewUrl.value) {
-    URL.revokeObjectURL(docBackPreviewUrl.value);
-  }
+  [
+    docFrontPreviewUrl,
+    docBackPreviewUrl,
+    selfiePreviewUrl,
+    documentFrontPreviewUrl,
+    documentBackPreviewUrl,
+  ].forEach((previewRef) => {
+    if (previewRef.value) {
+      URL.revokeObjectURL(previewRef.value);
+    }
+  });
 });
 });
 
 
 const takeSelfie = async () => {
 const takeSelfie = async () => {
@@ -590,6 +638,18 @@ const takeSelfie = async () => {
   &--pending {
   &--pending {
     background-color: rgba(139, 92, 246, 0.18);
     background-color: rgba(139, 92, 246, 0.18);
   }
   }
+
+  &--small {
+    width: 90px;
+    height: 90px;
+  }
+}
+
+.photo-circle__thumb {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  object-fit: cover;
 }
 }
 
 
 .fs-overlay {
 .fs-overlay {

+ 18 - 6
src/components/login/LoginStep5Panel.vue

@@ -122,6 +122,7 @@
 
 
 <script setup>
 <script setup>
 import { computed, inject, onMounted, ref, watch } from "vue";
 import { computed, inject, onMounted, ref, watch } from "vue";
+import { useI18n } from "vue-i18n";
 import { getProviderDailyPriceMin } from "src/api/provider";
 import { getProviderDailyPriceMin } from "src/api/provider";
 import { getPublicServiceTypes } from "src/api/serviceType";
 import { getPublicServiceTypes } from "src/api/serviceType";
 
 
@@ -132,6 +133,8 @@ const form = defineModel({
   type: Object,
   type: Object,
 });
 });
 
 
+const { t } = useI18n();
+
 const serverErrors = inject("serverErrors", ref({}));
 const serverErrors = inject("serverErrors", ref({}));
 const clearServerError = inject("clearServerError", () => {});
 const clearServerError = inject("clearServerError", () => {});
 
 
@@ -153,7 +156,10 @@ const loadingServiceTypes = ref(false);
 const serviceOptions = ref([]);
 const serviceOptions = ref([]);
 
 
 const dailyPriceMinMaxText = computed(() => {
 const dailyPriceMinMaxText = computed(() => {
-  return `Valor mínimo ${formatCurrency(dailyPriceMin.value)}. Valor máximo ${formatCurrency(DAILY_PRICE_MAX)}.`;
+  return t('profile.service_data.price_min_max', {
+    min: formatCurrency(dailyPriceMin.value),
+    max: formatCurrency(DAILY_PRICE_MAX),
+  });
 });
 });
 
 
 const priceError = computed(() =>
 const priceError = computed(() =>
@@ -182,21 +188,21 @@ const formatCurrency = (value) => {
 
 
 const getDailyPriceError = (value) => {
 const getDailyPriceError = (value) => {
   if (value === null || value === undefined || value === "") {
   if (value === null || value === undefined || value === "") {
-    return "Este campo é obrigatório";
+    return t('validation.rules.required');
   }
   }
 
 
   const numericValue = Number(value);
   const numericValue = Number(value);
 
 
   if (Number.isNaN(numericValue)) {
   if (Number.isNaN(numericValue)) {
-    return "Valor inválido";
+    return t('validation.rules.required');
   }
   }
 
 
   if (numericValue < dailyPriceMin.value) {
   if (numericValue < dailyPriceMin.value) {
-    return `Valor mínimo ${formatCurrency(dailyPriceMin.value)}`;
+    return t('profile.service_data.price_min_error', { value: formatCurrency(dailyPriceMin.value) });
   }
   }
 
 
   if (numericValue > DAILY_PRICE_MAX) {
   if (numericValue > DAILY_PRICE_MAX) {
-    return `Valor máximo ${formatCurrency(DAILY_PRICE_MAX)}`;
+    return t('profile.service_data.price_max_error', { value: formatCurrency(DAILY_PRICE_MAX) });
   }
   }
 
 
   return "";
   return "";
@@ -307,7 +313,9 @@ onMounted(() => {
   loadDailyPriceMin();
   loadDailyPriceMin();
 });
 });
 </script>
 </script>
-<style scoped>
+<style scoped lang="scss">
+@use "sass:map";
+
 .banner-round {
 .banner-round {
   border-radius: 18px;
   border-radius: 18px;
 }
 }
@@ -315,4 +323,8 @@ onMounted(() => {
 :deep(.custom-currency-input .q-field__control) {
 :deep(.custom-currency-input .q-field__control) {
   border-radius: 28px;
   border-radius: 28px;
 }
 }
+
+:deep(.custom-currency-input .q-field__bottom) {
+  background: map.get($colors, "surface-dark");
+}
 </style>
 </style>

+ 17 - 5
src/components/profile/ProfileServiceDataDialog.vue

@@ -19,10 +19,9 @@
             <div class="text-text q-mb-sm font12 fontbold">
             <div class="text-text q-mb-sm font12 fontbold">
               {{ $t('profile.service_data.price_8h_label') }}
               {{ $t('profile.service_data.price_8h_label') }}
             </div>
             </div>
-
             <DefaultCurrencyInput
             <DefaultCurrencyInput
               v-model="form.daily_price_8h"
               v-model="form.daily_price_8h"
-              class="q-mb-xs bg-surface"
+              class="q-mb-xs bg-surface custom-currency-input"
               input-class="text-text"
               input-class="text-text"
               :error="!!priceError"
               :error="!!priceError"
               :error-message="priceError"
               :error-message="priceError"
@@ -201,7 +200,10 @@ const parseDailyPriceMin = (payload) => {
 };
 };
 
 
 const dailyPriceMinMaxText = computed(() => {
 const dailyPriceMinMaxText = computed(() => {
-  return `Valor mínimo ${formatCurrency(dailyPriceMin.value)}. Valor máximo ${formatCurrency(DAILY_PRICE_MAX)}.`;
+  return t('profile.service_data.price_min_max', {
+    min: formatCurrency(dailyPriceMin.value),
+    max: formatCurrency(DAILY_PRICE_MAX),
+  });
 });
 });
 
 
 const getDailyPriceError = (value) => {
 const getDailyPriceError = (value) => {
@@ -209,8 +211,12 @@ const getDailyPriceError = (value) => {
 
 
   if (!value && value !== 0) return '';
   if (!value && value !== 0) return '';
   if (Number.isNaN(numericValue)) return t('validation.rules.required');
   if (Number.isNaN(numericValue)) return t('validation.rules.required');
-  if (numericValue < dailyPriceMin.value) return `Valor mínimo ${formatCurrency(dailyPriceMin.value)}`;
-  if (numericValue > DAILY_PRICE_MAX) return t('profile.service_data.price_max_error');
+  if (numericValue < dailyPriceMin.value) {
+    return t('profile.service_data.price_min_error', { value: formatCurrency(dailyPriceMin.value) });
+  }
+  if (numericValue > DAILY_PRICE_MAX) {
+    return t('profile.service_data.price_max_error', { value: formatCurrency(DAILY_PRICE_MAX) });
+  }
 
 
   return '';
   return '';
 };
 };
@@ -334,10 +340,16 @@ onMounted(async () => {
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
+@use "sass:map";
+
 :deep(.q-field--outlined .q-field__control) {
 :deep(.q-field--outlined .q-field__control) {
   border-radius: 10px;
   border-radius: 10px;
 }
 }
 
 
+:deep(.custom-currency-input .q-field__bottom) {
+  background: map.get($colors, "page");
+}
+
 .service-option-cell {
 .service-option-cell {
   text-align: left;
   text-align: left;
 }
 }

+ 8 - 6
src/i18n/locales/en.json

@@ -200,9 +200,9 @@
         },
         },
         "step_4": {
         "step_4": {
           "document_front": "Side 1 (Front)",
           "document_front": "Side 1 (Front)",
-          "document_front_desc": "Photo of the front of your document (ID or Driver License).",
+          "document_front_desc": "Photo of the front of your document (ID).",
           "document_back": "Side 2 (Back)",
           "document_back": "Side 2 (Back)",
-          "document_back_desc": "Photo of the back of your document (ID or Driver License).",
+          "document_back_desc": "Photo of the back of your document (ID).",
           "selfie": "Selfie with document",
           "selfie": "Selfie with document",
           "selfie_desc": "Take a selfie holding your document near your face.",
           "selfie_desc": "Take a selfie holding your document near your face.",
           "photo_captured": "Photo captured!",
           "photo_captured": "Photo captured!",
@@ -229,7 +229,6 @@
         },
         },
         "step_5": {
         "step_5": {
           "daily_price_title": "What is the value of your daily rate for up to 8 hours?",
           "daily_price_title": "What is the value of your daily rate for up to 8 hours?",
-          "daily_price_min_max": "Minimum value $ 3.00. Maximum value $ 500.00.",
           "dont_worry": "Don't worry!",
           "dont_worry": "Don't worry!",
           "change_anytime": "You can change your daily rate value whenever you want ;)",
           "change_anytime": "You can change your daily rate value whenever you want ;)",
           "shorter_services": "Based on the value above, the values for shorter services will be:",
           "shorter_services": "Based on the value above, the values for shorter services will be:",
@@ -519,6 +518,9 @@
   },
   },
   "profile": {
   "profile": {
     "title": "Profile",
     "title": "Profile",
+    "share": {
+      "message": "Download the Diária App and hire a service with {name}."
+    },
     "edit_profile": "Edit profile",
     "edit_profile": "Edit profile",
     "edit_data": "My data",
     "edit_data": "My data",
     "change_photo": "Request photo change",
     "change_photo": "Request photo change",
@@ -620,9 +622,9 @@
       "pricing_title": "My rates",
       "pricing_title": "My rates",
       "pricing_subtitle": "Set your 8-hour daily rate. The others are calculated automatically.",
       "pricing_subtitle": "Set your 8-hour daily rate. The others are calculated automatically.",
       "price_8h_label": "What is your rate for up to 8 hours?",
       "price_8h_label": "What is your rate for up to 8 hours?",
-      "price_min_max": "Minimum R$3.00. Maximum R$500.00.",
-      "price_min_error": "Minimum value R$ 3.00",
-      "price_max_error": "Maximum value R$ 500.00",
+      "price_min_max": "Minimum {min}. Maximum {max}.",
+      "price_min_error": "Minimum value {value}",
+      "price_max_error": "Maximum value {value}",
       "shorter_services": "Based on the value above, the rates for shorter services will be:",
       "shorter_services": "Based on the value above, the rates for shorter services will be:",
       "up_to_6h": "up to 6 hours",
       "up_to_6h": "up to 6 hours",
       "up_to_4h": "up to 4 hours",
       "up_to_4h": "up to 4 hours",

+ 8 - 6
src/i18n/locales/es.json

@@ -200,9 +200,9 @@
         },
         },
         "step_4": {
         "step_4": {
           "document_front": "Lado 1 (Frente)",
           "document_front": "Lado 1 (Frente)",
-          "document_front_desc": "Foto del frente de su documento (RG o Licencia).",
+          "document_front_desc": "Foto del frente de su documento (RG).",
           "document_back": "Lado 2 (Dorso)",
           "document_back": "Lado 2 (Dorso)",
-          "document_back_desc": "Foto del dorso de su documento (RG o Licencia).",
+          "document_back_desc": "Foto del dorso de su documento (RG).",
           "selfie": "Selfie con documento",
           "selfie": "Selfie con documento",
           "selfie_desc": "Tome una selfie sosteniendo su documento cerca de su rostro.",
           "selfie_desc": "Tome una selfie sosteniendo su documento cerca de su rostro.",
           "photo_captured": "¡Foto capturada!",
           "photo_captured": "¡Foto capturada!",
@@ -229,7 +229,6 @@
         },
         },
         "step_5": {
         "step_5": {
           "daily_price_title": "¿Cuál es el valor de su jornada de hasta 8 horas?",
           "daily_price_title": "¿Cuál es el valor de su jornada de hasta 8 horas?",
-          "daily_price_min_max": "Valor mínimo R$ 3,00. Valor máximo R$ 500,00.",
           "dont_worry": "¡No se preocupe!",
           "dont_worry": "¡No se preocupe!",
           "change_anytime": "Puede cambiar el valor de su jornada cuando quiera ;)",
           "change_anytime": "Puede cambiar el valor de su jornada cuando quiera ;)",
           "shorter_services": "Basado en el valor anterior, los valores de servicios más cortos serán:",
           "shorter_services": "Basado en el valor anterior, los valores de servicios más cortos serán:",
@@ -519,6 +518,9 @@
   },
   },
   "profile": {
   "profile": {
     "title": "Perfil",
     "title": "Perfil",
+    "share": {
+      "message": "Descarga la app Diária y contrata un servicio con {name}."
+    },
     "edit_profile": "Editar perfil",
     "edit_profile": "Editar perfil",
     "edit_data": "Mis datos",
     "edit_data": "Mis datos",
     "change_photo": "Solicitar cambio de foto",
     "change_photo": "Solicitar cambio de foto",
@@ -620,9 +622,9 @@
       "pricing_title": "Mis tarifas",
       "pricing_title": "Mis tarifas",
       "pricing_subtitle": "Define el valor de tu jornada de 8 horas. Los demás se calculan automáticamente.",
       "pricing_subtitle": "Define el valor de tu jornada de 8 horas. Los demás se calculan automáticamente.",
       "price_8h_label": "¿Cuál es tu tarifa por hasta 8 horas?",
       "price_8h_label": "¿Cuál es tu tarifa por hasta 8 horas?",
-      "price_min_max": "Mínimo R$3,00. Máximo R$500,00.",
-      "price_min_error": "Valor mínimo R$ 3,00",
-      "price_max_error": "Valor máximo R$ 500,00",
+      "price_min_max": "Mínimo {min}. Máximo {max}.",
+      "price_min_error": "Valor mínimo {value}",
+      "price_max_error": "Valor máximo {value}",
       "shorter_services": "Basado en el valor anterior, las tarifas para servicios más cortos serán:",
       "shorter_services": "Basado en el valor anterior, las tarifas para servicios más cortos serán:",
       "up_to_6h": "hasta 6 horas",
       "up_to_6h": "hasta 6 horas",
       "up_to_4h": "hasta 4 horas",
       "up_to_4h": "hasta 4 horas",

+ 8 - 6
src/i18n/locales/pt.json

@@ -200,9 +200,9 @@
         },
         },
         "step_4": {
         "step_4": {
           "document_front": "Lado 1 (Frente)",
           "document_front": "Lado 1 (Frente)",
-          "document_front_desc": "Foto da frente do seu documento (RG ou CNH).",
+          "document_front_desc": "Foto da frente do seu documento (RG).",
           "document_back": "Lado 2 (Verso)",
           "document_back": "Lado 2 (Verso)",
-          "document_back_desc": "Foto do verso do seu documento (RG ou CNH).",
+          "document_back_desc": "Foto do verso do seu documento (RG).",
           "selfie": "Selfie com documento",
           "selfie": "Selfie com documento",
           "selfie_desc": "Tire uma selfie segurando o seu documento próximo ao rosto.",
           "selfie_desc": "Tire uma selfie segurando o seu documento próximo ao rosto.",
           "photo_captured": "Foto capturada!",
           "photo_captured": "Foto capturada!",
@@ -229,7 +229,6 @@
         },
         },
         "step_5": {
         "step_5": {
           "daily_price_title": "Qual valor da sua diária de até 8 horas?",
           "daily_price_title": "Qual valor da sua diária de até 8 horas?",
-          "daily_price_min_max": "Valor mínimo R$ 3,00. Valor máximo R$ 500,00.",
           "dont_worry": "Não se preocupe!",
           "dont_worry": "Não se preocupe!",
           "change_anytime": "Você pode alterar o valor da sua diária quando quiser ;)",
           "change_anytime": "Você pode alterar o valor da sua diária quando quiser ;)",
           "shorter_services": "Baseado no valor acima, os valores de serviços mais curtos serão:",
           "shorter_services": "Baseado no valor acima, os valores de serviços mais curtos serão:",
@@ -522,6 +521,9 @@
   },
   },
   "profile": {
   "profile": {
     "title": "Perfil",
     "title": "Perfil",
+    "share": {
+      "message": "Baixe o Diária App e contrate um serviço com {name}."
+    },
     "edit_profile": "Editar perfil",
     "edit_profile": "Editar perfil",
     "edit_data": "Meu dados",
     "edit_data": "Meu dados",
     "change_photo": "Solicitar alteração de foto",
     "change_photo": "Solicitar alteração de foto",
@@ -623,9 +625,9 @@
       "pricing_title": "Meus valores",
       "pricing_title": "Meus valores",
       "pricing_subtitle": "Defina o valor da sua diária de 8 horas. Os demais são calculados automaticamente.",
       "pricing_subtitle": "Defina o valor da sua diária de 8 horas. Os demais são calculados automaticamente.",
       "price_8h_label": "Qual valor da sua diária de até 8 horas?",
       "price_8h_label": "Qual valor da sua diária de até 8 horas?",
-      "price_min_max": "Valor mínimo R$3,00. Valor máximo R$ 500,00.",
-      "price_min_error": "Valor mínimo R$ 3,00",
-      "price_max_error": "Valor máximo R$ 500,00",
+      "price_min_max": "Valor mínimo {min}. Valor máximo {max}.",
+      "price_min_error": "Valor mínimo {value}",
+      "price_max_error": "Valor máximo {value}",
       "shorter_services": "Baseado no valor acima, os valores de serviços mais curtos serão:",
       "shorter_services": "Baseado no valor acima, os valores de serviços mais curtos serão:",
       "up_to_6h": "até 6 horas",
       "up_to_6h": "até 6 horas",
       "up_to_4h": "até 4 horas",
       "up_to_4h": "até 4 horas",

+ 3 - 1
src/pages/profile/ProfilePage.vue

@@ -152,6 +152,7 @@
 <script setup>
 <script setup>
 import { ref, onMounted } from 'vue';
 import { ref, onMounted } from 'vue';
 import { useQuasar } from 'quasar';
 import { useQuasar } from 'quasar';
+import { useI18n } from 'vue-i18n';
 import { Browser } from '@capacitor/browser';
 import { Browser } from '@capacitor/browser';
 import { useAuth } from 'src/composables/useAuth';
 import { useAuth } from 'src/composables/useAuth';
 import { useProviderApproval } from 'src/composables/useProviderApproval';
 import { useProviderApproval } from 'src/composables/useProviderApproval';
@@ -172,6 +173,7 @@ const SUPPORT_PAGE_URL   = 'https://politicas.softpar.inf.br/suportes/suporteDia
 const appVersion = process.env.APP_VERSION;
 const appVersion = process.env.APP_VERSION;
 
 
 const $q = useQuasar();
 const $q = useQuasar();
+const { t } = useI18n();
 
 
 const { logout } = useAuth();
 const { logout } = useAuth();
 const { isPendingProvider } = useProviderApproval();
 const { isPendingProvider } = useProviderApproval();
@@ -184,7 +186,7 @@ const user = ref({
 
 
 // compartilha perfil 
 // compartilha perfil 
 const shareProfile = async () => {
 const shareProfile = async () => {
-  const message = `Baixe o Diária App e contrate um serviço com ${user.value.name}.`;
+  const message = t('profile.share.message', { name: user.value.name });
 
 
   try {
   try {
     await Share.share({
     await Share.share({