Browse Source

chore: remove arquivos temp do repo + organizando codigo login page

Gustavo Mantovani 2 weeks ago
parent
commit
ce6fd90a7b

+ 3 - 1
.gitignore

@@ -49,4 +49,6 @@ Thumbs.db
 
 /src-capacitor/android/.gradle/
 /src-capacitor/android/**/build/
-/src-capacitor/android/**/release/
+/src-capacitor/android/**/release/
+
+quasar.config.js.temporary.compiled.*

+ 0 - 221
quasar.config.js.temporary.compiled.1773333784136.mjs

@@ -1,221 +0,0 @@
-/* eslint-disable */
-/**
- * THIS FILE IS GENERATED AUTOMATICALLY.
- * 1. DO NOT edit this file directly as it won't do anything.
- * 2. EDIT the original quasar.config file INSTEAD.
- * 3. DO NOT git commit this file. It should be ignored.
- *
- * This file is still here because there was an error in
- * the original quasar.config file and this allows you to
- * investigate the Node.js stack error.
- *
- * After you fix the original file, this file will be
- * deleted automatically.
- **/
-
-
-// quasar.config.js
-import { defineConfig } from "@quasar/app-vite/wrappers";
-import { fileURLToPath } from "node:url";
-var __quasar_inject_import_meta_url__ = "file:///home/softpar/projetos/spas/sfp_front_vue_diarista_prestador/quasar.config.js";
-var quasar_config_default = defineConfig((ctx) => {
-  return {
-    bin: {
-      linuxAndroidStudio: "/snap/bin/android-studio"
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
-    // preFetch: true,
-    // app boot file (/src/boot)
-    // --> boot files are part of "main.js"
-    // https://v2.quasar.dev/quasar-cli-vite/boot-files
-    boot: [
-      "axios",
-      "i18n",
-      "defaultPropsComponents"
-      // "socket.io",
-    ],
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
-    css: ["app.scss"],
-    // https://github.com/quasarframework/quasar/tree/dev/extras
-    extras: [
-      // 'ionicons-v4',
-      "mdi-v7",
-      // 'fontawesome-v6',
-      // 'eva-icons',
-      // 'themify',
-      // "line-awesome",
-      // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
-      "roboto-font",
-      // optional, you are not bound to it
-      "material-icons"
-      // optional, you are not bound to it
-    ],
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
-    build: {
-      target: {
-        browser: ["es2022", "firefox115", "chrome115", "safari14"],
-        node: "node22"
-      },
-      vueRouterMode: "history",
-      // available values: 'hash', 'history'
-      // vueRouterBase,
-      // vueDevtools,
-      // vueOptionsAPI: false,
-      // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
-      // publicPath: '/',
-      // analyze: true,
-      env: {
-        API_URL: ctx.dev ? "http://localhost:3000" : "http://localhost:3000",
-        PASSWORD: ctx.dev ? "S@ft2080." : "",
-        WEBSOCKET_API: ctx.dev ? "http://localhost:4321/" : "http://localhost:4321/",
-        WEBSOCKET_PATH: ctx.dev ? "/socket.io" : "/socket.io",
-        WEBSOCKET_ROOM: ctx.dev ? "LARAVEL" : "LARAVEL",
-        WEBSOCKET_API_KEY: "7wArC/kl0nTbt4zBu0agw.NXLyjA96I6x1XmBcuokwPqfo3/CIxzqYw.PTthh5eqa08Uf4ubFlOqatpShoz1CRRID9pZReEFvBk3il6E9u"
-      },
-      // rawDefine: {}
-      // ignorePublicFolder: true,
-      // minify: false,
-      // polyfillModulePreload: true,
-      // distDir
-      // extendViteConf (viteConf) {},
-      // viteVuePluginOptions: {},
-      vitePlugins: [
-        [
-          "@intlify/unplugin-vue-i18n/vite",
-          {
-            include: [fileURLToPath(new URL("./src/i18n", __quasar_inject_import_meta_url__))],
-            ssr: ctx.modeName === "ssr"
-          }
-        ],
-        [
-          "vite-plugin-checker",
-          {
-            eslint: {
-              lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
-              useFlatConfig: true
-            }
-          },
-          { server: false }
-        ]
-      ]
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
-    devServer: {
-      // https: true
-      open: true
-      // opens browser window automatically
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
-    framework: {
-      lang: "pt-BR",
-      config: {
-        dark: "auto",
-        notify: {
-          position: "top-right"
-        }
-      },
-      // iconSet: 'material-icons', // Quasar icon set
-      // lang: 'en-US', // Quasar language pack
-      // For special cases outside of where the auto-import strategy can have an impact
-      // (like functional components as one of the examples),
-      // you can manually specify Quasar components/directives to be available everywhere:
-      //
-      // components: [],
-      // directives: [],
-      // Quasar plugins
-      plugins: ["Dialog", "Notify", "Loading", "Cookies", "Dark"]
-    },
-    // animations: 'all', // --- includes all animations
-    // https://v2.quasar.dev/options/animations
-    animations: [],
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
-    // sourceFiles: {
-    //   rootComponent: 'src/App.vue',
-    //   router: 'src/router/index',
-    //   store: 'src/store/index',
-    //   pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
-    //   pwaServiceWorker: 'src-pwa/custom-service-worker',
-    //   pwaManifestFile: 'src-pwa/manifest.json',
-    //   electronMain: 'src-electron/electron-main',
-    //   electronPreload: 'src-electron/electron-preload'
-    //   bexManifestFile: 'src-bex/manifest.json
-    // },
-    // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
-    ssr: {
-      prodPort: 3e3,
-      // The default port that the production server should use
-      // (gets superseded if process.env.PORT is specified at runtime)
-      middlewares: [
-        "render"
-        // keep this as last one
-      ],
-      // extendPackageJson (json) {},
-      // extendSSRWebserverConf (esbuildConf) {},
-      // manualStoreSerialization: true,
-      // manualStoreSsrContextInjection: true,
-      // manualStoreHydration: true,
-      // manualPostHydrationTrigger: true,
-      pwa: false
-      // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
-      // will mess up SSR
-      // pwaExtendGenerateSWOptions (cfg) {},
-      // pwaExtendInjectManifestOptions (cfg) {}
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
-    pwa: {
-      workboxMode: "GenerateSW"
-      // 'GenerateSW' or 'InjectManifest'
-      // swFilename: 'sw.js',
-      // manifestFilename: 'manifest.json'
-      // extendManifestJson (json) {},
-      // useCredentialsForManifestTag: true,
-      // injectPwaMetaTags: false,
-      // extendPWACustomSWConf (esbuildConf) {},
-      // extendGenerateSWOptions (cfg) {},
-      // extendInjectManifestOptions (cfg) {}
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
-    cordova: {
-      // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
-    capacitor: {
-      hideSplashscreen: true
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
-    electron: {
-      // extendElectronMainConf (esbuildConf) {},
-      // extendElectronPreloadConf (esbuildConf) {},
-      // extendPackageJson (json) {},
-      // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
-      preloadScripts: ["electron-preload"],
-      // specify the debugging port to use for the Electron app when running in development mode
-      inspectPort: 5858,
-      bundler: "packager",
-      // 'packager' or 'builder'
-      packager: {
-        // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
-        // OS X / Mac App Store
-        // appBundleId: '',
-        // appCategoryType: '',
-        // osxSign: '',
-        // protocol: 'myapp://path',
-        // Windows only
-        // win32metadata: { ... }
-      },
-      builder: {
-        // https://www.electron.build/configuration/configuration
-        appId: "quasar-skeleton"
-      }
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
-    bex: {
-      // extendBexScriptsConf (esbuildConf) {},
-      // extendBexManifestJson (json) {},
-      contentScripts: ["my-content-script"]
-    }
-  };
-});
-export {
-  quasar_config_default as default
-};

+ 0 - 221
quasar.config.js.temporary.compiled.1779814851016.mjs

@@ -1,221 +0,0 @@
-/* eslint-disable */
-/**
- * THIS FILE IS GENERATED AUTOMATICALLY.
- * 1. DO NOT edit this file directly as it won't do anything.
- * 2. EDIT the original quasar.config file INSTEAD.
- * 3. DO NOT git commit this file. It should be ignored.
- *
- * This file is still here because there was an error in
- * the original quasar.config file and this allows you to
- * investigate the Node.js stack error.
- *
- * After you fix the original file, this file will be
- * deleted automatically.
- **/
-
-
-// quasar.config.js
-import { defineConfig } from "@quasar/app-vite/wrappers";
-import { fileURLToPath } from "node:url";
-var __quasar_inject_import_meta_url__ = "file:///home/mantovani/development/softpar/frontend/sfp_front_vue_diarista_prestador/quasar.config.js";
-var quasar_config_default = defineConfig((ctx) => {
-  return {
-    bin: {
-      linuxAndroidStudio: "/snap/bin/android-studio"
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
-    // preFetch: true,
-    // app boot file (/src/boot)
-    // --> boot files are part of "main.js"
-    // https://v2.quasar.dev/quasar-cli-vite/boot-files
-    boot: [
-      "axios",
-      "i18n",
-      "defaultPropsComponents"
-      // "socket.io",
-    ],
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
-    css: ["app.scss"],
-    // https://github.com/quasarframework/quasar/tree/dev/extras
-    extras: [
-      // 'ionicons-v4',
-      "mdi-v7",
-      // 'fontawesome-v6',
-      // 'eva-icons',
-      // 'themify',
-      // "line-awesome",
-      // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
-      "roboto-font",
-      // optional, you are not bound to it
-      "material-icons"
-      // optional, you are not bound to it
-    ],
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
-    build: {
-      target: {
-        browser: ["es2022", "firefox115", "chrome115", "safari14"],
-        node: "node22"
-      },
-      vueRouterMode: "history",
-      // available values: 'hash', 'history'
-      // vueRouterBase,
-      // vueDevtools,
-      // vueOptionsAPI: false,
-      // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
-      // publicPath: '/',
-      // analyze: true,
-      env: {
-        API_URL: ctx.dev ? "http://localhost:3000" : "http://localhost:3000",
-        PASSWORD: ctx.dev ? "S@ft2080." : "",
-        WEBSOCKET_API: ctx.dev ? "http://localhost:4321/" : "http://localhost:4321/",
-        WEBSOCKET_PATH: ctx.dev ? "/socket.io" : "/socket.io",
-        WEBSOCKET_ROOM: ctx.dev ? "LARAVEL" : "LARAVEL",
-        WEBSOCKET_API_KEY: "7wArC/kl0nTbt4zBu0agw.NXLyjA96I6x1XmBcuokwPqfo3/CIxzqYw.PTthh5eqa08Uf4ubFlOqatpShoz1CRRID9pZReEFvBk3il6E9u"
-      },
-      // rawDefine: {}
-      // ignorePublicFolder: true,
-      // minify: false,
-      // polyfillModulePreload: true,
-      // distDir
-      // extendViteConf (viteConf) {},
-      // viteVuePluginOptions: {},
-      vitePlugins: [
-        [
-          "@intlify/unplugin-vue-i18n/vite",
-          {
-            include: [fileURLToPath(new URL("./src/i18n", __quasar_inject_import_meta_url__))],
-            ssr: ctx.modeName === "ssr"
-          }
-        ],
-        [
-          "vite-plugin-checker",
-          {
-            eslint: {
-              lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
-              useFlatConfig: true
-            }
-          },
-          { server: false }
-        ]
-      ]
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
-    devServer: {
-      // https: true
-      open: false
-      // opens browser window automatically
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
-    framework: {
-      lang: "pt-BR",
-      config: {
-        dark: "auto",
-        notify: {
-          position: "top-right"
-        }
-      },
-      // iconSet: 'material-icons', // Quasar icon set
-      // lang: 'en-US', // Quasar language pack
-      // For special cases outside of where the auto-import strategy can have an impact
-      // (like functional components as one of the examples),
-      // you can manually specify Quasar components/directives to be available everywhere:
-      //
-      // components: [],
-      // directives: [],
-      // Quasar plugins
-      plugins: ["Dialog", "Notify", "Loading", "Cookies", "Dark"]
-    },
-    // animations: 'all', // --- includes all animations
-    // https://v2.quasar.dev/options/animations
-    animations: [],
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
-    // sourceFiles: {
-    //   rootComponent: 'src/App.vue',
-    //   router: 'src/router/index',
-    //   store: 'src/store/index',
-    //   pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
-    //   pwaServiceWorker: 'src-pwa/custom-service-worker',
-    //   pwaManifestFile: 'src-pwa/manifest.json',
-    //   electronMain: 'src-electron/electron-main',
-    //   electronPreload: 'src-electron/electron-preload'
-    //   bexManifestFile: 'src-bex/manifest.json
-    // },
-    // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
-    ssr: {
-      prodPort: 3e3,
-      // The default port that the production server should use
-      // (gets superseded if process.env.PORT is specified at runtime)
-      middlewares: [
-        "render"
-        // keep this as last one
-      ],
-      // extendPackageJson (json) {},
-      // extendSSRWebserverConf (esbuildConf) {},
-      // manualStoreSerialization: true,
-      // manualStoreSsrContextInjection: true,
-      // manualStoreHydration: true,
-      // manualPostHydrationTrigger: true,
-      pwa: false
-      // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
-      // will mess up SSR
-      // pwaExtendGenerateSWOptions (cfg) {},
-      // pwaExtendInjectManifestOptions (cfg) {}
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
-    pwa: {
-      workboxMode: "GenerateSW"
-      // 'GenerateSW' or 'InjectManifest'
-      // swFilename: 'sw.js',
-      // manifestFilename: 'manifest.json'
-      // extendManifestJson (json) {},
-      // useCredentialsForManifestTag: true,
-      // injectPwaMetaTags: false,
-      // extendPWACustomSWConf (esbuildConf) {},
-      // extendGenerateSWOptions (cfg) {},
-      // extendInjectManifestOptions (cfg) {}
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
-    cordova: {
-      // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
-    capacitor: {
-      hideSplashscreen: true
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
-    electron: {
-      // extendElectronMainConf (esbuildConf) {},
-      // extendElectronPreloadConf (esbuildConf) {},
-      // extendPackageJson (json) {},
-      // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
-      preloadScripts: ["electron-preload"],
-      // specify the debugging port to use for the Electron app when running in development mode
-      inspectPort: 5858,
-      bundler: "packager",
-      // 'packager' or 'builder'
-      packager: {
-        // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
-        // OS X / Mac App Store
-        // appBundleId: '',
-        // appCategoryType: '',
-        // osxSign: '',
-        // protocol: 'myapp://path',
-        // Windows only
-        // win32metadata: { ... }
-      },
-      builder: {
-        // https://www.electron.build/configuration/configuration
-        appId: "quasar-skeleton"
-      }
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
-    bex: {
-      // extendBexScriptsConf (esbuildConf) {},
-      // extendBexManifestJson (json) {},
-      contentScripts: ["my-content-script"]
-    }
-  };
-});
-export {
-  quasar_config_default as default
-};

+ 0 - 259
quasar.config.js.temporary.compiled.1780666187782.mjs

@@ -1,259 +0,0 @@
-/* eslint-disable */
-/**
- * THIS FILE IS GENERATED AUTOMATICALLY.
- * 1. DO NOT edit this file directly as it won't do anything.
- * 2. EDIT the original quasar.config file INSTEAD.
- * 3. DO NOT git commit this file. It should be ignored.
- *
- * This file is still here because there was an error in
- * the original quasar.config file and this allows you to
- * investigate the Node.js stack error.
- *
- * After you fix the original file, this file will be
- * deleted automatically.
- **/
-
-
-// quasar.config.js
-import { defineConfig } from "@quasar/app-vite/wrappers";
-import { existsSync, readFileSync } from "node:fs";
-import { fileURLToPath } from "node:url";
-import { resolve } from "node:path";
-var __quasar_inject_import_meta_url__ = "file:///home/softpar/projetos/spas/sfp_front_vue_diarista_prestador/quasar.config.js";
-var envFiles = {
-  dev: ".env.app.dev",
-  staging: ".env.app.staging",
-  prod: ".env.app.prod"
-};
-var loadAppEnv = (ctx) => {
-  const appEnv = process.env.APP_ENV || (ctx.dev ? "dev" : "prod");
-  const envFile = envFiles[appEnv];
-  if (!envFile) {
-    throw new Error(`APP_ENV invalido: "${appEnv}". Use dev, staging ou prod.`);
-  }
-  const fileEnv = parseEnvFile(resolve(process.cwd(), envFile));
-  return {
-    APP_ENV: appEnv,
-    API_URL: fileEnv.API_URL,
-    PASSWORD: fileEnv.PASSWORD,
-    WEBSOCKET_API: fileEnv.WEBSOCKET_API,
-    WEBSOCKET_PATH: fileEnv.WEBSOCKET_PATH,
-    WEBSOCKET_ROOM: fileEnv.WEBSOCKET_ROOM,
-    WEBSOCKET_API_KEY: fileEnv.WEBSOCKET_API_KEY
-  };
-};
-var parseEnvFile = (filePath) => {
-  if (!existsSync(filePath)) {
-    return {};
-  }
-  return readFileSync(filePath, "utf8").split(/\r?\n/).reduce((env, line) => {
-    const trimmedLine = line.trim();
-    if (!trimmedLine || trimmedLine.startsWith("#")) {
-      return env;
-    }
-    const separatorIndex = trimmedLine.indexOf("=");
-    if (separatorIndex === -1) {
-      return env;
-    }
-    const key = trimmedLine.slice(0, separatorIndex).trim();
-    const value = trimmedLine.slice(separatorIndex + 1).trim();
-    env[key] = value.replace(/^["']|["']$/g, "");
-    return env;
-  }, {});
-};
-var quasar_config_default = defineConfig((ctx) => {
-  const appEnv = loadAppEnv(ctx);
-  return {
-    bin: {
-      linuxAndroidStudio: "/snap/bin/android-studio"
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
-    // preFetch: true,
-    // app boot file (/src/boot)
-    // --> boot files are part of "main.js"
-    // https://v2.quasar.dev/quasar-cli-vite/boot-files
-    boot: [
-      "axios",
-      "i18n",
-      "defaultPropsComponents",
-      "push-notifications"
-      // "socket.io",
-    ],
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
-    css: ["app.scss"],
-    // https://github.com/quasarframework/quasar/tree/dev/extras
-    extras: [
-      // 'ionicons-v4',
-      "mdi-v7",
-      // 'fontawesome-v6',
-      // 'eva-icons',
-      // 'themify',
-      // "line-awesome",
-      // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
-      "roboto-font",
-      // optional, you are not bound to it
-      "material-icons"
-      // optional, you are not bound to it
-    ],
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
-    build: {
-      target: {
-        browser: ["es2022", "firefox115", "chrome115", "safari14"],
-        node: "node22"
-      },
-      vueRouterMode: "history",
-      // available values: 'hash', 'history'
-      // vueRouterBase,
-      // vueDevtools,
-      // vueOptionsAPI: false,
-      // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
-      // publicPath: '/',
-      // analyze: true,
-      env: appEnv,
-      // rawDefine: {}
-      // ignorePublicFolder: true,
-      // minify: false,
-      // polyfillModulePreload: true,
-      // distDir
-      // extendViteConf (viteConf) {},
-      // viteVuePluginOptions: {},
-      vitePlugins: [
-        [
-          "@intlify/unplugin-vue-i18n/vite",
-          {
-            include: [fileURLToPath(new URL("./src/i18n", __quasar_inject_import_meta_url__))],
-            ssr: ctx.modeName === "ssr"
-          }
-        ],
-        [
-          "vite-plugin-checker",
-          {
-            eslint: {
-              lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
-              useFlatConfig: true
-            }
-          },
-          { server: false }
-        ]
-      ]
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
-    devServer: {
-      // https: true
-      open: false
-      // opens browser window automatically
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
-    framework: {
-      lang: "pt-BR",
-      config: {
-        dark: "auto",
-        notify: {
-          position: "top-right"
-        }
-      },
-      // iconSet: 'material-icons', // Quasar icon set
-      // lang: 'en-US', // Quasar language pack
-      // For special cases outside of where the auto-import strategy can have an impact
-      // (like functional components as one of the examples),
-      // you can manually specify Quasar components/directives to be available everywhere:
-      //
-      // components: [],
-      // directives: [],
-      // Quasar plugins
-      plugins: ["Dialog", "Notify", "Loading", "Cookies", "Dark"]
-    },
-    // animations: 'all', // --- includes all animations
-    // https://v2.quasar.dev/options/animations
-    animations: [],
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
-    // sourceFiles: {
-    //   rootComponent: 'src/App.vue',
-    //   router: 'src/router/index',
-    //   store: 'src/store/index',
-    //   pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
-    //   pwaServiceWorker: 'src-pwa/custom-service-worker',
-    //   pwaManifestFile: 'src-pwa/manifest.json',
-    //   electronMain: 'src-electron/electron-main',
-    //   electronPreload: 'src-electron/electron-preload'
-    //   bexManifestFile: 'src-bex/manifest.json
-    // },
-    // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
-    ssr: {
-      prodPort: 3e3,
-      // The default port that the production server should use
-      // (gets superseded if process.env.PORT is specified at runtime)
-      middlewares: [
-        "render"
-        // keep this as last one
-      ],
-      // extendPackageJson (json) {},
-      // extendSSRWebserverConf (esbuildConf) {},
-      // manualStoreSerialization: true,
-      // manualStoreSsrContextInjection: true,
-      // manualStoreHydration: true,
-      // manualPostHydrationTrigger: true,
-      pwa: false
-      // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
-      // will mess up SSR
-      // pwaExtendGenerateSWOptions (cfg) {},
-      // pwaExtendInjectManifestOptions (cfg) {}
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
-    pwa: {
-      workboxMode: "GenerateSW"
-      // 'GenerateSW' or 'InjectManifest'
-      // swFilename: 'sw.js',
-      // manifestFilename: 'manifest.json'
-      // extendManifestJson (json) {},
-      // useCredentialsForManifestTag: true,
-      // injectPwaMetaTags: false,
-      // extendPWACustomSWConf (esbuildConf) {},
-      // extendGenerateSWOptions (cfg) {},
-      // extendInjectManifestOptions (cfg) {}
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
-    cordova: {
-      // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
-    capacitor: {
-      hideSplashscreen: true
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
-    electron: {
-      // extendElectronMainConf (esbuildConf) {},
-      // extendElectronPreloadConf (esbuildConf) {},
-      // extendPackageJson (json) {},
-      // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
-      preloadScripts: ["electron-preload"],
-      // specify the debugging port to use for the Electron app when running in development mode
-      inspectPort: 5858,
-      bundler: "packager",
-      // 'packager' or 'builder'
-      packager: {
-        // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
-        // OS X / Mac App Store
-        // appBundleId: '',
-        // appCategoryType: '',
-        // osxSign: '',
-        // protocol: 'myapp://path',
-        // Windows only
-        // win32metadata: { ... }
-      },
-      builder: {
-        // https://www.electron.build/configuration/configuration
-        appId: "quasar-skeleton"
-      }
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
-    bex: {
-      // extendBexScriptsConf (esbuildConf) {},
-      // extendBexManifestJson (json) {},
-      contentScripts: ["my-content-script"]
-    }
-  };
-});
-export {
-  quasar_config_default as default
-};

+ 0 - 259
quasar.config.js.temporary.compiled.1783949948671.mjs

@@ -1,259 +0,0 @@
-/* eslint-disable */
-/**
- * THIS FILE IS GENERATED AUTOMATICALLY.
- * 1. DO NOT edit this file directly as it won't do anything.
- * 2. EDIT the original quasar.config file INSTEAD.
- * 3. DO NOT git commit this file. It should be ignored.
- *
- * This file is still here because there was an error in
- * the original quasar.config file and this allows you to
- * investigate the Node.js stack error.
- *
- * After you fix the original file, this file will be
- * deleted automatically.
- **/
-
-
-// quasar.config.js
-import { defineConfig } from "@quasar/app-vite/wrappers";
-import { existsSync, readFileSync } from "node:fs";
-import { fileURLToPath } from "node:url";
-import { resolve } from "node:path";
-var __quasar_inject_import_meta_url__ = "file:///C:/Users/henri/Desktop/projeto-softpar/sfp_front_vue_diarista_prestador/quasar.config.js";
-var envFiles = {
-  dev: ".env.app.dev",
-  staging: ".env.app.staging",
-  prod: ".env.app.prod"
-};
-var loadAppEnv = (ctx) => {
-  const appEnv = process.env.APP_ENV || (ctx.dev ? "dev" : "prod");
-  const envFile = envFiles[appEnv];
-  if (!envFile) {
-    throw new Error(`APP_ENV invalido: "${appEnv}". Use dev, staging ou prod.`);
-  }
-  const fileEnv = parseEnvFile(resolve(process.cwd(), envFile));
-  return {
-    APP_ENV: appEnv,
-    API_URL: fileEnv.API_URL,
-    PASSWORD: fileEnv.PASSWORD,
-    WEBSOCKET_API: fileEnv.WEBSOCKET_API,
-    WEBSOCKET_PATH: fileEnv.WEBSOCKET_PATH,
-    WEBSOCKET_ROOM: fileEnv.WEBSOCKET_ROOM,
-    WEBSOCKET_API_KEY: fileEnv.WEBSOCKET_API_KEY
-  };
-};
-var parseEnvFile = (filePath) => {
-  if (!existsSync(filePath)) {
-    return {};
-  }
-  return readFileSync(filePath, "utf8").split(/\r?\n/).reduce((env, line) => {
-    const trimmedLine = line.trim();
-    if (!trimmedLine || trimmedLine.startsWith("#")) {
-      return env;
-    }
-    const separatorIndex = trimmedLine.indexOf("=");
-    if (separatorIndex === -1) {
-      return env;
-    }
-    const key = trimmedLine.slice(0, separatorIndex).trim();
-    const value = trimmedLine.slice(separatorIndex + 1).trim();
-    env[key] = value.replace(/^["']|["']$/g, "");
-    return env;
-  }, {});
-};
-var quasar_config_default = defineConfig((ctx) => {
-  const appEnv = loadAppEnv(ctx);
-  return {
-    bin: {
-      linuxAndroidStudio: "/snap/bin/android-studio"
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
-    // preFetch: true,
-    // app boot file (/src/boot)
-    // --> boot files are part of "main.js"
-    // https://v2.quasar.dev/quasar-cli-vite/boot-files
-    boot: [
-      "axios",
-      "i18n",
-      "defaultPropsComponents",
-      "push-notifications"
-      // "socket.io",
-    ],
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
-    css: ["app.scss"],
-    // https://github.com/quasarframework/quasar/tree/dev/extras
-    extras: [
-      // 'ionicons-v4',
-      "mdi-v7",
-      // 'fontawesome-v6',
-      // 'eva-icons',
-      // 'themify',
-      // "line-awesome",
-      // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
-      "roboto-font",
-      // optional, you are not bound to it
-      "material-icons"
-      // optional, you are not bound to it
-    ],
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
-    build: {
-      target: {
-        browser: ["es2022", "firefox115", "chrome115", "safari14"],
-        node: "node22"
-      },
-      vueRouterMode: "history",
-      // available values: 'hash', 'history'
-      // vueRouterBase,
-      // vueDevtools,
-      // vueOptionsAPI: false,
-      // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
-      // publicPath: '/',
-      // analyze: true,
-      env: appEnv,
-      // rawDefine: {}
-      // ignorePublicFolder: true,
-      // minify: false,
-      // polyfillModulePreload: true,
-      // distDir
-      // extendViteConf (viteConf) {},
-      // viteVuePluginOptions: {},
-      vitePlugins: [
-        [
-          "@intlify/unplugin-vue-i18n/vite",
-          {
-            include: [fileURLToPath(new URL("./src/i18n", __quasar_inject_import_meta_url__))],
-            ssr: ctx.modeName === "ssr"
-          }
-        ],
-        [
-          "vite-plugin-checker",
-          {
-            eslint: {
-              lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
-              useFlatConfig: true
-            }
-          },
-          { server: false }
-        ]
-      ]
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
-    devServer: {
-      // https: true
-      open: false
-      // opens browser window automatically
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
-    framework: {
-      lang: "pt-BR",
-      config: {
-        dark: "auto",
-        notify: {
-          position: "top-right"
-        }
-      },
-      // iconSet: 'material-icons', // Quasar icon set
-      // lang: 'en-US', // Quasar language pack
-      // For special cases outside of where the auto-import strategy can have an impact
-      // (like functional components as one of the examples),
-      // you can manually specify Quasar components/directives to be available everywhere:
-      //
-      // components: [],
-      // directives: [],
-      // Quasar plugins
-      plugins: ["Dialog", "Notify", "Loading", "Cookies", "Dark"]
-    },
-    // animations: 'all', // --- includes all animations
-    // https://v2.quasar.dev/options/animations
-    animations: [],
-    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
-    // sourceFiles: {
-    //   rootComponent: 'src/App.vue',
-    //   router: 'src/router/index',
-    //   store: 'src/store/index',
-    //   pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
-    //   pwaServiceWorker: 'src-pwa/custom-service-worker',
-    //   pwaManifestFile: 'src-pwa/manifest.json',
-    //   electronMain: 'src-electron/electron-main',
-    //   electronPreload: 'src-electron/electron-preload'
-    //   bexManifestFile: 'src-bex/manifest.json
-    // },
-    // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
-    ssr: {
-      prodPort: 3e3,
-      // The default port that the production server should use
-      // (gets superseded if process.env.PORT is specified at runtime)
-      middlewares: [
-        "render"
-        // keep this as last one
-      ],
-      // extendPackageJson (json) {},
-      // extendSSRWebserverConf (esbuildConf) {},
-      // manualStoreSerialization: true,
-      // manualStoreSsrContextInjection: true,
-      // manualStoreHydration: true,
-      // manualPostHydrationTrigger: true,
-      pwa: false
-      // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
-      // will mess up SSR
-      // pwaExtendGenerateSWOptions (cfg) {},
-      // pwaExtendInjectManifestOptions (cfg) {}
-    },
-    // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
-    pwa: {
-      workboxMode: "GenerateSW"
-      // 'GenerateSW' or 'InjectManifest'
-      // swFilename: 'sw.js',
-      // manifestFilename: 'manifest.json'
-      // extendManifestJson (json) {},
-      // useCredentialsForManifestTag: true,
-      // injectPwaMetaTags: false,
-      // extendPWACustomSWConf (esbuildConf) {},
-      // extendGenerateSWOptions (cfg) {},
-      // extendInjectManifestOptions (cfg) {}
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
-    cordova: {
-      // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
-    capacitor: {
-      hideSplashscreen: true
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
-    electron: {
-      // extendElectronMainConf (esbuildConf) {},
-      // extendElectronPreloadConf (esbuildConf) {},
-      // extendPackageJson (json) {},
-      // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
-      preloadScripts: ["electron-preload"],
-      // specify the debugging port to use for the Electron app when running in development mode
-      inspectPort: 5858,
-      bundler: "packager",
-      // 'packager' or 'builder'
-      packager: {
-        // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
-        // OS X / Mac App Store
-        // appBundleId: '',
-        // appCategoryType: '',
-        // osxSign: '',
-        // protocol: 'myapp://path',
-        // Windows only
-        // win32metadata: { ... }
-      },
-      builder: {
-        // https://www.electron.build/configuration/configuration
-        appId: "quasar-skeleton"
-      }
-    },
-    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
-    bex: {
-      // extendBexScriptsConf (esbuildConf) {},
-      // extendBexManifestJson (json) {},
-      contentScripts: ["my-content-script"]
-    }
-  };
-});
-export {
-  quasar_config_default as default
-};

+ 310 - 280
src/pages/LoginPage.vue

@@ -1,49 +1,39 @@
 <!-- eslint-disable @intlify/vue-i18n/no-raw-text -->
 <template>
   <q-page class="login-page bg-surface-dark">
-    <Transition name="fade-slide" mode="out-in">
-      <div v-if="!clicked" key="splash" class="splash-screen" @click="clicked = true">
-        <img
-          :src="BackgroundLogin"
-          class="splash-layer splash-layer--bg"
-        />
-
-        <img
-          :src="FotoDiarista"
-          class="splash-layer splash-layer--photo"
-        />
-
-        <img
-          :src="LogoLogin"
-          class="splash-layer splash-layer--logo"
-        />
+    <Transition mode="out-in" name="fade-slide">
+      <div
+        v-if="!clicked"
+        key="splash"
+        class="splash-screen"
+        @click="clicked = true"
+      >
+        <img class="splash-layer splash-layer--bg" :src="BackgroundLogin" />
+
+        <img class="splash-layer splash-layer--photo" :src="FotoDiarista" />
+
+        <img class="splash-layer splash-layer--logo" :src="LogoLogin" />
       </div>
 
-      
-
       <div v-else key="flow" class="flow-screen">
-
         <div
-            v-if="steps >= 4 && !showSubStep"
-            class="flow-header row items-center"
-          >
-            <q-btn
-              flat
-              round
-              dense
-              icon="mdi-arrow-left"
-              color="primary"
-              @click="goBack"
-            />
-          </div>
-        
-        <div v-if="!showSubStep" class="flow-logo q-my-xl">
-          <q-img
-            :src="LogoDiariaCampos"
-            style="max-width: 180px"
+          v-if="steps >= 4 && !showSubStep"
+          class="flow-header row items-center"
+        >
+          <q-btn
+            color="primary"
+            dense
+            flat
+            icon="mdi-arrow-left"
+            round
+            @click="goBack"
           />
         </div>
 
+        <div v-if="!showSubStep" class="flow-logo q-my-xl">
+          <q-img style="max-width: 180px" :src="LogoDiariaCampos" />
+        </div>
+
         <q-form
           v-if="!registrationCompleted"
           ref="loginForm"
@@ -64,10 +54,7 @@
               v-model:phone="phone"
             />
 
-            <LoginStepTwoPanel
-              v-else-if="steps === 2"
-              v-model:code="code"
-            />
+            <LoginStepTwoPanel v-else-if="steps === 2" v-model:code="code" />
 
             <LoginStepThreePanel
               v-else-if="steps === 3"
@@ -85,10 +72,7 @@
               v-model="stepFiveForm"
             />
 
-            <LoginStepSixPanel
-              v-else-if="steps === 6"
-              v-model="stepSixForm"
-            />
+            <LoginStepSixPanel v-else-if="steps === 6" v-model="stepSixForm" />
           </div>
 
           <div v-if="!showSubStep" class="flow-footer">
@@ -117,11 +101,11 @@
           />
 
           <div class="registration-complete__title text-text fontbold">
-            {{ t('provider.login.registration_complete.title') }}
+            {{ t("provider.login.registration_complete.title") }}
           </div>
 
           <div class="registration-complete__message text-grey-7 font12">
-            {{ t('provider.login.registration_complete.message') }}
+            {{ t("provider.login.registration_complete.message") }}
           </div>
         </div>
       </div>
@@ -130,104 +114,105 @@
 </template>
 
 <script setup>
-import { computed, onMounted, ref } from 'vue';
-import { createUserAndProvider, sendCode, validateCode } from 'src/api/user';
-import { useAuth } from 'src/composables/useAuth';
-import { useI18n } from 'vue-i18n';
-import { useQuasar } from 'quasar';
-import { useRouter } from 'vue-router';
-
-import BackgroundLogin from 'src/assets/background-login.svg';
-import FotoDiarista from 'src/assets/foto_diarista_login.svg';
-import LogoLogin from 'src/assets/logo_diaria_login.svg';
-import LogoDiariaCampos from 'src/assets/logo_diaria_campos_login.svg';
-
-import LoginStepOnePanel from 'src/components/login/LoginStepOnePanel.vue';
-import LoginStepTwoPanel from 'src/components/login/LoginStepTwoPanel.vue';
-import LoginStepThreePanel from 'src/components/login/LoginStepThreePanel.vue';
-import LoginStepFourPanel from 'src/components/login/LoginStepFourPanel.vue';
-import LoginStepFivePanel from 'src/components/login/LoginStepFivePanel.vue';
-import LoginStepSixPanel from 'src/components/login/LoginStepSixPanel.vue';
+import { computed, onMounted, ref } from "vue";
+import { createUserAndProvider, sendCode, validateCode } from "src/api/user";
+import { useAuth } from "src/composables/useAuth";
+import { useI18n } from "vue-i18n";
+import { useQuasar } from "quasar";
+import { useRouter } from "vue-router";
+
+import BackgroundLogin from "src/assets/background-login.svg";
+import FotoDiarista from "src/assets/foto_diarista_login.svg";
+import LogoDiariaCampos from "src/assets/logo_diaria_campos_login.svg";
+import LogoLogin from "src/assets/logo_diaria_login.svg";
+import LoginStepFivePanel from "src/components/login/LoginStepFivePanel.vue";
+import LoginStepFourPanel from "src/components/login/LoginStepFourPanel.vue";
+import LoginStepOnePanel from "src/components/login/LoginStepOnePanel.vue";
+import LoginStepSixPanel from "src/components/login/LoginStepSixPanel.vue";
+import LoginStepThreePanel from "src/components/login/LoginStepThreePanel.vue";
+import LoginStepTwoPanel from "src/components/login/LoginStepTwoPanel.vue";
 
-const { t } = useI18n();
 const $q = useQuasar();
 const router = useRouter();
 const { setAuthDataFromPayload } = useAuth();
+const { t } = useI18n();
 
 const clicked = ref(false);
-
-const showSubStep = ref(false);
-const registrationCompleted = ref(false);
-const steps = ref(1);
-const submitting = ref(false);
-const loginForm = ref(null);
+const code = ref("");
+const email = ref("");
 const isLogin = ref(false);
-const email = ref('');
-const phone = ref('');
-const code = ref('');
-
-const goBack = () => {
-  if (steps.value === 4) {
-    steps.value = 3;
-  } else if (steps.value === 5) {
-    steps.value = 4;
-  } else if (steps.value === 6) {
-    steps.value = 5;
-  }
-};
-
+const loginForm = ref(null);
+const phone = ref("");
+const registrationCompleted = ref(false);
+const showSubStep = ref(false);
 
-const stepThreeForm = ref({
-  name: '',
-  phone: '',
-  email: '',
-  rg: '',
-  document: '',
-  birth_date: '',
-  zip_code: '',
-  address: '',
-  complement: '',
-  no_complement: false,
-  city: '',
-  state: '',
-  address_type: 'home',
-  nickname: 'Principal',
-  instructions: '',
+const stepFiveForm = ref({
+  daily_price_2h: null,
+  daily_price_4h: null,
+  daily_price_6h: null,
+  daily_price_8h: null,
+  services_types_ids: [],
 });
 
 const stepFourForm = ref({
-  selfie: null,
-  document_front: null,
   document_back: null,
-});
-
-const stepFiveForm = ref({
-  daily_price_8h: null,
-  daily_price_6h: null,
-  daily_price_4h: null,
-  daily_price_2h: null,
-  services_types_ids: [],
+  document_front: null,
+  selfie: null,
 });
 
 const stepSixForm = ref({
-  account_type: 'checking',
-  bank: '',
-  branch_number: '',
-  branch_check_digit: '',
-  account_number: '',
-  account_check_digit: '',
-  pix_key: '',
+  account_check_digit: "",
+  account_number: "",
+  account_type: "checking",
+  bank: "",
+  branch_check_digit: "",
+  branch_number: "",
+  pix_key: "",
   working_days: {},
 });
 
+const stepThreeForm = ref({
+  address: "",
+  address_type: "home",
+  birth_date: "",
+  city: "",
+  complement: "",
+  document: "",
+  email: "",
+  instructions: "",
+  name: "",
+  nickname: "Principal",
+  no_complement: false,
+  phone: "",
+  rg: "",
+  state: "",
+  zip_code: "",
+});
+
+const steps = ref(1);
+
+const submitting = ref(false);
+
 const actionLabel = computed(() => {
-  if (steps.value === 1) return t('provider.login.steps.step_1.action');
-  if (steps.value === 2) return t('provider.login.steps.step_2.action');
-  if (steps.value === 6) return t('provider.login.steps.step_6.action');
+  if (steps.value === 1) return t("provider.login.steps.step_1.action");
+  if (steps.value === 2) return t("provider.login.steps.step_2.action");
+  if (steps.value === 6) return t("provider.login.steps.step_6.action");
 
-  return t('provider.login.steps.step_3.action');
+  return t("provider.login.steps.step_3.action");
 });
 
+const goBack = () => {
+  if (steps.value === 4) {
+    steps.value = 3;
+  } else if (steps.value === 5) {
+    steps.value = 4;
+  } else if (steps.value === 6) {
+    steps.value = 5;
+  }
+};
+
+const hasWorkingDaySelected = () => mapWorkingDays().length > 0;
+
 const mapWorkingDays = () => {
   const mapped = [];
 
@@ -235,92 +220,89 @@ const mapWorkingDays = () => {
 
   Object.entries(workingDays).forEach(([dayKey, periods]) => {
     if (periods?.morning) {
-      mapped.push({ day: Number(dayKey), period: 'morning' });
+      mapped.push({ day: Number(dayKey), period: "morning" });
     }
 
     if (periods?.afternoon) {
-      mapped.push({ day: Number(dayKey), period: 'afternoon' });
+      mapped.push({ day: Number(dayKey), period: "afternoon" });
     }
   });
 
   return mapped;
 };
 
-const hasWorkingDaySelected = () => {
-  return mapWorkingDays().length > 0;
-};
-
-const sendValidationCode = async () => {
-  const response = await sendCode(email.value, phone.value);
-
-  if (response.status === 201) {
-    steps.value = 2;
-  }
+const onSubmit = async () => {
+  if (registrationCompleted.value) return;
+  if (showSubStep.value) return;
 
-  return response;
-};
+  const isValid = await loginForm.value.validate();
 
-const toISODate = (value) => {
-  const matches = /^(\d{2})\/(\d{2})\/(\d{4})$/.exec(value || '');
+  if (!isValid) return;
 
-  if (!matches) return null;
+  submitting.value = true;
 
-  return `${matches[3]}-${matches[2]}-${matches[1]}`;
-};
+  try {
+    switch (steps.value) {
+      case 1: {
+        const response = await sendValidationCode();
 
-const validateCodeInput = async () => {
-  const response = await validateCode(email.value, phone.value, code.value, isLogin.value);
+        isLogin.value = response?.data?.payload?.isLogin === true;
 
-  if (response.status === 200) {
-    if (isLogin.value === true) {
-      await setAuthDataFromPayload(response.data.payload);
+        break;
+      }
 
-      router.push({ name: 'DashboardPage' });
+      case 2:
+        await validateCodeInput();
 
-      return;
-    }
+        break;
 
-    stepThreeForm.value.email = email.value;
-    stepThreeForm.value.phone = phone.value;
+      case 3: {
+        if (await validateCurrentStep()) {
+          steps.value = 4;
+        }
 
-    steps.value = 3;
-  }
-};
+        break;
+      }
 
-const validateCurrentStep = async () => {
-  const isValid = await loginForm.value?.validate();
+      case 4: {
+        if (await validateCurrentStep()) {
+          steps.value = 5;
+        }
 
-  if (!isValid) {
-    return false;
-  }
+        break;
+      }
 
-  if(steps.value === 4) {
-    const hasSelfie = !!stepFourForm.value.selfie;
+      case 5: {
+        if (await validateCurrentStep()) {
+          steps.value = 6;
+        }
 
-    const hasDocumentFront = !!stepFourForm.value.document_front;
+        break;
+      }
 
-    const hasDocumentBack = !!stepFourForm.value.document_back;
+      case 6: {
+        if (await validateCurrentStep()) {
+          await registerUserAndProvider();
+        }
 
-    if (!hasSelfie || !hasDocumentFront || !hasDocumentBack) {
-      $q.notify({
-        type: 'negative',
-        message: t('provider.login.steps.step_4.upload_all_photos'),
-      });
+        break;
+      }
 
-      return false;
+      default:
+        break;
     }
-  }
+  } catch (error) {
+    console.error(error);
 
-  if (steps.value === 6 && !hasWorkingDaySelected()) {
-    $q.notify({
-      type: 'negative',
-      message: t('provider.login.steps.step_6.select_at_least_one'),
-    });
+    const msg =
+      error?.response?.data?.message ??
+      error?.message ??
+      "Erro ao concluir cadastro. Tente novamente.";
 
-    return false;
+    $q.notify({ message: msg, type: "negative" });
+  } finally {
+    submitting.value = false;
   }
-
-  return true;
 };
 
 const registerUserAndProvider = async () => {
@@ -328,12 +310,17 @@ const registerUserAndProvider = async () => {
 
   const form = new FormData();
 
-  const hasValue = (val) => val !== null && val !== undefined && String(val).trim() !== '';
+  const hasValue = (val) =>
+    val !== null && val !== undefined && String(val).trim() !== "";
 
   const append = (key, val) => {
-    if (val === null || val === undefined || val === '') return;
-    if (typeof val === 'boolean') form.append(key, val ? '1' : '0');
-    else form.append(key, val);
+    if (val === null || val === undefined || val === "") return;
+
+    if (typeof val === "boolean") {
+      form.append(key, val ? "1" : "0");
+    } else {
+      form.append(key, val);
+    }
   };
 
   const appendIfFilled = (key, val) => {
@@ -342,43 +329,50 @@ const registerUserAndProvider = async () => {
     form.append(key, val);
   };
 
-  append('name', stepThreeForm.value.name);
-  append('email', stepThreeForm.value.email || email.value);
-  append('phone', stepThreeForm.value.phone || phone.value);
-  append('code', code.value);
-  append('rg', stepThreeForm.value.rg);
-  append('document', stepThreeForm.value.document);
-  append('birth_date', toISODate(stepThreeForm.value.birth_date));
-  append('zip_code', stepThreeForm.value.zip_code);
-  append('address', stepThreeForm.value.address);
-  append('has_complement', !stepThreeForm.value.no_complement);
-  append('complement', stepThreeForm.value.no_complement ? null : stepThreeForm.value.complement);
-  append('nickname', stepThreeForm.value.nickname);
-  append('instructions', stepThreeForm.value.instructions);
-  append('city', stepThreeForm.value.city);
-  append('state', stepThreeForm.value.state);
-  append('address_type', stepThreeForm.value.address_type);
-
-  append('daily_price_8h', Number(stepFiveForm.value.daily_price_8h));
-  append('daily_price_6h', Number(stepFiveForm.value.daily_price_6h));
-  append('daily_price_4h', Number(stepFiveForm.value.daily_price_4h));
-  append('daily_price_2h', Number(stepFiveForm.value.daily_price_2h));
-
-  (stepFiveForm.value.services_types_ids ?? []).forEach(id => form.append('services_types_ids[]', id));
-
-  workingDays.forEach((wd, i) => {
-    form.append(`working_days[${i}][day]`, wd.day);
-    form.append(`working_days[${i}][period]`, wd.period);
+  append("name", stepThreeForm.value.name);
+  append("email", stepThreeForm.value.email || email.value);
+  append("phone", stepThreeForm.value.phone || phone.value);
+  append("code", code.value);
+  append("rg", stepThreeForm.value.rg);
+  append("document", stepThreeForm.value.document);
+  append("birth_date", toISODate(stepThreeForm.value.birth_date));
+  append("zip_code", stepThreeForm.value.zip_code);
+  append("address", stepThreeForm.value.address);
+  append("has_complement", !stepThreeForm.value.no_complement);
+
+  append(
+    "complement",
+    stepThreeForm.value.no_complement ? null : stepThreeForm.value.complement,
+  );
+
+  append("nickname", stepThreeForm.value.nickname);
+  append("instructions", stepThreeForm.value.instructions);
+  append("city", stepThreeForm.value.city);
+  append("state", stepThreeForm.value.state);
+  append("address_type", stepThreeForm.value.address_type);
+
+  append("daily_price_8h", Number(stepFiveForm.value.daily_price_8h));
+  append("daily_price_6h", Number(stepFiveForm.value.daily_price_6h));
+  append("daily_price_4h", Number(stepFiveForm.value.daily_price_4h));
+  append("daily_price_2h", Number(stepFiveForm.value.daily_price_2h));
+
+  (stepFiveForm.value.services_types_ids ?? []).forEach((id) => {
+    form.append("services_types_ids[]", id);
+  });
+
+  workingDays.forEach((workingDay, index) => {
+    form.append(`working_days[${index}][day]`, workingDay.day);
+    form.append(`working_days[${index}][period]`, workingDay.period);
   });
 
-  form.append('selfie', stepFourForm.value.selfie);
-  form.append('document_front', stepFourForm.value.document_front);
-  form.append('document_back', stepFourForm.value.document_back);
+  form.append("selfie", stepFourForm.value.selfie);
+  form.append("document_front", stepFourForm.value.document_front);
+  form.append("document_back", stepFourForm.value.document_back);
 
-  append('recipient_name', stepThreeForm.value.name);
-  append('recipient_email', stepThreeForm.value.email || email.value);
-  append('recipient_document', stepThreeForm.value.document);
-  append('recipient_type', 'individual');
+  append("recipient_name", stepThreeForm.value.name);
+  append("recipient_email", stepThreeForm.value.email || email.value);
+  append("recipient_document", stepThreeForm.value.document);
+  append("recipient_type", "individual");
 
   const hasBankAccountData = [
     stepSixForm.value.bank,
@@ -388,17 +382,50 @@ const registerUserAndProvider = async () => {
   ].every(hasValue);
 
   if (hasBankAccountData) {
-    append('recipient_payment_mode', 'bank_transfer');
-    append('recipient_default_bank_account[type]', stepSixForm.value.account_type);
-    append('recipient_default_bank_account[bank]', stepSixForm.value.bank);
-    append('recipient_default_bank_account[branch_number]', stepSixForm.value.branch_number);
-    appendIfFilled('recipient_default_bank_account[branch_check_digit]', stepSixForm.value.branch_check_digit);
-    append('recipient_default_bank_account[account_number]', stepSixForm.value.account_number);
-    append('recipient_default_bank_account[account_check_digit]', stepSixForm.value.account_check_digit);
-    appendIfFilled('recipient_default_bank_account[pix_key]', stepSixForm.value.pix_key);
-    append('recipient_default_bank_account[holder_name]', stepThreeForm.value.name);
-    append('recipient_default_bank_account[holder_document]', stepThreeForm.value.document);
-    append('recipient_default_bank_account[holder_type]', 'individual');
+    append("recipient_payment_mode", "bank_transfer");
+    append(
+      "recipient_default_bank_account[type]",
+      stepSixForm.value.account_type,
+    );
+
+    append("recipient_default_bank_account[bank]", stepSixForm.value.bank);
+
+    append(
+      "recipient_default_bank_account[branch_number]",
+      stepSixForm.value.branch_number,
+    );
+
+    appendIfFilled(
+      "recipient_default_bank_account[branch_check_digit]",
+      stepSixForm.value.branch_check_digit,
+    );
+
+    append(
+      "recipient_default_bank_account[account_number]",
+      stepSixForm.value.account_number,
+    );
+
+    append(
+      "recipient_default_bank_account[account_check_digit]",
+      stepSixForm.value.account_check_digit,
+    );
+
+    appendIfFilled(
+      "recipient_default_bank_account[pix_key]",
+      stepSixForm.value.pix_key,
+    );
+
+    append(
+      "recipient_default_bank_account[holder_name]",
+      stepThreeForm.value.name,
+    );
+
+    append(
+      "recipient_default_bank_account[holder_document]",
+      stepThreeForm.value.document,
+    );
+
+    append("recipient_default_bank_account[holder_type]", "individual");
   }
 
   const response = await createUserAndProvider(form);
@@ -408,75 +435,77 @@ const registerUserAndProvider = async () => {
   }
 };
 
-const onSubmit = async () => {
-  if (registrationCompleted.value) return;
-  if (showSubStep.value) return; // Não submete o form principal se estiver em um sub-passo
-
-  const isValid = await loginForm.value.validate();
-
-  if (!isValid) return;
+const sendValidationCode = async () => {
+  const response = await sendCode(email.value, phone.value);
 
-  submitting.value = true;
+  if (response.status === 201) {
+    steps.value = 2;
+  }
 
-  try {
-    switch (steps.value) {
-      case 1: {
-        const response = await sendValidationCode();
+  return response;
+};
 
-        isLogin.value = response?.data?.payload?.isLogin === true;
+const toISODate = (value) => {
+  const matches = /^(\d{2})\/(\d{2})\/(\d{4})$/.exec(value || "");
 
-        break;
-      }
+  if (!matches) return null;
 
-      case 2:
-        await validateCodeInput();
+  return `${matches[3]}-${matches[2]}-${matches[1]}`;
+};
 
-        break;
+const validateCodeInput = async () => {
+  const response = await validateCode(
+    email.value,
+    phone.value,
+    code.value,
+    isLogin.value,
+  );
 
-      case 3: {
-        if (await validateCurrentStep()) {
-          steps.value = 4;
-        }
+  if (response.status === 200) {
+    if (isLogin.value === true) {
+      await setAuthDataFromPayload(response.data.payload);
 
-        break;
-      }
+      router.push({ name: "DashboardPage" });
 
-      case 4: {
-        if (await validateCurrentStep()) {
-          steps.value = 5;
-        }
+      return;
+    }
 
-        break;
-      }
+    stepThreeForm.value.email = email.value;
+    stepThreeForm.value.phone = phone.value;
+    steps.value = 3;
+  }
+};
 
-      case 5: {
-        if (await validateCurrentStep()) {
-          steps.value = 6;
-        }
+const validateCurrentStep = async () => {
+  const isValid = await loginForm.value?.validate();
 
-        break;
-      }
+  if (!isValid) return false;
 
-      case 6: {
-        if (await validateCurrentStep()) {
-          await registerUserAndProvider();
-        }
+  if (steps.value === 4) {
+    const hasDocumentBack = !!stepFourForm.value.document_back;
+    const hasDocumentFront = !!stepFourForm.value.document_front;
+    const hasSelfie = !!stepFourForm.value.selfie;
 
-        break;
-      }
+    if (!hasSelfie || !hasDocumentFront || !hasDocumentBack) {
+      $q.notify({
+        message: t("provider.login.steps.step_4.upload_all_photos"),
+        type: "negative",
+      });
 
-      default:
-        break;
+      return false;
     }
-  } catch (error) {
-    console.error(error);
+  }
 
-    const msg = error?.response?.data?.message ?? error?.message ?? 'Erro ao concluir cadastro. Tente novamente.';
+  if (steps.value === 6 && !hasWorkingDaySelected()) {
+    $q.notify({
+      message: t("provider.login.steps.step_6.select_at_least_one"),
+      type: "negative",
+    });
 
-    $q.notify({ type: 'negative', message: msg });
-  } finally {
-    submitting.value = false;
+    return false;
   }
+
+  return true;
 };
 
 onMounted(() => {
@@ -485,11 +514,12 @@ onMounted(() => {
   }, 1500);
 });
 </script>
-
 <style lang="scss" scoped>
 .fade-slide-enter-active,
 .fade-slide-leave-active {
-  transition: opacity 0.35s ease, transform 0.35s ease;
+  transition:
+    opacity 0.35s ease,
+    transform 0.35s ease;
 }
 .fade-slide-enter-from {
   opacity: 0;
@@ -606,4 +636,4 @@ onMounted(() => {
     line-height: 1.45;
   }
 }
-</style>
+</style>