diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index 1cf15ae26..000000000
--- a/.dockerignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.dockerignore
-.gitignore
-*.md
-.git/
-.idea/
-.DS_Store/
-docker-compose.*
-LICENSE
-nginx.conf
-yarn.lock
diff --git a/.env.example b/.env.example
index c8d4e223d..710dadf6f 100644
--- a/.env.example
+++ b/.env.example
@@ -2,14 +2,14 @@ APP_ENV=production
APP_KEY=base64:kgk/4DW1vEVy7aEvet5FPp5un6PIGe/so8H0mvoUtW0=
APP_DEBUG=true
APP_LOG_LEVEL=debug
-APP_URL=http://crater.test
+APP_URL=http://invoiceshelf.test
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
-DB_DATABASE=crater
-DB_USERNAME=crater
-DB_PASSWORD="crater"
+DB_DATABASE=invoiceshelf
+DB_USERNAME=invoiceshelf
+DB_PASSWORD="invoiceshelf"
BROADCAST_DRIVER=log
CACHE_DRIVER=file
@@ -28,12 +28,15 @@ MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=
+MAIL_FROM_NAME=
+MAIL_FROM_ADDRESS=
+
PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
-SANCTUM_STATEFUL_DOMAINS=crater.test
-SESSION_DOMAIN=crater.test
+SANCTUM_STATEFUL_DOMAINS=invoiceshelf.test
+SESSION_DOMAIN=invoiceshelf.test
TRUSTED_PROXIES="*"
diff --git a/.env.testing b/.env.testing
index d5e8caba1..4fd02cf32 100644
--- a/.env.testing
+++ b/.env.testing
@@ -9,5 +9,5 @@ MAIL_PORT=587
MAIL_USERNAME=ff538f0e1037f4
MAIL_PASSWORD=c04c81145fcb73
MAIL_ENCRYPTION=tls
-MAIL_FROM_ADDRESS="admin@craterapp.com"
+MAIL_FROM_ADDRESS="admin@invoiceshelf.com"
MAIL_FROM_NAME="John Doe"
diff --git a/.eslintrc.js b/.eslintrc.mjs
similarity index 100%
rename from .eslintrc.js
rename to .eslintrc.mjs
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 27d98cb99..7775212c2 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -17,7 +17,7 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Please complete the following information:**
-- Crater version:
+- InvoiceShelf version:
- PHP version:
- Database type and version:
diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml
new file mode 100644
index 000000000..ec8784d86
--- /dev/null
+++ b/.github/workflows/check.yaml
@@ -0,0 +1,139 @@
+name: Check
+
+# Run this workflow every time a new commit pushed to your repository
+on:
+ push:
+ paths-ignore:
+ - '**/*.md'
+ - 'public/build/*.js'
+ - 'public/build/**/*.js'
+ pull_request:
+ paths-ignore:
+ - '**/*.md'
+ - 'public/build/*.js'
+ - 'public/build/**/*.js'
+ # Allow manually triggering the workflow.
+ workflow_dispatch:
+
+jobs:
+ kill_previous:
+ name: 0️⃣ Kill previous runs
+ runs-on: ubuntu-latest
+ # We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
+ steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.12.1
+ with:
+ access_token: ${{ github.token }}
+
+ php_syntax_errors:
+ name: 1️⃣ PHP Code Style errors
+ runs-on: ubuntu-latest
+ needs:
+ - kill_previous
+ steps:
+ - name: Set up PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 8.2
+
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Install dependencies
+ uses: ramsey/composer-install@v2
+
+ - name: Check source code for syntax errors
+ run: ./vendor/bin/pint --test
+
+ tests:
+ name: 2️⃣ PHP ${{ matrix.php-version }} Tests
+ needs:
+ - php_syntax_errors
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-version:
+ - 8.2
+ - 8.3
+ env:
+ extensions: bcmath, curl, dom, gd, imagick, json, libxml, mbstring, pcntl, pdo, pdo_mysql, zip
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Setup PHP Action
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-version }}
+ extensions: ${{ env.extensions }}
+ coverage: xdebug
+ tools: pecl, composer
+
+ - name: Install Composer dependencies
+ uses: ramsey/composer-install@v2
+
+ - name: Use Node.js 20
+ uses: actions/setup-node@v3
+ with:
+ node-version: 20
+
+ - name: Install
+ run: npm install
+
+ - name: Compile Front-end
+ run: npm run build
+
+ - name: Apply tests ${{ matrix.php-version }}
+ run: php artisan test
+
+ createReleaseFile:
+ name: 3️⃣ Build / Upload - Release File
+ if: github.ref_type == 'tag'
+ needs:
+ - tests
+ runs-on: ubuntu-latest
+ env:
+ extensions: bcmath, curl, dom, gd, imagick, json, libxml, mbstring, pcntl, pdo, pdo_mysql, zip
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 8.2
+ extensions: ${{ env.extensions }}
+ coverage: none
+
+ - name: Install Composer dependencies
+ uses: ramsey/composer-install@v2
+ with:
+ composer-options: --no-dev
+
+ - name: Use Node.js 20
+ uses: actions/setup-node@v3
+ with:
+ node-version: 20
+
+ - name: Install
+ run: npm install
+
+ - name: Compile Front-end
+ run: npm run build
+
+ - name: Build Dist
+ run: |
+ make clean dist
+
+ - name: Upload package
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ github.token }}
+ file: InvoiceShelf.zip
+ asset_name: InvoiceShelf.zip
+ tag: ${{ github.ref }}
+ overwrite: true
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
deleted file mode 100644
index c76c05403..000000000
--- a/.github/workflows/ci.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: CI
-
-on: [push, pull_request]
-
-jobs:
- build-test:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- php: ['7.4', '8.0']
-
- name: PHP ${{ matrix.php }}
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Install dependencies
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php }}
- extensions: exif
-
- - name: Install PHP 7 dependencies
- run: composer update --no-interaction --no-progress
- if: "matrix.php < 8"
-
- - name: Install PHP 8 dependencies
- run: composer update --ignore-platform-req=php --no-interaction --no-progress
- if: "matrix.php >= 8"
-
- - name: Check coding style
- run: ./vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no --config=.php-cs-fixer.dist.php
-
- - name: Unit Tests
- run: php ./vendor/bin/pest
diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml
deleted file mode 100644
index 96fbd9d26..000000000
--- a/.github/workflows/uffizzi-build.yml
+++ /dev/null
@@ -1,161 +0,0 @@
-name: Build PR Image
-on:
- pull_request:
- types: [opened,synchronize,reopened,closed]
-
-jobs:
-
- build-application:
- name: Build and Push `application`
- runs-on: ubuntu-latest
- if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }}
- outputs:
- tags: ${{ steps.meta.outputs.tags }}
- steps:
- - name: Checkout git repo
- uses: actions/checkout@v3
- - name: Generate UUID image name
- id: uuid
- run: echo "UUID_TAG_APP=$(uuidgen)" >> $GITHUB_ENV
- - name: Docker metadata
- id: meta
- uses: docker/metadata-action@v3
- with:
- images: registry.uffizzi.com/${{ env.UUID_TAG_APP }}
- tags: type=raw,value=60d
- - name: Build and Push Image to registry.uffizzi.com ephemeral registry
- uses: docker/build-push-action@v2
- with:
- push: true
- context: ./
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- file: ./uffizzi/Dockerfile
-
- build-nginx:
- needs:
- - build-application
- name: Build and Push `nginx`
- runs-on: ubuntu-latest
- if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }}
- outputs:
- tags: ${{ steps.meta.outputs.tags }}
- steps:
- - name: Checkout git repo
- uses: actions/checkout@v3
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
- - name: Generate UUID image name
- id: uuid
- run: echo "UUID_TAG_NGINX=$(uuidgen)" >> $GITHUB_ENV
- - name: Docker metadata
- id: meta
- uses: docker/metadata-action@v3
- with:
- images: registry.uffizzi.com/${{ env.UUID_TAG_NGINX }}
- tags: type=raw,value=60d
- - name: Build and Push Image to Uffizzi ephemeral registry
- uses: docker/build-push-action@v2
- with:
- push: true
- context: ./
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- file: ./uffizzi/nginx/Dockerfile
- build-args: |
- BASE_IMAGE=${{ needs.build-application.outputs.tags }}
- cache-from: type=gha
- cache-to: type=gha,mode=max
-
-
- build-crond:
- name: Build and Push `crond`
- runs-on: ubuntu-latest
- if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }}
- outputs:
- tags: ${{ steps.meta.outputs.tags }}
- steps:
- - name: Checkout git repo
- uses: actions/checkout@v3
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
- - name: Generate UUID image name
- id: uuid
- run: echo "UUID_TAG_CROND=$(uuidgen)" >> $GITHUB_ENV
- - name: Docker metadata
- id: meta
- uses: docker/metadata-action@v3
- with:
- images: registry.uffizzi.com/${{ env.UUID_TAG_CROND }}
- tags: type=raw,value=60d
- - name: Build and Push Image to registry.uffizzi.com ephemeral registry
- uses: docker/build-push-action@v2
- with:
- push: true
- context: ./
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- file: ./uffizzi/crond/Dockerfile
- cache-from: type=gha
- cache-to: type=gha,mode=max
-
-
-
- render-compose-file:
- name: Render Docker Compose File
- # Pass output of this workflow to another triggered by `workflow_run` event.
- runs-on: ubuntu-latest
- outputs:
- compose-file-cache-key: ${{ steps.hash.outputs.hash }}
- needs:
- - build-application
- - build-nginx
- - build-crond
- steps:
- - name: Checkout git repo
- uses: actions/checkout@v3
- - name: Render Compose File
- run: |
- APP_IMAGE=$(echo ${{ needs.build-application.outputs.tags }})
- export APP_IMAGE
- NGINX_IMAGE=$(echo ${{ needs.build-nginx.outputs.tags }})
- export NGINX_IMAGE
- CROND_IMAGE=$(echo ${{ needs.build-crond.outputs.tags }})
- export CROND_IMAGE
- # Render simple template from environment variables.
- envsubst < ./uffizzi/docker-compose.uffizzi.yml > docker-compose.rendered.yml
- cat docker-compose.rendered.yml
- - name: Upload Rendered Compose File as Artifact
- uses: actions/upload-artifact@v3
- with:
- name: preview-spec
- path: docker-compose.rendered.yml
- retention-days: 2
- - name: Serialize PR Event to File
- run: |
- cat << EOF > event.json
- ${{ toJSON(github.event) }}
-
- EOF
- - name: Upload PR Event as Artifact
- uses: actions/upload-artifact@v3
- with:
- name: preview-spec
- path: event.json
- retention-days: 2
-
- delete-preview:
- name: Call for Preview Deletion
- runs-on: ubuntu-latest
- if: ${{ github.event.action == 'closed' }}
- steps:
- # If this PR is closing, we will not render a compose file nor pass it to the next workflow.
- - name: Serialize PR Event to File
- run: echo '${{ toJSON(github.event) }}' > event.json
- - name: Upload PR Event as Artifact
- uses: actions/upload-artifact@v3
- with:
- name: preview-spec
- path: event.json
- retention-days: 2
-
diff --git a/.github/workflows/uffizzi-preview.yml b/.github/workflows/uffizzi-preview.yml
deleted file mode 100644
index 4e35f594a..000000000
--- a/.github/workflows/uffizzi-preview.yml
+++ /dev/null
@@ -1,84 +0,0 @@
-name: Deploy Uffizzi Preview
-
-on:
- workflow_run:
- workflows:
- - "Build PR Image"
- types:
- - completed
-
-
-jobs:
- cache-compose-file:
- name: Cache Compose File
- runs-on: ubuntu-latest
- outputs:
- compose-file-cache-key: ${{ env.COMPOSE_FILE_HASH }}
- pr-number: ${{ env.PR_NUMBER }}
- steps:
- - name: 'Download artifacts'
- # Fetch output (zip archive) from the workflow run that triggered this workflow.
- uses: actions/github-script@v6
- with:
- script: |
- let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
- owner: context.repo.owner,
- repo: context.repo.repo,
- run_id: context.payload.workflow_run.id,
- });
- let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
- return artifact.name == "preview-spec"
- })[0];
- let download = await github.rest.actions.downloadArtifact({
- owner: context.repo.owner,
- repo: context.repo.repo,
- artifact_id: matchArtifact.id,
- archive_format: 'zip',
- });
- let fs = require('fs');
- fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/preview-spec.zip`, Buffer.from(download.data));
- - name: 'Unzip artifact'
- run: unzip preview-spec.zip
- - name: Read Event into ENV
- run: |
- echo 'EVENT_JSON< ", "", $str);
+ $str = str_replace(' ', '', $str);
- $str = str_replace("
{const p=g.getSortableValue(n),x=d.getSortableValue(n);return t==="desc"?x.localeCompare(p):p.localeCompare(x)}}getSortFieldName(){return this.sortBy||this.key}}const ne={props:{pagination:{type:Object,default:()=>({})}},computed:{pages(){return this.pagination.totalPages===void 0?[]:this.pageLinks()},hasFirst(){return this.pagination.currentPage>=4||this.pagination.totalPages<10},hasLast(){return this.pagination.currentPage<=this.pagination.totalPages-3||this.pagination.totalPages<10},hasFirstEllipsis(){return this.pagination.currentPage>=4&&this.pagination.totalPages>=10},hasLastEllipsis(){return this.pagination.currentPage<=this.pagination.totalPages-3&&this.pagination.totalPages>=10},shouldShowPagination(){return this.pagination.totalPages===void 0||this.pagination.count===0?!1:this.pagination.totalPages>1}},methods:{isActive(a){return(this.pagination.currentPage||1)===a},pageClicked(a){a==="..."||a===this.pagination.currentPage||a>this.pagination.totalPages||a<1||this.$emit("pageChange",a)},pageLinks(){const a=[];let t=2,e=this.pagination.totalPages-1;this.pagination.totalPages>=10&&(t=Math.max(1,this.pagination.currentPage-2),e=Math.min(this.pagination.currentPage+2,this.pagination.totalPages));for(let n=t;n<=e;n++)a.push(n);return a}}},re={key:0,class:"flex items-center justify-between px-4 py-3 bg-white border-t border-gray-200 sm:px-6"},ie={class:"flex justify-between flex-1 sm:hidden"},se={class:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"},le={class:"text-sm text-gray-700"},oe=_(" Showing "+h(" ")+" "),de={key:0,class:"font-medium"},ge=_(" "+h(" ")+" to "+h(" ")+" "),ue={key:1,class:"font-medium"},ce={key:0},he={key:1},ye=_(" "+h(" ")+" of "+h(" ")+" "),fe={key:2,class:"font-medium"},me=_(" "+h(" ")+" results "),pe={class:"relative z-0 inline-flex -space-x-px rounded-md shadow-sm","aria-label":"Pagination"},be=u("span",{class:"sr-only"},"Previous",-1),xe={key:1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300"},ve=["onClick"],ke={key:2,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300"},Ce=u("span",{class:"sr-only"},"Next",-1);function Pe(a,t,e,n,b,l){const g=T("BaseIcon");return l.shouldShowPagination?(i(),s("div",re,[u("div",ie,[u("a",{href:"#",class:c([{"disabled cursor-normal pointer-events-none !bg-gray-100 !text-gray-400":e.pagination.currentPage===1},"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"]),onClick:t[0]||(t[0]=d=>l.pageClicked(e.pagination.currentPage-1))}," Previous ",2),u("a",{href:"#",class:c([{"disabled cursor-default pointer-events-none !bg-gray-100 !text-gray-400":e.pagination.currentPage===e.pagination.totalPages},"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"]),onClick:t[1]||(t[1]=d=>l.pageClicked(e.pagination.currentPage+1))}," Next ",2)]),u("div",se,[u("div",null,[u("p",le,[oe,e.pagination.limit&&e.pagination.currentPage?(i(),s("span",de,h(e.pagination.currentPage*e.pagination.limit-(e.pagination.limit-1)),1)):m("",!0),ge,e.pagination.limit&&e.pagination.currentPage?(i(),s("span",ue,[e.pagination.currentPage*e.pagination.limit<=e.pagination.totalCount?(i(),s("span",ce,h(e.pagination.currentPage*e.pagination.limit),1)):(i(),s("span",he,h(e.pagination.totalCount),1))])):m("",!0),ye,e.pagination.totalCount?(i(),s("span",fe,h(e.pagination.totalCount),1)):m("",!0),me])]),u("div",null,[u("nav",pe,[u("a",{href:"#",class:c([{"disabled cursor-normal pointer-events-none !bg-gray-100 !text-gray-400":e.pagination.currentPage===1},"relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md hover:bg-gray-50"]),onClick:t[2]||(t[2]=d=>l.pageClicked(e.pagination.currentPage-1))},[be,k(g,{name:"ChevronLeftIcon"})],2),l.hasFirst?(i(),s("a",{key:0,href:"#","aria-current":"page",class:c([{"z-10 bg-primary-50 border-primary-500 text-primary-600":l.isActive(1),"bg-white border-gray-300 text-gray-500 hover:bg-gray-50":!l.isActive(1)},"relative inline-flex items-center px-4 py-2 text-sm font-medium border"]),onClick:t[3]||(t[3]=d=>l.pageClicked(1))}," 1 ",2)):m("",!0),l.hasFirstEllipsis?(i(),s("span",xe," ... ")):m("",!0),(i(!0),s(C,null,P(l.pages,d=>(i(),s("a",{key:d,href:"#",class:c([{"z-10 bg-primary-50 border-primary-500 text-primary-600":l.isActive(d),"bg-white border-gray-300 text-gray-500 hover:bg-gray-50":!l.isActive(d),disabled:d==="..."},"relative items-center hidden px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 hover:bg-gray-50 md:inline-flex"]),onClick:p=>l.pageClicked(d)},h(d),11,ve))),128)),l.hasLastEllipsis?(i(),s("span",ke," ... ")):m("",!0),l.hasLast?(i(),s("a",{key:3,href:"#","aria-current":"page",class:c([{"z-10 bg-primary-50 border-primary-500 text-primary-600":l.isActive(e.pagination.totalPages),"bg-white border-gray-300 text-gray-500 hover:bg-gray-50":!l.isActive(e.pagination.totalPages)},"relative inline-flex items-center px-4 py-2 text-sm font-medium border"]),onClick:t[4]||(t[4]=d=>l.pageClicked(e.pagination.totalPages))},h(e.pagination.totalPages),3)):m("",!0),u("a",{href:"#",class:c(["relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md hover:bg-gray-50",{"disabled cursor-default pointer-events-none !bg-gray-100 !text-gray-400":e.pagination.currentPage===e.pagination.totalPages}]),onClick:t[5]||(t[5]=d=>l.pageClicked(e.pagination.currentPage+1))},[Ce,k(g,{name:"ChevronRightIcon"})],2)])])])])):m("",!0)}var _e=Z(ne,[["render",Pe]]);const we={class:"flex flex-col"},Se={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8 pb-4 lg:pb-0"},Te={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Ne={class:"relative overflow-hidden bg-white border-b border-gray-200 shadow sm:rounded-lg"},Be=["onClick"],Fe={key:0,class:"asc-direction"},Ae={key:1,class:"desc-direction"},Le={key:0},Ve={key:1},Ie={key:0,class:"absolute top-0 left-0 z-10 flex items-center justify-center w-full h-full bg-white bg-opacity-60"},De={key:1,class:"text-center text-gray-500 pb-2 flex h-[160px] justify-center items-center flex-col"},Me={class:"block mt-1"},Re={props:{columns:{type:Array,required:!0},data:{type:[Array,Function],required:!0},sortBy:{type:String,default:""},sortOrder:{type:String,default:""},tableClass:{type:String,default:"min-w-full divide-y divide-gray-200"},theadClass:{type:String,default:"bg-gray-50"},tbodyClass:{type:String,default:""},noResultsMessage:{type:String,default:"No Results Found"},loading:{type:Boolean,default:!1},loadingType:{type:String,default:"placeholder",validator:function(a){return["placeholder","spinner"].indexOf(a)!==-1}},placeholderCount:{type:Number,default:3}},setup(a,{expose:t}){const e=a;let n=N([]),b=F(!1),l=N(e.columns.map(r=>new ae(r))),g=N({fieldName:"",order:""}),d=F("");const p=A(()=>Array.isArray(e.data)),x=A(()=>{if(!p.value||g.fieldName===""||l.length===0)return n.value;const r=I(g.fieldName);return r?[...n.value].sort(r.getSortPredicate(g.order,l)):n.value});function I(r){return l.find(o=>o.key===r)}function D(r){let o="whitespace-nowrap px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider";return r.defaultThClass&&(o=r.defaultThClass),r.sortable?o=`${o} cursor-pointer`:o=`${o} pointer-events-none`,r.thClass&&(o=`${o} ${r.thClass}`),o}function B(r){let o="px-6 py-4 text-sm text-gray-500 whitespace-nowrap";return r.defaultTdClass&&(o=r.defaultTdClass),r.tdClass&&(o=`${o} ${r.tdClass}`),o}function M(r){let o="w-full";return r.placeholderClass&&(o=`${o} ${r.placeholderClass}`),o}function z(){return d.value=null,e.data}async function E(){const r=d.value&&d.value.currentPage||1;b.value=!0;const o=await e.data({sort:g,page:r});return b.value=!1,d.value=o.pagination,o.data}function R(r){g.fieldName!==r.key?(g.fieldName=r.key,g.order="asc"):g.order=g.order==="asc"?"desc":"asc",p.value||w()}async function w(){const r=p.value?z():await E();n.value=r.map(o=>new te(o,l))}async function j(r){d.value.currentPage=r,await w()}async function Y(){await w()}function H(r,o){return U.exports.get(r,o)}return p.value&&J(()=>e.data,()=>{w()}),K(async()=>{await w()}),t({refresh:Y}),(r,o)=>{const q=T("base-content-placeholders-text"),W=T("base-content-placeholders"),G=T("BaseIcon");return i(),s("div",we,[u("div",Se,[u("div",Te,[u("div",Ne,[L(r.$slots,"header"),u("table",{class:c(a.tableClass)},[u("thead",{class:c(a.theadClass)},[u("tr",null,[(i(!0),s(C,null,P(y(l),f=>(i(),s("th",{key:f.key,class:c([D(f),{"text-bold text-black":y(g).fieldName===f.key}]),onClick:v=>R(f)},[_(h(f.label)+" ",1),y(g).fieldName===f.key&&y(g).order==="asc"?(i(),s("span",Fe," \u2191 ")):m("",!0),y(g).fieldName===f.key&&y(g).order==="desc"?(i(),s("span",Ae," \u2193 ")):m("",!0)],10,Be))),128))])],2),a.loadingType==="placeholder"&&(a.loading||y(b))?(i(),s("tbody",Le,[(i(!0),s(C,null,P(a.placeholderCount,f=>(i(),s("tr",{key:f,class:c(f%2==0?"bg-white":"bg-gray-50")},[(i(!0),s(C,null,P(a.columns,v=>(i(),s("td",{key:v.key,class:c(["",B(v)])},[k(W,{class:c(M(v)),rounded:!0},{default:Q(()=>[k(q,{class:"w-full h-6",lines:1})]),_:2},1032,["class"])],2))),128))],2))),128))])):(i(),s("tbody",Ve,[(i(!0),s(C,null,P(y(x),(f,v)=>(i(),s("tr",{key:v,class:c(v%2==0?"bg-white":"bg-gray-50")},[(i(!0),s(C,null,P(a.columns,S=>(i(),s("td",{key:S.key,class:c(["",B(S)])},[L(r.$slots,"cell-"+S.key,{row:f},()=>[_(h(H(f.data,S.key)),1)])],2))),128))],2))),128))]))],2),a.loadingType==="spinner"&&(a.loading||y(b))?(i(),s("div",Ie,[k($,{class:"w-10 h-10 text-primary-500"})])):!a.loading&&!y(b)&&y(x)&&y(x).length===0?(i(),s("div",De,[k(G,{name:"ExclamationCircleIcon",class:"w-6 h-6 text-gray-400"}),u("span",Me,h(a.noResultsMessage),1)])):m("",!0),y(d)?(i(),X(_e,{key:2,pagination:y(d),onPageChange:j},null,8,["pagination"])):m("",!0)])])])])}}};export{Re as default};
diff --git a/public/build/assets/CapsuleIcon.37dfa933.js b/public/build/assets/CapsuleIcon.37dfa933.js
deleted file mode 100644
index a06fd2eb8..000000000
--- a/public/build/assets/CapsuleIcon.37dfa933.js
+++ /dev/null
@@ -1 +0,0 @@
-import{o as d,e as i,h as l,m as C}from"./vendor.d12b5734.js";const o={width:"118",height:"110",viewBox:"0 0 118 110",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r={"clip-path":"url(#clip0)"},n=l("defs",null,[l("clipPath",{id:"clip0"},[l("rect",{width:"117.333",height:"110",fill:"white"})])],-1),s={props:{primaryFillColor:{type:String,default:"fill-primary-500"},secondaryFillColor:{type:String,default:"fill-gray-600"}},setup(e){return(a,c)=>(d(),i("svg",o,[l("g",r,[l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M58.6672 32.9999C42.1415 32.9999 32.973 28.5119 32.5898 28.3194L33.4093 26.6804C33.4992 26.7244 42.6127 31.1666 58.6672 31.1666C74.542 31.1666 83.8388 26.7208 83.9323 26.6768L84.7354 28.3231C84.3449 28.5156 74.9618 32.9999 58.6672 32.9999Z",class:C(e.primaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M25.2438 39.0117L28.4191 40.8451C28.839 41.0871 29.1415 41.4831 29.2698 41.9597C29.3963 42.4346 29.3321 42.9296 29.0901 43.3494L14.4235 68.7521C14.099 69.3167 13.4866 69.6669 12.8248 69.6669C12.504 69.6669 12.1978 69.5844 11.9191 69.4231L8.74382 67.5897L7.82715 69.1774L11.0025 71.0107C11.5763 71.3426 12.2051 71.5002 12.8248 71.5002C14.0953 71.5002 15.3346 70.8421 16.0111 69.6687L30.6778 44.2661C31.6861 42.5189 31.083 40.2657 29.3358 39.2574L26.1605 37.4241L25.2438 39.0117Z",class:C(e.primaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M91.1729 37.4241L87.9976 39.2574C86.2504 40.2657 85.6472 42.5189 86.6556 44.2661L101.322 69.6687C101.999 70.8421 103.238 71.5002 104.509 71.5002C105.128 71.5002 105.757 71.3426 106.331 71.0107L109.506 69.1774L108.59 67.5897L105.414 69.4231C105.139 69.5826 104.826 69.6669 104.509 69.6669C103.847 69.6669 103.234 69.3167 102.91 68.7521L88.2432 43.3494C88.0012 42.9296 87.9371 42.4346 88.0636 41.9597C88.1919 41.4831 88.4944 41.0871 88.9142 40.8451L92.0896 39.0117L91.1729 37.4241Z",class:C(e.primaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M115.5 84.3333V87.6993C115.5 89.2797 114.424 90.6308 112.88 90.9883C112.013 91.19 111.049 91.4393 109.96 91.7198C102.573 93.6228 88.8268 97.1667 58.6667 97.1667C28.292 97.1667 14.6942 93.6338 7.38833 91.7345C6.29383 91.4503 5.324 91.1992 4.44767 90.9938C2.90767 90.6363 1.83333 89.2833 1.83333 87.7067V84.3333L0 82.5V87.7067C0 90.134 1.66833 92.2295 4.0315 92.7795C10.9322 94.3873 23.6812 99 58.6667 99C93.3478 99 106.372 94.3818 113.296 92.7758C115.661 92.2258 117.333 90.1285 117.333 87.6993V82.5",class:C(e.primaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M79.6139 20.1666L115.245 81.7354C115.841 82.7566 115.344 84.0656 114.214 84.4102C107.345 86.4966 89.3159 89.8333 58.6662 89.8333C27.9744 89.8333 9.97652 86.3371 3.12535 84.2526C1.99602 83.9079 1.49919 82.5989 2.09502 81.5778L37.7204 20.1666L36.6662 18.3333L0.503686 80.6666C-0.686148 82.7071 0.322186 85.3251 2.58085 86.0163C9.60985 88.1704 27.7104 91.6666 58.6662 91.6666C89.4625 91.6666 107.664 88.3189 114.742 86.1666C117.008 85.4772 118.022 82.8574 116.829 80.8133L80.6662 18.3333",class:C(e.secondaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M110.814 92.4116L115.245 100.069C115.841 101.089 115.344 102.4 114.214 102.742C107.345 104.831 89.3159 108.167 58.6662 108.167C27.9744 108.167 9.97469 104.671 3.12535 102.585C1.99602 102.242 1.49919 100.931 2.09502 99.9117L6.41985 92.4556L4.75885 91.6672L0.503686 99.0006C-0.686148 101.041 0.322185 103.657 2.58085 104.35C9.60985 106.504 27.7104 110.001 58.6662 110.001C89.4625 110.001 107.664 106.653 114.742 104.501C117.007 103.811 118.022 101.191 116.829 99.1472L112.682 91.9789L110.814 92.4116Z",class:C(e.secondaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M58.667 0C47.238 0 36.667 7.1335 36.667 18.3407V20.1667C36.667 20.1667 42.6052 23.8333 58.667 23.8333C74.6665 23.8333 80.667 20.1667 80.667 20.1667V18.3333C80.667 7.24167 70.767 0 58.667 0ZM58.667 1.83333C70.3527 1.83333 78.8337 8.7725 78.8337 18.3333V19.0172C76.6887 19.9302 70.5103 22 58.667 22C46.7705 22 40.6197 19.9283 38.5003 19.0227V18.3407C38.5003 12.3658 41.7692 8.55617 44.51 6.41117C48.2317 3.50167 53.3907 1.83333 58.667 1.83333Z",class:C(e.secondaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M69.6667 53.1666C70.6768 53.1666 71.5 53.9898 71.5 54.9999V89.8333H73.3333V54.9999C73.3333 52.9741 71.6925 51.3333 69.6667 51.3333H47.6667C45.6408 51.3333 44 52.9741 44 54.9999V89.8333H45.8333V54.9999C45.8333 53.9898 46.6565 53.1666 47.6667 53.1666H69.6667Z",class:C(e.secondaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M58.6667 56.8333C53.6048 56.8333 49.5 60.9381 49.5 65.9999C49.5 71.0618 53.6048 75.1666 58.6667 75.1666C63.7285 75.1666 67.8333 71.0618 67.8333 65.9999C67.8333 60.9381 63.7285 56.8333 58.6667 56.8333ZM58.6667 58.6666C62.711 58.6666 66 61.9556 66 65.9999C66 70.0443 62.711 73.3333 58.6667 73.3333C54.6223 73.3333 51.3333 70.0443 51.3333 65.9999C51.3333 61.9556 54.6223 58.6666 58.6667 58.6666Z",class:C(e.secondaryFillColor)},null,2),l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63.2503 66C62.7443 66 62.3337 65.5893 62.3337 65.0833C62.3337 63.5672 61.0998 62.3333 59.5837 62.3333C59.0777 62.3333 58.667 61.9227 58.667 61.4167C58.667 60.9107 59.0777 60.5 59.5837 60.5C62.11 60.5 64.167 62.5552 64.167 65.0833C64.167 65.5893 63.7563 66 63.2503 66Z",class:C(e.primaryFillColor)},null,2)]),n]))}};export{s as _};
diff --git a/public/build/assets/CategoryModal.6fabb0b3.js b/public/build/assets/CategoryModal.6fabb0b3.js
deleted file mode 100644
index 58facbdcd..000000000
--- a/public/build/assets/CategoryModal.6fabb0b3.js
+++ /dev/null
@@ -1 +0,0 @@
-import{J as j,B as k,k as g,L as y,M as N,N as L,S as T,T as q,r as i,o as B,l as b,w as r,h as m,i as f,t as C,u as e,f as n,m as D,j as G,U}from"./vendor.d12b5734.js";import{u as z}from"./category.c88b90cd.js";import{c as E}from"./main.465728e1.js";const A={class:"flex justify-between w-full"},J=["onSubmit"],X={class:"p-8 sm:p-6"},F={class:"z-0 flex justify-end p-4 border-t border-gray-200 border-solid border-modal-bg"},Q={setup(H){const t=z(),u=E(),{t:p}=j();let c=k(!1);const h=g(()=>({currentCategory:{name:{required:y.withMessage(p("validation.required"),N),minLength:y.withMessage(p("validation.name_min_length",{count:3}),L(3))},description:{maxLength:y.withMessage(p("validation.description_maxlength",{count:255}),T(255))}}})),o=q(h,g(()=>t)),w=g(()=>u.active&&u.componentName==="CategoryModal");async function I(){if(o.value.currentCategory.$touch(),o.value.currentCategory.$invalid)return!0;const s=t.isEdit?t.updateCategory:t.addCategory;c.value=!0,await s(t.currentCategory),c.value=!1,u.refreshData&&u.refreshData(),d()}function d(){u.closeModal(),setTimeout(()=>{t.$reset(),o.value.$reset()},300)}return(s,a)=>{const v=i("BaseIcon"),x=i("BaseInput"),_=i("BaseInputGroup"),M=i("BaseTextarea"),V=i("BaseInputGrid"),$=i("BaseButton"),S=i("BaseModal");return B(),b(S,{show:e(w),onClose:d},{header:r(()=>[m("div",A,[f(C(e(u).title)+" ",1),n(v,{name:"XIcon",class:"w-6 h-6 text-gray-500 cursor-pointer",onClick:d})])]),default:r(()=>[m("form",{action:"",onSubmit:U(I,["prevent"])},[m("div",X,[n(V,{layout:"one-column"},{default:r(()=>[n(_,{label:s.$t("expenses.category"),error:e(o).currentCategory.name.$error&&e(o).currentCategory.name.$errors[0].$message,required:""},{default:r(()=>[n(x,{modelValue:e(t).currentCategory.name,"onUpdate:modelValue":a[0]||(a[0]=l=>e(t).currentCategory.name=l),invalid:e(o).currentCategory.name.$error,type:"text",onInput:a[1]||(a[1]=l=>e(o).currentCategory.name.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),n(_,{label:s.$t("expenses.description"),error:e(o).currentCategory.description.$error&&e(o).currentCategory.description.$errors[0].$message},{default:r(()=>[n(M,{modelValue:e(t).currentCategory.description,"onUpdate:modelValue":a[2]||(a[2]=l=>e(t).currentCategory.description=l),rows:"4",cols:"50",onInput:a[3]||(a[3]=l=>e(o).currentCategory.description.$touch())},null,8,["modelValue"])]),_:1},8,["label","error"])]),_:1})]),m("div",F,[n($,{type:"button",variant:"primary-outline",class:"mr-3 text-sm",onClick:d},{default:r(()=>[f(C(s.$t("general.cancel")),1)]),_:1}),n($,{loading:e(c),disabled:e(c),variant:"primary",type:"submit"},{left:r(l=>[e(c)?G("",!0):(B(),b(v,{key:0,name:"SaveIcon",class:D(l.class)},null,8,["class"]))]),default:r(()=>[f(" "+C(e(t).isEdit?s.$t("general.update"):s.$t("general.save")),1)]),_:1},8,["loading","disabled"])])],40,J)]),_:1},8,["show"])}}};export{Q as _};
diff --git a/public/build/assets/CompanyInfoSettings.23b88ef4.js b/public/build/assets/CompanyInfoSettings.23b88ef4.js
deleted file mode 100644
index fdce4e8ef..000000000
--- a/public/build/assets/CompanyInfoSettings.23b88ef4.js
+++ /dev/null
@@ -1 +0,0 @@
-var oe=Object.defineProperty;var T=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var R=(f,s,d)=>s in f?oe(f,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):f[s]=d,A=(f,s)=>{for(var d in s||(s={}))se.call(s,d)&&R(f,d,s[d]);if(T)for(var d of T(s))ne.call(s,d)&&R(f,d,s[d]);return f};import{aN as le,J,B as C,a0 as E,k as F,L as h,M as k,P as de,T as O,r as u,o as I,l as q,w as r,h as m,t as b,u as e,f as o,i as j,m as P,j as z,U as H,ah as re,N as ie,e as K,x as ue,F as me}from"./vendor.d12b5734.js";import{b as Q,c as W,d as X}from"./main.465728e1.js";const ce={class:"flex justify-between w-full"},pe={class:"px-6 pt-6"},_e={class:"font-medium text-lg text-left"},fe={class:"mt-2 text-sm leading-snug text-gray-500",style:{"max-width":"680px"}},ye=["onSubmit"],ge={class:"p-4 sm:p-6 space-y-4"},ve={class:"z-0 flex justify-end p-4 bg-gray-50 border-modal-bg"},be={setup(f){const s=Q(),d=W(),S=X(),B=le(),{t:M}=J();let c=C(!1);const a=E({id:s.selectedCompany.id,name:null}),$=F(()=>d.active&&d.componentName==="DeleteCompanyModal"),g={formData:{name:{required:h.withMessage(M("validation.required"),k),sameAsName:h.withMessage(M("validation.company_name_not_same"),de(s.selectedCompany.name))}}},_=O(g,{formData:a},{$scope:!1});async function V(){if(_.value.$touch(),_.value.$invalid)return!0;const v=s.companies[0];c.value=!0;try{const y=await s.deleteCompany(a);console.log(y.data.success),y.data.success&&(p(),await s.setSelectedCompany(v),B.push("/admin/dashboard"),await S.setIsAppLoaded(!1),await S.bootstrap()),c.value=!1}catch{c.value=!1}}function N(){a.id=null,a.name="",_.value.$reset()}function p(){d.closeModal(),setTimeout(()=>{N(),_.value.$reset()},300)}return(v,y)=>{const U=u("BaseInput"),x=u("BaseInputGroup"),l=u("BaseButton"),t=u("BaseIcon"),D=u("BaseModal");return I(),q(D,{show:e($),onClose:p},{default:r(()=>[m("div",ce,[m("div",pe,[m("h6",_e,b(e(d).title),1),m("p",fe,b(v.$t("settings.company_info.delete_company_modal_desc",{company:e(s).selectedCompany.name})),1)])]),m("form",{action:"",onSubmit:H(V,["prevent"])},[m("div",ge,[o(x,{label:v.$t("settings.company_info.delete_company_modal_label",{company:e(s).selectedCompany.name}),error:e(_).formData.name.$error&&e(_).formData.name.$errors[0].$message,required:""},{default:r(()=>[o(U,{modelValue:e(a).name,"onUpdate:modelValue":y[0]||(y[0]=i=>e(a).name=i),invalid:e(_).formData.name.$error,onInput:y[1]||(y[1]=i=>e(_).formData.name.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"])]),m("div",ve,[o(l,{class:"mr-3 text-sm",variant:"primary-outline",outline:"",type:"button",onClick:p},{default:r(()=>[j(b(v.$t("general.cancel")),1)]),_:1}),o(l,{loading:e(c),disabled:e(c),variant:"danger",type:"submit"},{left:r(i=>[e(c)?z("",!0):(I(),q(t,{key:0,name:"TrashIcon",class:P(i.class)},null,8,["class"]))]),default:r(()=>[j(" "+b(v.$t("general.delete")),1)]),_:1},8,["loading","disabled"])])],40,ye)]),_:1},8,["show"])}}},$e=["onSubmit"],Be={key:0,class:"py-5"},Ve={class:"text-lg leading-6 font-medium text-gray-900"},Ce={class:"mt-2 max-w-xl text-sm text-gray-500"},we={class:"mt-5"},Me={setup(f){const s=Q(),d=X(),S=W(),{t:B}=J(),M=re("utils");let c=C(!1);const a=E({name:null,logo:null,address:{address_street_1:"",address_street_2:"",website:"",country_id:null,state:"",city:"",phone:"",zip:""}});M.mergeSettings(a,A({},s.selectedCompany));let $=C([]),g=C(null),_=C(null);const V=C(!1);a.logo&&$.value.push({image:a.logo});const N=F(()=>({name:{required:h.withMessage(B("validation.required"),k),minLength:h.withMessage(B("validation.name_min_length"),ie(3))},address:{country_id:{required:h.withMessage(B("validation.required"),k)}}})),p=O(N,F(()=>a));d.fetchCountries();function v(l,t,D,i){_.value=i.name,g.value=t}function y(){g.value=null,V.value=!0}async function U(){if(p.value.$touch(),p.value.$invalid)return!0;if(c.value=!0,(await s.updateCompany(a)).data.data){if(g.value||V.value){let t=new FormData;g.value&&t.append("company_logo",JSON.stringify({name:_.value,data:g.value})),t.append("is_company_logo_removed",V.value),await s.updateCompanyLogo(t),g.value=null,V.value=!1}c.value=!1}c.value=!1}function x(l){S.openModal({title:B("settings.company_info.are_you_absolutely_sure"),componentName:"DeleteCompanyModal",size:"sm"})}return(l,t)=>{const D=u("BaseFileUploader"),i=u("BaseInputGroup"),G=u("BaseInputGrid"),w=u("BaseInput"),Y=u("BaseMultiselect"),L=u("BaseTextarea"),Z=u("BaseIcon"),ee=u("BaseButton"),ae=u("BaseDivider"),te=u("BaseSettingCard");return I(),K(me,null,[m("form",{onSubmit:H(U,["prevent"])},[o(te,{title:l.$t("settings.company_info.company_info"),description:l.$t("settings.company_info.section_description")},{default:r(()=>[o(G,{class:"mt-5"},{default:r(()=>[o(i,{label:l.$tc("settings.company_info.company_logo")},{default:r(()=>[o(D,{modelValue:e($),"onUpdate:modelValue":t[0]||(t[0]=n=>ue($)?$.value=n:$=n),base64:"",onChange:v,onRemove:y},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),o(G,{class:"mt-5"},{default:r(()=>[o(i,{label:l.$tc("settings.company_info.company_name"),error:e(p).name.$error&&e(p).name.$errors[0].$message,required:""},{default:r(()=>[o(w,{modelValue:e(a).name,"onUpdate:modelValue":t[1]||(t[1]=n=>e(a).name=n),invalid:e(p).name.$error,onBlur:t[2]||(t[2]=n=>e(p).name.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),o(i,{label:l.$tc("settings.company_info.phone")},{default:r(()=>[o(w,{modelValue:e(a).address.phone,"onUpdate:modelValue":t[3]||(t[3]=n=>e(a).address.phone=n)},null,8,["modelValue"])]),_:1},8,["label"]),o(i,{label:l.$tc("settings.company_info.country"),error:e(p).address.country_id.$error&&e(p).address.country_id.$errors[0].$message,required:""},{default:r(()=>[o(Y,{modelValue:e(a).address.country_id,"onUpdate:modelValue":t[4]||(t[4]=n=>e(a).address.country_id=n),label:"name",invalid:e(p).address.country_id.$error,options:e(d).countries,"value-prop":"id","can-deselect":!0,"can-clear":!1,searchable:"","track-by":"name"},null,8,["modelValue","invalid","options"])]),_:1},8,["label","error"]),o(i,{label:l.$tc("settings.company_info.state")},{default:r(()=>[o(w,{modelValue:e(a).address.state,"onUpdate:modelValue":t[5]||(t[5]=n=>e(a).address.state=n),name:"state",type:"text"},null,8,["modelValue"])]),_:1},8,["label"]),o(i,{label:l.$tc("settings.company_info.city")},{default:r(()=>[o(w,{modelValue:e(a).address.city,"onUpdate:modelValue":t[6]||(t[6]=n=>e(a).address.city=n),type:"text"},null,8,["modelValue"])]),_:1},8,["label"]),o(i,{label:l.$tc("settings.company_info.zip")},{default:r(()=>[o(w,{modelValue:e(a).address.zip,"onUpdate:modelValue":t[7]||(t[7]=n=>e(a).address.zip=n)},null,8,["modelValue"])]),_:1},8,["label"]),m("div",null,[o(i,{label:l.$tc("settings.company_info.address")},{default:r(()=>[o(L,{modelValue:e(a).address.address_street_1,"onUpdate:modelValue":t[8]||(t[8]=n=>e(a).address.address_street_1=n),rows:"2"},null,8,["modelValue"])]),_:1},8,["label"]),o(L,{modelValue:e(a).address.address_street_2,"onUpdate:modelValue":t[9]||(t[9]=n=>e(a).address.address_street_2=n),rows:"2",row:2,class:"mt-2"},null,8,["modelValue"])])]),_:1}),o(ee,{loading:e(c),disabled:e(c),type:"submit",class:"mt-6"},{left:r(n=>[e(c)?z("",!0):(I(),q(Z,{key:0,class:P(n.class),name:"SaveIcon"},null,8,["class"]))]),default:r(()=>[j(" "+b(l.$tc("settings.company_info.save")),1)]),_:1},8,["loading","disabled"]),e(s).companies.length!==1?(I(),K("div",Be,[o(ae,{class:"my-4"}),m("h3",Ve,b(l.$tc("settings.company_info.delete_company")),1),m("div",Ce,[m("p",null,b(l.$tc("settings.company_info.delete_company_description")),1)]),m("div",we,[m("button",{type:"button",class:"inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md text-red-700 bg-red-100 hover:bg-red-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm",onClick:x},b(l.$tc("general.delete")),1)])])):z("",!0)]),_:1},8,["title","description"])],40,$e),o(be)],64)}}};export{Me as default};
diff --git a/public/build/assets/Create.1d6bd807.js b/public/build/assets/Create.1d6bd807.js
deleted file mode 100644
index 87584a418..000000000
--- a/public/build/assets/Create.1d6bd807.js
+++ /dev/null
@@ -1 +0,0 @@
-var ce=Object.defineProperty;var R=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var L=(_,s,c)=>s in _?ce(_,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):_[s]=c,T=(_,s)=>{for(var c in s||(s={}))de.call(s,c)&&L(_,c,s[c]);if(R)for(var c of R(s))ye.call(s,c)&&L(_,c,s[c]);return _};import{G as pe,aN as _e,ah as ve,J as fe,B as w,a0 as Pe,k as S,L as C,M as q,aX as ge,O as be,aP as Be,T as $e,a7 as he,b1 as Ce,r as m,o as k,e as Ie,f as r,w as l,h as I,u as e,l as j,m as z,j as U,i as N,t as b,x as Se,U as Ve,F as Me}from"./vendor.d12b5734.js";import{_ as we}from"./ExchangeRateConverter.d865db6a.js";import{u as qe,l as ke,m as Ne,b as je,c as Ue,i as xe,d as De}from"./main.465728e1.js";import{u as Ae}from"./payment.93619753.js";import{_ as Ee}from"./SelectNotePopup.2e678c03.js";import{_ as Fe}from"./CreateCustomFields.c1c460e4.js";import{_ as Ge}from"./PaymentModeModal.a0b58785.js";import"./exchange-rate.85b564e2.js";import"./NoteModal.ebe10cf0.js";const Re=["onSubmit"],Le={class:"absolute left-3.5"},Te={class:"relative w-full"},ze={class:"relative mt-6"},He={class:"z-20 float-right text-sm font-semibold leading-5 text-primary-400"},Je={class:"mb-4 text-sm font-medium text-gray-800"},nt={setup(_){const s=pe(),c=_e(),t=Ae();qe();const V=ke();Ne(),je();const H=Ue(),x=xe();De();const D=ve("utils"),{t:p}=fe();let B=w(!1),M=w(!1),v=w([]);const f=w(null),A="newEstimate",J=Pe(["customer","company","customerCustom","payment","paymentCustom"]),$=S({get:()=>t.currentPayment.amount/100,set:a=>{t.currentPayment.amount=Math.round(a*100)}}),u=S(()=>t.isFetchingInitialData),d=S(()=>s.name==="payments.edit"),E=S(()=>d.value?p("payments.edit_payment"):p("payments.new_payment")),O=S(()=>({currentPayment:{customer_id:{required:C.withMessage(p("validation.required"),q)},payment_date:{required:C.withMessage(p("validation.required"),q)},amount:{required:C.withMessage(p("validation.required"),q),between:C.withMessage(p("validation.payment_greater_than_due_amount"),ge(0,t.currentPayment.maxPayableAmount))},exchange_rate:{required:be(function(){return C.withMessage(p("validation.required"),q),t.showExchangeRate}),decimal:C.withMessage(p("validation.valid_exchange_rate"),Be)}}})),i=$e(O,t,{$scope:A});he(()=>{t.currentPayment.customer_id&&Y(t.currentPayment.customer_id),s.query.customer&&(t.currentPayment.customer_id=s.query.customer)}),t.resetCurrentPayment(),s.query.customer&&(t.currentPayment.customer_id=s.query.customer),t.fetchPaymentInitialData(d.value),s.params.id&&!d.value&&Q();async function X(){H.openModal({title:p("settings.payment_modes.add_payment_mode"),componentName:"PaymentModeModal"})}function K(a){t.currentPayment.notes=""+a.notes}async function Q(){var n;let a=await x.fetchInvoice((n=s==null?void 0:s.params)==null?void 0:n.id);t.currentPayment.customer_id=a.data.data.customer.id,t.currentPayment.invoice_id=a.data.data.id}async function W(a){a&&(f.value=v.value.find(n=>n.id===a),$.value=f.value.due_amount/100,t.currentPayment.maxPayableAmount=f.value.due_amount)}function Y(a){if(a){let n={customer_id:a,status:"DUE",limit:"all"};d.value&&(n.status=""),M.value=!0,Promise.all([x.fetchInvoices(n),V.fetchCustomer(a)]).then(async([y,P])=>{y&&(v.value=[...y.data.data]),P&&P.data&&(t.currentPayment.selectedCustomer=P.data.data,t.currentPayment.customer=P.data.data,t.currentPayment.currency=P.data.data.currency,d.value&&!V.editCustomer&&t.currentPayment.customer_id&&(V.editCustomer=P.data.data)),t.currentPayment.invoice_id&&(f.value=v.value.find(g=>g.id===t.currentPayment.invoice_id),t.currentPayment.maxPayableAmount=f.value.due_amount+t.currentPayment.amount,$.value===0&&($.value=f.value.due_amount/100)),d.value&&(v.value=v.value.filter(g=>g.due_amount>0||g.id==t.currentPayment.invoice_id)),M.value=!1}).catch(y=>{M.value=!1,console.error(y,"error")})}}Ce(()=>{t.resetCurrentPayment(),v.value=[],V.editCustomer=null});async function Z(){if(i.value.$touch(),i.value.$invalid)return!1;B.value=!0;let a=T({},t.currentPayment),n=null;try{n=await(d.value?t.updatePayment:t.addPayment)(a),c.push(`/admin/payments/${n.data.data.id}/view`)}catch{B.value=!1}}function ee(a){let n={userId:a};s.params.id&&(n.model_id=s.params.id),t.currentPayment.invoice_id=f.value=null,t.currentPayment.amount=0,v.value=[],t.getNextNumber(n,!0)}return(a,n)=>{const y=m("BaseBreadcrumbItem"),P=m("BaseBreadcrumb"),g=m("BaseIcon"),F=m("BaseButton"),te=m("BasePageHeader"),ae=m("BaseDatePicker"),h=m("BaseInputGroup"),ne=m("BaseInput"),oe=m("BaseCustomerSelectInput"),G=m("BaseMultiselect"),re=m("BaseMoney"),se=m("BaseSelectAction"),le=m("BaseInputGrid"),ue=m("BaseCustomInput"),me=m("BaseCard"),ie=m("BasePage");return k(),Ie(Me,null,[r(Ge),r(ie,{class:"relative payment-create"},{default:l(()=>[I("form",{action:"",onSubmit:Ve(Z,["prevent"])},[r(te,{title:e(E),class:"mb-5"},{actions:l(()=>[r(F,{loading:e(B),disabled:e(B),variant:"primary",type:"submit",class:"hidden sm:flex"},{left:l(o=>[e(B)?U("",!0):(k(),j(g,{key:0,name:"SaveIcon",class:z(o.class)},null,8,["class"]))]),default:l(()=>[N(" "+b(e(d)?a.$t("payments.update_payment"):a.$t("payments.save_payment")),1)]),_:1},8,["loading","disabled"])]),default:l(()=>[r(P,null,{default:l(()=>[r(y,{title:a.$t("general.home"),to:"/admin/dashboard"},null,8,["title"]),r(y,{title:a.$tc("payments.payment",2),to:"/admin/payments"},null,8,["title"]),r(y,{title:e(E),to:"#",active:""},null,8,["title"])]),_:1})]),_:1},8,["title"]),r(me,null,{default:l(()=>[r(le,null,{default:l(()=>[r(h,{label:a.$t("payments.date"),"content-loading":e(u),required:"",error:e(i).currentPayment.payment_date.$error&&e(i).currentPayment.payment_date.$errors[0].$message},{default:l(()=>[r(ae,{modelValue:e(t).currentPayment.payment_date,"onUpdate:modelValue":[n[0]||(n[0]=o=>e(t).currentPayment.payment_date=o),n[1]||(n[1]=o=>e(i).currentPayment.payment_date.$touch())],"content-loading":e(u),"calendar-button":!0,"calendar-button-icon":"calendar",invalid:e(i).currentPayment.payment_date.$error},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["label","content-loading","error"]),r(h,{label:a.$t("payments.payment_number"),"content-loading":e(u),required:""},{default:l(()=>[r(ne,{modelValue:e(t).currentPayment.payment_number,"onUpdate:modelValue":n[2]||(n[2]=o=>e(t).currentPayment.payment_number=o),"content-loading":e(u)},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"]),r(h,{label:a.$t("payments.customer"),error:e(i).currentPayment.customer_id.$error&&e(i).currentPayment.customer_id.$errors[0].$message,"content-loading":e(u),required:""},{default:l(()=>[e(u)?U("",!0):(k(),j(oe,{key:0,modelValue:e(t).currentPayment.customer_id,"onUpdate:modelValue":[n[3]||(n[3]=o=>e(t).currentPayment.customer_id=o),n[4]||(n[4]=o=>ee(e(t).currentPayment.customer_id))],"content-loading":e(u),invalid:e(i).currentPayment.customer_id.$error,placeholder:a.$t("customers.select_a_customer"),"show-action":""},null,8,["modelValue","content-loading","invalid","placeholder"]))]),_:1},8,["label","error","content-loading"]),r(h,{"content-loading":e(u),label:a.$t("payments.invoice"),"help-text":f.value?`Due Amount: ${e(t).currentPayment.maxPayableAmount/100}`:""},{default:l(()=>[r(G,{modelValue:e(t).currentPayment.invoice_id,"onUpdate:modelValue":n[5]||(n[5]=o=>e(t).currentPayment.invoice_id=o),"content-loading":e(u),"value-prop":"id","track-by":"invoice_number",label:"invoice_number",options:e(v),loading:e(M),placeholder:a.$t("invoices.select_invoice"),onSelect:W},{singlelabel:l(({value:o})=>[I("div",Le,b(o.invoice_number)+" ("+b(e(D).formatMoney(o.total,o.customer.currency))+") ",1)]),option:l(({option:o})=>[N(b(o.invoice_number)+" ("+b(e(D).formatMoney(o.total,o.customer.currency))+") ",1)]),_:1},8,["modelValue","content-loading","options","loading","placeholder"])]),_:1},8,["content-loading","label","help-text"]),r(h,{label:a.$t("payments.amount"),"content-loading":e(u),error:e(i).currentPayment.amount.$error&&e(i).currentPayment.amount.$errors[0].$message,required:""},{default:l(()=>[I("div",Te,[r(re,{key:e(t).currentPayment.currency,modelValue:e($),"onUpdate:modelValue":[n[6]||(n[6]=o=>Se($)?$.value=o:null),n[7]||(n[7]=o=>e(i).currentPayment.amount.$touch())],currency:e(t).currentPayment.currency,"content-loading":e(u),invalid:e(i).currentPayment.amount.$error},null,8,["modelValue","currency","content-loading","invalid"])])]),_:1},8,["label","content-loading","error"]),r(h,{"content-loading":e(u),label:a.$t("payments.payment_mode")},{default:l(()=>[r(G,{modelValue:e(t).currentPayment.payment_method_id,"onUpdate:modelValue":n[8]||(n[8]=o=>e(t).currentPayment.payment_method_id=o),"content-loading":e(u),label:"name","value-prop":"id","track-by":"name",options:e(t).paymentModes,placeholder:a.$t("payments.select_payment_mode"),searchable:""},{action:l(()=>[r(se,{onClick:X},{default:l(()=>[r(g,{name:"PlusIcon",class:"h-4 mr-2 -ml-2 text-center text-primary-400"}),N(" "+b(a.$t("settings.payment_modes.add_payment_mode")),1)]),_:1})]),_:1},8,["modelValue","content-loading","options","placeholder"])]),_:1},8,["content-loading","label"]),r(we,{store:e(t),"store-prop":"currentPayment",v:e(i).currentPayment,"is-loading":e(u),"is-edit":e(d),"customer-currency":e(t).currentPayment.currency_id},null,8,["store","v","is-loading","is-edit","customer-currency"])]),_:1}),r(Fe,{type:"Payment","is-edit":e(d),"is-loading":e(u),store:e(t),"store-prop":"currentPayment","custom-field-scope":A,class:"mt-6"},null,8,["is-edit","is-loading","store"]),I("div",ze,[I("div",He,[r(Ee,{type:"Payment",onSelect:K})]),I("label",Je,b(a.$t("estimates.notes")),1),r(ue,{modelValue:e(t).currentPayment.notes,"onUpdate:modelValue":n[9]||(n[9]=o=>e(t).currentPayment.notes=o),"content-loading":e(u),fields:e(J),class:"mt-1"},null,8,["modelValue","content-loading","fields"])]),r(F,{loading:e(B),"content-loading":e(u),variant:"primary",type:"submit",class:"flex justify-center w-full mt-4 sm:hidden md:hidden"},{left:l(o=>[e(B)?U("",!0):(k(),j(g,{key:0,name:"SaveIcon",class:z(o.class)},null,8,["class"]))]),default:l(()=>[N(" "+b(e(d)?a.$t("payments.update_payment"):a.$t("payments.save_payment")),1)]),_:1},8,["loading","content-loading"])]),_:1})],40,Re)]),_:1})],64)}}};export{nt as default};
diff --git a/public/build/assets/Create.68c99c93.js b/public/build/assets/Create.68c99c93.js
deleted file mode 100644
index cf243fe41..000000000
--- a/public/build/assets/Create.68c99c93.js
+++ /dev/null
@@ -1 +0,0 @@
-import{G as ie,aN as de,J as ue,B as q,k as b,L as m,M as $,b2 as ce,S as N,O as pe,aP as me,T as ge,b1 as xe,r as d,o as v,e as _e,f as r,w as o,h as F,u as e,l as h,m as U,i as w,t as S,j as C,x as ye,U as fe,F as ve}from"./vendor.d12b5734.js";import{u as Ee}from"./expense.ea1e799e.js";import{u as be}from"./category.c88b90cd.js";import{l as $e,b as he,m as Ce,c as Be,d as Ve}from"./main.465728e1.js";import{_ as we}from"./CreateCustomFields.c1c460e4.js";import{_ as Se}from"./CategoryModal.6fabb0b3.js";import{_ as Me}from"./ExchangeRateConverter.d865db6a.js";import"./exchange-rate.85b564e2.js";const Ie=["onSubmit"],ke={class:"hidden md:block"},qe={class:"block md:hidden"},Ae={setup(Fe){const _=$e(),j=he(),t=Ee(),y=be(),G=Ce(),T=Be(),f=ie(),A=de(),{t:u}=ue(),D=Ve();let g=q(!1),i=q(!1);const R="newExpense",M=q(!1),L=b(()=>({currentExpense:{expense_category_id:{required:m.withMessage(u("validation.required"),$)},expense_date:{required:m.withMessage(u("validation.required"),$)},amount:{required:m.withMessage(u("validation.required"),$),minValue:m.withMessage(u("validation.price_minvalue"),ce(.1)),maxLength:m.withMessage(u("validation.price_maxlength"),N(20))},notes:{maxLength:m.withMessage(u("validation.description_maxlength"),N(65e3))},currency_id:{required:m.withMessage(u("validation.required"),$)},exchange_rate:{required:pe(function(){return m.withMessage(u("validation.required"),$),t.showExchangeRate}),decimal:m.withMessage(u("validation.valid_exchange_rate"),me)}}})),l=ge(L,t,{$scope:R}),I=b({get:()=>t.currentExpense.amount/100,set:a=>{t.currentExpense.amount=Math.round(a*100)}}),c=b(()=>f.name==="expenses.edit"),P=b(()=>c.value?u("expenses.edit_expense"):u("expenses.new_expense")),O=b(()=>c.value?`/reports/expenses/${f.params.id}/download-receipt`:"");t.resetCurrentExpenseData(),G.resetCustomFields(),X();function z(a,n){t.currentExpense.attachment_receipt=n}function H(){t.currentExpense.attachment_receipt=null,M.value=!0}function J(){T.openModal({title:u("settings.expense_category.add_category"),componentName:"CategoryModal",size:"sm"})}function K(a){t.currentExpense.selectedCurrency=D.currencies.find(n=>n.id===a)}async function Q(a){let n=await y.fetchCategories({search:a});if(n.data.data.length>0&&y.editCategory&&!n.data.data.find(p=>p.id==y.editCategory.id)){let p=Object.assign({},y.editCategory);n.data.data.unshift(p)}return n.data.data}async function W(a){let n=await _.fetchCustomers({search:a});if(n.data.data.length>0&&_.editCustomer&&!n.data.data.find(p=>p.id==_.editCustomer.id)){let p=Object.assign({},_.editCustomer);n.data.data.unshift(p)}return n.data.data}async function X(){if(c.value||(t.currentExpense.currency_id=j.selectedCompanyCurrency.id,t.currentExpense.selectedCurrency=j.selectedCompanyCurrency),i.value=!0,await t.fetchPaymentModes({limit:"all"}),c.value){const a=await t.fetchExpense(f.params.id);t.currentExpense.currency_id=t.currentExpense.selectedCurrency.id,a.data&&(!y.editCategory&&a.data.data.expense_category&&(y.editCategory=a.data.data.expense_category),!_.editCustomer&&a.data.data.customer&&(_.editCustomer=a.data.data.customer))}else f.query.customer&&(t.currentExpense.customer_id=f.query.customer);i.value=!1}async function Y(){if(l.value.$touch(),l.value.$invalid)return;g.value=!0;let a=t.currentExpense;try{c.value?await t.updateExpense({id:f.params.id,data:a,isAttachmentReceiptRemoved:M.value}):await t.addExpense(a),g.value=!1,t.currentExpense.attachment_receipt=null,M.value=!1,A.push("/admin/expenses")}catch(n){console.error(n),g.value=!1;return}}return xe(()=>{t.resetCurrentExpenseData(),_.editCustomer=null,y.editCategory=null}),(a,n)=>{const E=d("BaseBreadcrumbItem"),p=d("BaseBreadcrumb"),B=d("BaseIcon"),k=d("BaseButton"),Z=d("BasePageHeader"),ee=d("BaseSelectAction"),V=d("BaseMultiselect"),x=d("BaseInputGroup"),te=d("BaseDatePicker"),ne=d("BaseMoney"),ae=d("BaseTextarea"),re=d("BaseFileUploader"),se=d("BaseInputGrid"),oe=d("BaseCard"),le=d("BasePage");return v(),_e(ve,null,[r(Se),r(le,{class:"relative"},{default:o(()=>[F("form",{action:"",onSubmit:fe(Y,["prevent"])},[r(Z,{title:e(P),class:"mb-5"},{actions:o(()=>[e(c)&&e(t).currentExpense.attachment_receipt_url?(v(),h(k,{key:0,href:e(O),tag:"a",variant:"primary-outline",type:"button",class:"mr-2"},{left:o(s=>[r(B,{name:"DownloadIcon",class:U(s.class)},null,8,["class"])]),default:o(()=>[w(" "+S(a.$t("expenses.download_receipt")),1)]),_:1},8,["href"])):C("",!0),F("div",ke,[r(k,{loading:e(g),"content-loading":e(i),disabled:e(g),variant:"primary",type:"submit"},{left:o(s=>[e(g)?C("",!0):(v(),h(B,{key:0,name:"SaveIcon",class:U(s.class)},null,8,["class"]))]),default:o(()=>[w(" "+S(e(c)?a.$t("expenses.update_expense"):a.$t("expenses.save_expense")),1)]),_:1},8,["loading","content-loading","disabled"])])]),default:o(()=>[r(p,null,{default:o(()=>[r(E,{title:a.$t("general.home"),to:"/admin/dashboard"},null,8,["title"]),r(E,{title:a.$tc("expenses.expense",2),to:"/admin/expenses"},null,8,["title"]),r(E,{title:e(P),to:"#",active:""},null,8,["title"])]),_:1})]),_:1},8,["title"]),r(oe,null,{default:o(()=>[r(se,null,{default:o(()=>[r(x,{label:a.$t("expenses.category"),error:e(l).currentExpense.expense_category_id.$error&&e(l).currentExpense.expense_category_id.$errors[0].$message,"content-loading":e(i),required:""},{default:o(()=>[e(i)?C("",!0):(v(),h(V,{key:0,modelValue:e(t).currentExpense.expense_category_id,"onUpdate:modelValue":n[0]||(n[0]=s=>e(t).currentExpense.expense_category_id=s),"content-loading":e(i),"value-prop":"id",label:"name","track-by":"id",options:Q,"filter-results":!1,"resolve-on-load":"",delay:500,searchable:"",invalid:e(l).currentExpense.expense_category_id.$error,placeholder:a.$t("expenses.categories.select_a_category"),onInput:n[1]||(n[1]=s=>e(l).currentExpense.expense_category_id.$touch())},{action:o(()=>[r(ee,{onClick:J},{default:o(()=>[r(B,{name:"PlusIcon",class:"h-4 mr-2 -ml-2 text-center text-primary-400"}),w(" "+S(a.$t("settings.expense_category.add_new_category")),1)]),_:1})]),_:1},8,["modelValue","content-loading","invalid","placeholder"]))]),_:1},8,["label","error","content-loading"]),r(x,{label:a.$t("expenses.expense_date"),error:e(l).currentExpense.expense_date.$error&&e(l).currentExpense.expense_date.$errors[0].$message,"content-loading":e(i),required:""},{default:o(()=>[r(te,{modelValue:e(t).currentExpense.expense_date,"onUpdate:modelValue":n[2]||(n[2]=s=>e(t).currentExpense.expense_date=s),"content-loading":e(i),"calendar-button":!0,invalid:e(l).currentExpense.expense_date.$error,onInput:n[3]||(n[3]=s=>e(l).currentExpense.expense_date.$touch())},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["label","error","content-loading"]),r(x,{label:a.$t("expenses.amount"),error:e(l).currentExpense.amount.$error&&e(l).currentExpense.amount.$errors[0].$message,"content-loading":e(i),required:""},{default:o(()=>[r(ne,{key:e(t).currentExpense.selectedCurrency,modelValue:e(I),"onUpdate:modelValue":n[4]||(n[4]=s=>ye(I)?I.value=s:null),class:"focus:border focus:border-solid focus:border-primary-500",invalid:e(l).currentExpense.amount.$error,currency:e(t).currentExpense.selectedCurrency,onInput:n[5]||(n[5]=s=>e(l).currentExpense.amount.$touch())},null,8,["modelValue","invalid","currency"])]),_:1},8,["label","error","content-loading"]),r(x,{label:a.$t("expenses.currency"),"content-loading":e(i),error:e(l).currentExpense.currency_id.$error&&e(l).currentExpense.currency_id.$errors[0].$message,required:""},{default:o(()=>[r(V,{modelValue:e(t).currentExpense.currency_id,"onUpdate:modelValue":[n[6]||(n[6]=s=>e(t).currentExpense.currency_id=s),K],"value-prop":"id",label:"name","track-by":"name","content-loading":e(i),options:e(D).currencies,searchable:"","can-deselect":!1,placeholder:a.$t("customers.select_currency"),invalid:e(l).currentExpense.currency_id.$error,class:"w-full"},null,8,["modelValue","content-loading","options","placeholder","invalid"])]),_:1},8,["label","content-loading","error"]),r(Me,{store:e(t),"store-prop":"currentExpense",v:e(l).currentExpense,"is-loading":e(i),"is-edit":e(c),"customer-currency":e(t).currentExpense.currency_id},null,8,["store","v","is-loading","is-edit","customer-currency"]),r(x,{"content-loading":e(i),label:a.$t("expenses.customer")},{default:o(()=>[e(i)?C("",!0):(v(),h(V,{key:0,modelValue:e(t).currentExpense.customer_id,"onUpdate:modelValue":n[7]||(n[7]=s=>e(t).currentExpense.customer_id=s),"content-loading":e(i),"value-prop":"id",label:"name","track-by":"id",options:W,"filter-results":!1,"resolve-on-load":"",delay:500,searchable:"",placeholder:a.$t("customers.select_a_customer")},null,8,["modelValue","content-loading","placeholder"]))]),_:1},8,["content-loading","label"]),r(x,{"content-loading":e(i),label:a.$t("payments.payment_mode")},{default:o(()=>[r(V,{modelValue:e(t).currentExpense.payment_method_id,"onUpdate:modelValue":n[8]||(n[8]=s=>e(t).currentExpense.payment_method_id=s),"content-loading":e(i),label:"name","value-prop":"id","track-by":"name",options:e(t).paymentModes,placeholder:a.$t("payments.select_payment_mode"),searchable:""},null,8,["modelValue","content-loading","options","placeholder"])]),_:1},8,["content-loading","label"]),r(x,{"content-loading":e(i),label:a.$t("expenses.note"),error:e(l).currentExpense.notes.$error&&e(l).currentExpense.notes.$errors[0].$message},{default:o(()=>[r(ae,{modelValue:e(t).currentExpense.notes,"onUpdate:modelValue":n[9]||(n[9]=s=>e(t).currentExpense.notes=s),"content-loading":e(i),row:4,rows:"4",onInput:n[10]||(n[10]=s=>e(l).currentExpense.notes.$touch())},null,8,["modelValue","content-loading"])]),_:1},8,["content-loading","label","error"]),r(x,{label:a.$t("expenses.receipt")},{default:o(()=>[r(re,{modelValue:e(t).currentExpense.receiptFiles,"onUpdate:modelValue":n[11]||(n[11]=s=>e(t).currentExpense.receiptFiles=s),accept:"image/*,.doc,.docx,.pdf,.csv,.xlsx,.xls",onChange:z,onRemove:H},null,8,["modelValue"])]),_:1},8,["label"]),r(we,{"is-edit":e(c),class:"col-span-2","is-loading":e(i),type:"Expense",store:e(t),"store-prop":"currentExpense","custom-field-scope":R},null,8,["is-edit","is-loading","store"]),F("div",qe,[r(k,{loading:e(g),tabindex:6,variant:"primary",type:"submit",class:"flex justify-center w-full"},{left:o(s=>[e(g)?C("",!0):(v(),h(B,{key:0,name:"SaveIcon",class:U(s.class)},null,8,["class"]))]),default:o(()=>[w(" "+S(e(c)?a.$t("expenses.update_expense"):a.$t("expenses.save_expense")),1)]),_:1},8,["loading"])])]),_:1})]),_:1})],40,Ie)]),_:1})],64)}}};export{Ae as default};
diff --git a/public/build/assets/Create.c666337c.js b/public/build/assets/Create.c666337c.js
deleted file mode 100644
index fdc128bb3..000000000
--- a/public/build/assets/Create.c666337c.js
+++ /dev/null
@@ -1 +0,0 @@
-var W=Object.defineProperty,X=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var k=(m,a,o)=>a in m?W(m,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):m[a]=o,j=(m,a)=>{for(var o in a||(a={}))Z.call(a,o)&&k(m,o,a[o]);if(S)for(var o of S(a))x.call(a,o)&&k(m,o,a[o]);return m},N=(m,a)=>X(m,Y(a));import{J as ee,G as ae,aN as te,B as b,k as V,L as p,M as $,N as G,Q as oe,O as se,T as ne,r as d,o as w,l as h,w as u,f as s,u as e,h as y,e as re,y as le,F as ie,m as ue,j as de,i as me,t as ce,U as pe}from"./vendor.d12b5734.js";import{b as ge}from"./main.465728e1.js";import{V as fe}from"./index.esm.85b4999a.js";import{u as ve}from"./users.27a53e97.js";const $e=["onSubmit"],De={class:"grid grid-cols-12"},Be={class:"space-y-6"},ye={setup(m){const a=ve(),{t:o}=ee(),q=ae(),L=te(),P=ge();let g=b(!1),l=b(!1);b([]);let I=b([]);const f=V(()=>q.name==="users.edit"),M=V(()=>f.value?o("users.edit_user"):o("users.new_user")),E=V(()=>({userData:{name:{required:p.withMessage(o("validation.required"),$),minLength:p.withMessage(o("validation.name_min_length",{count:3}),G(3))},email:{required:p.withMessage(o("validation.required"),$),email:p.withMessage(o("validation.email_incorrect"),oe)},password:{required:se(function(){return p.withMessage(o("validation.required"),$),!f.value}),minLength:p.withMessage(o("validation.password_min_length",{count:8}),G(8))},companies:{required:p.withMessage(o("validation.required"),$)}}})),F={role:{required:p.withMessage(o("validation.required"),$)}},n=ne(E,a,{$scope:!0});R(),a.resetUserData();async function R(){var i;l.value=!0;try{f.value&&await a.fetchUser(q.params.id);let t=await P.fetchUserCompanies();((i=t==null?void 0:t.data)==null?void 0:i.data)&&(I.value=t.data.data.map(c=>(c.role=null,c)))}catch{l.value=!1}l.value=!1}async function T(){if(n.value.$touch(),n.value.$invalid)return!0;try{g.value=!0;let i=N(j({},a.userData),{companies:a.userData.companies.map(c=>({role:c.role,id:c.id}))});await(f.value?a.updateUser:a.addUser)(i),L.push("/admin/users"),g.value=!1}catch{g.value=!1}}return(i,t)=>{const c=d("BaseBreadcrumbItem"),H=d("BaseBreadcrumb"),z=d("BasePageHeader"),D=d("BaseInput"),v=d("BaseInputGroup"),U=d("BaseMultiselect"),A=d("BaseInputGrid"),J=d("BaseIcon"),O=d("BaseButton"),Q=d("BaseCard"),K=d("BasePage");return w(),h(K,null,{default:u(()=>[s(z,{title:e(M)},{default:u(()=>[s(H,null,{default:u(()=>[s(c,{title:i.$t("general.home"),to:"dashboard"},null,8,["title"]),s(c,{title:i.$tc("users.user",2),to:"/admin/users"},null,8,["title"]),s(c,{title:e(M),to:"#",active:""},null,8,["title"])]),_:1})]),_:1},8,["title"]),y("form",{action:"",autocomplete:"off",onSubmit:pe(T,["prevent"])},[y("div",De,[s(Q,{class:"mt-6 col-span-12 md:col-span-8"},{default:u(()=>[s(A,{layout:"one-column"},{default:u(()=>[s(v,{"content-loading":e(l),label:i.$t("users.name"),error:e(n).userData.name.$error&&e(n).userData.name.$errors[0].$message,required:""},{default:u(()=>[s(D,{modelValue:e(a).userData.name,"onUpdate:modelValue":t[0]||(t[0]=r=>e(a).userData.name=r),modelModifiers:{trim:!0},"content-loading":e(l),invalid:e(n).userData.name.$error,onInput:t[1]||(t[1]=r=>e(n).userData.name.$touch())},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["content-loading","label","error"]),s(v,{"content-loading":e(l),label:i.$t("users.email"),error:e(n).userData.email.$error&&e(n).userData.email.$errors[0].$message,required:""},{default:u(()=>[s(D,{modelValue:e(a).userData.email,"onUpdate:modelValue":t[2]||(t[2]=r=>e(a).userData.email=r),modelModifiers:{trim:!0},type:"email","content-loading":e(l),invalid:e(n).userData.email.$error,onInput:t[3]||(t[3]=r=>e(n).userData.email.$touch())},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["content-loading","label","error"]),s(v,{"content-loading":e(l),label:i.$t("users.companies"),error:e(n).userData.companies.$error&&e(n).userData.companies.$errors[0].$message,required:""},{default:u(()=>[s(U,{modelValue:e(a).userData.companies,"onUpdate:modelValue":t[4]||(t[4]=r=>e(a).userData.companies=r),mode:"tags",object:!0,autocomplete:"new-password",label:"name",options:e(I),"value-prop":"id",invalid:e(n).userData.companies.$error,"content-loading":e(l),searchable:"","can-deselect":!1,class:"w-full","track-by":"name"},null,8,["modelValue","options","invalid","content-loading"])]),_:1},8,["content-loading","label","error"]),(w(!0),re(ie,null,le(e(a).userData.companies,(r,B)=>(w(),h(e(fe),{key:B,state:r,rules:F},{default:u(({v:_})=>[y("div",Be,[s(v,{"content-loading":e(l),label:i.$t("users.select_company_role",{company:r.name}),error:_.role.$error&&_.role.$errors[0].$message,required:""},{default:u(()=>[s(U,{modelValue:e(a).userData.companies[B].role,"onUpdate:modelValue":C=>e(a).userData.companies[B].role=C,"value-prop":"name","track-by":"id",autocomplete:"off","content-loading":e(l),label:"name",options:e(a).userData.companies[B].roles,"can-deselect":!1,invalid:_.role.$invalid,onChange:C=>_.role.$touch()},null,8,["modelValue","onUpdate:modelValue","content-loading","options","invalid","onChange"])]),_:2},1032,["content-loading","label","error"])])]),_:2},1032,["state"]))),128)),s(v,{"content-loading":e(l),label:i.$tc("users.password"),error:e(n).userData.password.$error&&e(n).userData.password.$errors[0].$message,required:!e(f)},{default:u(()=>[s(D,{modelValue:e(a).userData.password,"onUpdate:modelValue":t[5]||(t[5]=r=>e(a).userData.password=r),name:"new-password",autocomplete:"new-password","content-loading":e(l),type:"password",invalid:e(n).userData.password.$error,onInput:t[6]||(t[6]=r=>e(n).userData.password.$touch())},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["content-loading","label","error","required"]),s(v,{"content-loading":e(l),label:i.$t("users.phone")},{default:u(()=>[s(D,{modelValue:e(a).userData.phone,"onUpdate:modelValue":t[7]||(t[7]=r=>e(a).userData.phone=r),modelModifiers:{trim:!0},"content-loading":e(l)},null,8,["modelValue","content-loading"])]),_:1},8,["content-loading","label"])]),_:1}),s(O,{"content-loading":e(l),type:"submit",loading:e(g),disabled:e(g),class:"mt-6"},{left:u(r=>[e(g)?de("",!0):(w(),h(J,{key:0,name:"SaveIcon",class:ue(r.class)},null,8,["class"]))]),default:u(()=>[me(" "+ce(e(f)?i.$t("users.update_user"):i.$t("users.save_user")),1)]),_:1},8,["content-loading","loading","disabled"])]),_:1})])],40,$e)]),_:1})}}};export{ye as default};
diff --git a/public/build/assets/Create.ddeb574a.js b/public/build/assets/Create.ddeb574a.js
deleted file mode 100644
index e4bb45cc6..000000000
--- a/public/build/assets/Create.ddeb574a.js
+++ /dev/null
@@ -1 +0,0 @@
-var ae=Object.defineProperty;var G=Object.getOwnPropertySymbols;var ie=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable;var N=(y,o,b)=>o in y?ae(y,o,{enumerable:!0,configurable:!0,writable:!0,value:b}):y[o]=b,T=(y,o)=>{for(var b in o||(o={}))ie.call(o,b)&&N(y,b,o[b]);if(G)for(var b of G(o))ue.call(o,b)&&N(y,b,o[b]);return y};import{J as de,aN as me,G as ce,B,k as M,L as g,M as R,N as F,O as A,Q as pe,P as ge,R as be,S as q,T as Ce,r as p,o as _,l as $,w as i,h as m,f as r,m as O,i as H,t as v,u as e,j as V,x as L,e as J,U as fe}from"./vendor.d12b5734.js";import{l as _e,m as $e,d as ye,b as ve,n as Ve}from"./main.465728e1.js";import{_ as we}from"./CreateCustomFields.c1c460e4.js";const he=["onSubmit"],Be={class:"flex items-center justify-end"},Me={class:"grid grid-cols-5 gap-4 mb-8"},Ie={class:"col-span-5 text-lg font-semibold text-left lg:col-span-1"},xe={class:"grid grid-cols-5 gap-4 mb-8"},Ue={class:"col-span-5 text-lg font-semibold text-left lg:col-span-1"},ke={class:"md:col-span-2"},Se={class:"text-sm text-gray-500"},qe={class:"grid grid-cols-5 gap-4 mb-8"},Le={class:"col-span-5 text-lg font-semibold text-left lg:col-span-1"},ze={class:"space-y-6"},Pe={class:"flex items-center justify-start mb-6 md:justify-end md:mb-0"},Fe={class:"p-1"},je={key:0,class:"grid grid-cols-5 gap-4 mb-8"},De={class:"col-span-5 text-lg font-semibold text-left lg:col-span-1"},Ee={class:"space-y-6"},Ge={class:"grid grid-cols-5 gap-2 mb-8"},Ne={key:0,class:"col-span-5 text-lg font-semibold text-left lg:col-span-1"},Te={class:"col-span-5 lg:col-span-4"},Je={setup(y){const o=_e(),b=$e(),z=ye(),Q=ve(),j="customFields",{t:c}=de(),K=me(),W=ce();let s=B(!1),C=B(!1),f=B(!1);B(!1);const I=B(!1),h=M(()=>W.name==="customers.edit");let X=M(()=>o.isFetchingInitialSettings);const D=M(()=>h.value?c("customers.edit_customer"):c("customers.new_customer")),Y=M(()=>({currentCustomer:{name:{required:g.withMessage(c("validation.required"),R),minLength:g.withMessage(c("validation.name_min_length",{count:3}),F(3))},prefix:{minLength:g.withMessage(c("validation.name_min_length",{count:3}),F(3))},currency_id:{required:g.withMessage(c("validation.required"),R)},email:{required:g.withMessage(c("validation.required"),A(o.currentCustomer.enable_portal==!0)),email:g.withMessage(c("validation.email_incorrect"),pe)},password:{required:g.withMessage(c("validation.required"),A(o.currentCustomer.enable_portal==!0&&!o.currentCustomer.password_added)),minLength:g.withMessage(c("validation.password_min_length",{count:8}),F(8))},confirm_password:{sameAsPassword:g.withMessage(c("validation.password_incorrect"),ge(o.currentCustomer.password))},website:{url:g.withMessage(c("validation.invalid_url"),be)},billing:{address_street_1:{maxLength:g.withMessage(c("validation.address_maxlength",{count:255}),q(255))},address_street_2:{maxLength:g.withMessage(c("validation.address_maxlength",{count:255}),q(255))}},shipping:{address_street_1:{maxLength:g.withMessage(c("validation.address_maxlength",{count:255}),q(255))},address_street_2:{maxLength:g.withMessage(c("validation.address_maxlength",{count:255}),q(255))}}}})),Z=M(()=>`${window.location.origin}/${Q.selectedCompany.slug}/customer/login`),a=Ce(Y,o,{$scope:j});o.resetCurrentCustomer(),o.fetchCustomerInitialSettings(h.value);async function ee(){if(a.value.$touch(),a.value.$invalid)return!0;I.value=!0;let l=T({},o.currentCustomer),t=null;try{t=await(h.value?o.updateCustomer:o.addCustomer)(l)}catch{I.value=!1;return}K.push(`/admin/customers/${t.data.data.id}/view`)}return(l,t)=>{const x=p("BaseBreadcrumbItem"),te=p("BaseBreadcrumb-item"),oe=p("BaseBreadcrumb"),w=p("BaseIcon"),E=p("BaseButton"),ne=p("BasePageHeader"),d=p("BaseInput"),u=p("BaseInputGroup"),P=p("BaseMultiselect"),U=p("BaseInputGrid"),k=p("BaseDivider"),re=p("BaseSwitch"),S=p("BaseTextarea"),se=p("BaseCard"),le=p("BasePage");return _(),$(le,null,{default:i(()=>[m("form",{onSubmit:fe(ee,["prevent"])},[r(ne,{title:e(D)},{actions:i(()=>[m("div",Be,[r(E,{type:"submit",loading:I.value,disabled:I.value},{left:i(n=>[r(w,{name:"SaveIcon",class:O(n.class)},null,8,["class"])]),default:i(()=>[H(" "+v(e(h)?l.$t("customers.update_customer"):l.$t("customers.save_customer")),1)]),_:1},8,["loading","disabled"])])]),default:i(()=>[r(oe,null,{default:i(()=>[r(x,{title:l.$t("general.home"),to:"dashboard"},null,8,["title"]),r(x,{title:l.$tc("customers.customer",2),to:"/admin/customers"},null,8,["title"]),r(te,{title:e(D),to:"#",active:""},null,8,["title"])]),_:1})]),_:1},8,["title"]),r(se,{class:"mt-5"},{default:i(()=>[m("div",Me,[m("h6",Ie,v(l.$t("customers.basic_info")),1),r(U,{class:"col-span-5 lg:col-span-4"},{default:i(()=>[r(u,{label:l.$t("customers.display_name"),required:"",error:e(a).currentCustomer.name.$error&&e(a).currentCustomer.name.$errors[0].$message,"content-loading":e(s)},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.name,"onUpdate:modelValue":t[0]||(t[0]=n=>e(o).currentCustomer.name=n),"content-loading":e(s),type:"text",name:"name",class:"",invalid:e(a).currentCustomer.name.$error,onInput:t[1]||(t[1]=n=>e(a).currentCustomer.name.$touch())},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["label","error","content-loading"]),r(u,{label:l.$t("customers.primary_contact_name"),"content-loading":e(s)},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.contact_name,"onUpdate:modelValue":t[2]||(t[2]=n=>e(o).currentCustomer.contact_name=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text"},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"]),r(u,{error:e(a).currentCustomer.email.$error&&e(a).currentCustomer.email.$errors[0].$message,"content-loading":e(s),label:l.$t("customers.email")},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.email,"onUpdate:modelValue":t[3]||(t[3]=n=>e(o).currentCustomer.email=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",name:"email",invalid:e(a).currentCustomer.email.$error,onInput:t[4]||(t[4]=n=>e(a).currentCustomer.email.$touch())},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["error","content-loading","label"]),r(u,{label:l.$t("customers.phone"),"content-loading":e(s)},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.phone,"onUpdate:modelValue":t[5]||(t[5]=n=>e(o).currentCustomer.phone=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",name:"phone"},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"]),r(u,{label:l.$t("customers.primary_currency"),"content-loading":e(s),error:e(a).currentCustomer.currency_id.$error&&e(a).currentCustomer.currency_id.$errors[0].$message,required:""},{default:i(()=>[r(P,{modelValue:e(o).currentCustomer.currency_id,"onUpdate:modelValue":t[6]||(t[6]=n=>e(o).currentCustomer.currency_id=n),"value-prop":"id",label:"name","track-by":"name","content-loading":e(s),options:e(z).currencies,searchable:"","can-deselect":!1,placeholder:l.$t("customers.select_currency"),invalid:e(a).currentCustomer.currency_id.$error,class:"w-full"},null,8,["modelValue","content-loading","options","placeholder","invalid"])]),_:1},8,["label","content-loading","error"]),r(u,{error:e(a).currentCustomer.website.$error&&e(a).currentCustomer.website.$errors[0].$message,label:l.$t("customers.website"),"content-loading":e(s)},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.website,"onUpdate:modelValue":t[7]||(t[7]=n=>e(o).currentCustomer.website=n),"content-loading":e(s),type:"url",onInput:t[8]||(t[8]=n=>e(a).currentCustomer.website.$touch())},null,8,["modelValue","content-loading"])]),_:1},8,["error","label","content-loading"]),r(u,{label:l.$t("customers.prefix"),error:e(a).currentCustomer.prefix.$error&&e(a).currentCustomer.prefix.$errors[0].$message,"content-loading":e(s)},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.prefix,"onUpdate:modelValue":t[9]||(t[9]=n=>e(o).currentCustomer.prefix=n),"content-loading":e(s),type:"text",name:"name",class:"",invalid:e(a).currentCustomer.prefix.$error,onInput:t[10]||(t[10]=n=>e(a).currentCustomer.prefix.$touch())},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["label","error","content-loading"])]),_:1})]),r(k,{class:"mb-5 md:mb-8"}),m("div",xe,[m("h6",Ue,v(l.$t("customers.portal_access")),1),r(U,{class:"col-span-5 lg:col-span-4"},{default:i(()=>[m("div",ke,[m("p",Se,v(l.$t("customers.portal_access_text")),1),r(re,{modelValue:e(o).currentCustomer.enable_portal,"onUpdate:modelValue":t[11]||(t[11]=n=>e(o).currentCustomer.enable_portal=n),class:"mt-1 flex"},null,8,["modelValue"])]),e(o).currentCustomer.enable_portal?(_(),$(u,{key:0,"content-loading":e(s),label:l.$t("customers.portal_access_url"),class:"md:col-span-2","help-text":l.$t("customers.portal_access_url_help")},{default:i(()=>[r(Ve,{token:e(Z)},null,8,["token"])]),_:1},8,["content-loading","label","help-text"])):V("",!0),e(o).currentCustomer.enable_portal?(_(),$(u,{key:1,"content-loading":e(s),error:e(a).currentCustomer.password.$error&&e(a).currentCustomer.password.$errors[0].$message,label:l.$t("customers.password")},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.password,"onUpdate:modelValue":t[14]||(t[14]=n=>e(o).currentCustomer.password=n),modelModifiers:{trim:!0},"content-loading":e(s),type:e(C)?"text":"password",name:"password",invalid:e(a).currentCustomer.password.$error,onInput:t[15]||(t[15]=n=>e(a).currentCustomer.password.$touch())},{right:i(()=>[e(C)?(_(),$(w,{key:0,name:"EyeOffIcon",class:"w-5 h-5 mr-1 text-gray-500 cursor-pointer",onClick:t[12]||(t[12]=n=>L(C)?C.value=!e(C):C=!e(C))})):(_(),$(w,{key:1,name:"EyeIcon",class:"w-5 h-5 mr-1 text-gray-500 cursor-pointer",onClick:t[13]||(t[13]=n=>L(C)?C.value=!e(C):C=!e(C))}))]),_:1},8,["modelValue","content-loading","type","invalid"])]),_:1},8,["content-loading","error","label"])):V("",!0),e(o).currentCustomer.enable_portal?(_(),$(u,{key:2,error:e(a).currentCustomer.confirm_password.$error&&e(a).currentCustomer.confirm_password.$errors[0].$message,"content-loading":e(s),label:"Confirm Password"},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.confirm_password,"onUpdate:modelValue":t[18]||(t[18]=n=>e(o).currentCustomer.confirm_password=n),modelModifiers:{trim:!0},"content-loading":e(s),type:e(f)?"text":"password",name:"confirm_password",invalid:e(a).currentCustomer.confirm_password.$error,onInput:t[19]||(t[19]=n=>e(a).currentCustomer.confirm_password.$touch())},{right:i(()=>[e(f)?(_(),$(w,{key:0,name:"EyeOffIcon",class:"w-5 h-5 mr-1 text-gray-500 cursor-pointer",onClick:t[16]||(t[16]=n=>L(f)?f.value=!e(f):f=!e(f))})):(_(),$(w,{key:1,name:"EyeIcon",class:"w-5 h-5 mr-1 text-gray-500 cursor-pointer",onClick:t[17]||(t[17]=n=>L(f)?f.value=!e(f):f=!e(f))}))]),_:1},8,["modelValue","content-loading","type","invalid"])]),_:1},8,["error","content-loading"])):V("",!0)]),_:1})]),r(k,{class:"mb-5 md:mb-8"}),m("div",qe,[m("h6",Le,v(l.$t("customers.billing_address")),1),e(o).currentCustomer.billing?(_(),$(U,{key:0,class:"col-span-5 lg:col-span-4"},{default:i(()=>[r(u,{label:l.$t("customers.name"),"content-loading":e(s)},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.billing.name,"onUpdate:modelValue":t[20]||(t[20]=n=>e(o).currentCustomer.billing.name=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",class:"w-full",name:"address_name"},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"]),r(u,{label:l.$t("customers.country"),"content-loading":e(s)},{default:i(()=>[r(P,{modelValue:e(o).currentCustomer.billing.country_id,"onUpdate:modelValue":t[21]||(t[21]=n=>e(o).currentCustomer.billing.country_id=n),"value-prop":"id",label:"name","track-by":"name","resolve-on-load":"",searchable:"","content-loading":e(s),options:e(z).countries,placeholder:l.$t("general.select_country"),class:"w-full"},null,8,["modelValue","content-loading","options","placeholder"])]),_:1},8,["label","content-loading"]),r(u,{label:l.$t("customers.state"),"content-loading":e(s)},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.billing.state,"onUpdate:modelValue":t[22]||(t[22]=n=>e(o).currentCustomer.billing.state=n),"content-loading":e(s),name:"billing.state",type:"text"},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"]),r(u,{"content-loading":e(s),label:l.$t("customers.city")},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.billing.city,"onUpdate:modelValue":t[23]||(t[23]=n=>e(o).currentCustomer.billing.city=n),"content-loading":e(s),name:"billing.city",type:"text"},null,8,["modelValue","content-loading"])]),_:1},8,["content-loading","label"]),r(u,{label:l.$t("customers.address"),error:e(a).currentCustomer.billing.address_street_1.$error&&e(a).currentCustomer.billing.address_street_1.$errors[0].$message||e(a).currentCustomer.billing.address_street_2.$error&&e(a).currentCustomer.billing.address_street_2.$errors[0].$message,"content-loading":e(s)},{default:i(()=>[r(S,{modelValue:e(o).currentCustomer.billing.address_street_1,"onUpdate:modelValue":t[24]||(t[24]=n=>e(o).currentCustomer.billing.address_street_1=n),modelModifiers:{trim:!0},"content-loading":e(s),placeholder:l.$t("general.street_1"),type:"text",name:"billing_street1","container-class":"mt-3",onInput:t[25]||(t[25]=n=>e(a).currentCustomer.billing.address_street_1.$touch())},null,8,["modelValue","content-loading","placeholder"]),r(S,{modelValue:e(o).currentCustomer.billing.address_street_2,"onUpdate:modelValue":t[26]||(t[26]=n=>e(o).currentCustomer.billing.address_street_2=n),modelModifiers:{trim:!0},"content-loading":e(s),placeholder:l.$t("general.street_2"),type:"text",class:"mt-3",name:"billing_street2","container-class":"mt-3",onInput:t[27]||(t[27]=n=>e(a).currentCustomer.billing.address_street_2.$touch())},null,8,["modelValue","content-loading","placeholder"])]),_:1},8,["label","error","content-loading"]),m("div",ze,[r(u,{"content-loading":e(s),label:l.$t("customers.phone"),class:"text-left"},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.billing.phone,"onUpdate:modelValue":t[28]||(t[28]=n=>e(o).currentCustomer.billing.phone=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",name:"phone"},null,8,["modelValue","content-loading"])]),_:1},8,["content-loading","label"]),r(u,{label:l.$t("customers.zip_code"),"content-loading":e(s),class:"mt-2 text-left"},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.billing.zip,"onUpdate:modelValue":t[29]||(t[29]=n=>e(o).currentCustomer.billing.zip=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",name:"zip"},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"])])]),_:1})):V("",!0)]),r(k,{class:"mb-5 md:mb-8"}),m("div",Pe,[m("div",Fe,[r(E,{type:"button","content-loading":e(s),size:"sm",variant:"primary-outline",onClick:t[30]||(t[30]=n=>e(o).copyAddress(!0))},{left:i(n=>[r(w,{name:"DocumentDuplicateIcon",class:O(n.class)},null,8,["class"])]),default:i(()=>[H(" "+v(l.$t("customers.copy_billing_address")),1)]),_:1},8,["content-loading"])])]),e(o).currentCustomer.shipping?(_(),J("div",je,[m("h6",De,v(l.$t("customers.shipping_address")),1),r(U,{class:"col-span-5 lg:col-span-4"},{default:i(()=>[r(u,{"content-loading":e(s),label:l.$t("customers.name")},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.shipping.name,"onUpdate:modelValue":t[31]||(t[31]=n=>e(o).currentCustomer.shipping.name=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",name:"address_name"},null,8,["modelValue","content-loading"])]),_:1},8,["content-loading","label"]),r(u,{label:l.$t("customers.country"),"content-loading":e(s)},{default:i(()=>[r(P,{modelValue:e(o).currentCustomer.shipping.country_id,"onUpdate:modelValue":t[32]||(t[32]=n=>e(o).currentCustomer.shipping.country_id=n),"value-prop":"id",label:"name","track-by":"name","resolve-on-load":"",searchable:"","content-loading":e(s),options:e(z).countries,placeholder:l.$t("general.select_country"),class:"w-full"},null,8,["modelValue","content-loading","options","placeholder"])]),_:1},8,["label","content-loading"]),r(u,{label:l.$t("customers.state"),"content-loading":e(s)},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.shipping.state,"onUpdate:modelValue":t[33]||(t[33]=n=>e(o).currentCustomer.shipping.state=n),"content-loading":e(s),name:"shipping.state",type:"text"},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"]),r(u,{"content-loading":e(s),label:l.$t("customers.city")},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.shipping.city,"onUpdate:modelValue":t[34]||(t[34]=n=>e(o).currentCustomer.shipping.city=n),"content-loading":e(s),name:"shipping.city",type:"text"},null,8,["modelValue","content-loading"])]),_:1},8,["content-loading","label"]),r(u,{label:l.$t("customers.address"),"content-loading":e(s),error:e(a).currentCustomer.shipping.address_street_1.$error&&e(a).currentCustomer.shipping.address_street_1.$errors[0].$message||e(a).currentCustomer.shipping.address_street_2.$error&&e(a).currentCustomer.shipping.address_street_2.$errors[0].$message},{default:i(()=>[r(S,{modelValue:e(o).currentCustomer.shipping.address_street_1,"onUpdate:modelValue":t[35]||(t[35]=n=>e(o).currentCustomer.shipping.address_street_1=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",placeholder:l.$t("general.street_1"),name:"shipping_street1",onInput:t[36]||(t[36]=n=>e(a).currentCustomer.shipping.address_street_1.$touch())},null,8,["modelValue","content-loading","placeholder"]),r(S,{modelValue:e(o).currentCustomer.shipping.address_street_2,"onUpdate:modelValue":t[37]||(t[37]=n=>e(o).currentCustomer.shipping.address_street_2=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",placeholder:l.$t("general.street_2"),name:"shipping_street2",class:"mt-3","container-class":"mt-3",onInput:t[38]||(t[38]=n=>e(a).currentCustomer.shipping.address_street_2.$touch())},null,8,["modelValue","content-loading","placeholder"])]),_:1},8,["label","content-loading","error"]),m("div",Ee,[r(u,{"content-loading":e(s),label:l.$t("customers.phone"),class:"text-left"},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.shipping.phone,"onUpdate:modelValue":t[39]||(t[39]=n=>e(o).currentCustomer.shipping.phone=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",name:"phone"},null,8,["modelValue","content-loading"])]),_:1},8,["content-loading","label"]),r(u,{label:l.$t("customers.zip_code"),"content-loading":e(s),class:"mt-2 text-left"},{default:i(()=>[r(d,{modelValue:e(o).currentCustomer.shipping.zip,"onUpdate:modelValue":t[40]||(t[40]=n=>e(o).currentCustomer.shipping.zip=n),modelModifiers:{trim:!0},"content-loading":e(s),type:"text",name:"zip"},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"])])]),_:1})])):V("",!0),e(b).customFields.length>0?(_(),$(k,{key:1,class:"mb-5 md:mb-8"})):V("",!0),m("div",Ge,[e(b).customFields.length>0?(_(),J("h6",Ne,v(l.$t("settings.custom_fields.title")),1)):V("",!0),m("div",Te,[r(we,{type:"Customer",store:e(o),"store-prop":"currentCustomer","is-edit":e(h),"is-loading":e(X),"custom-field-scope":j},null,8,["store","is-edit","is-loading"])])])]),_:1})],40,he)]),_:1})}}};export{Je as default};
diff --git a/public/build/assets/Create.f0feda6b.js b/public/build/assets/Create.f0feda6b.js
deleted file mode 100644
index 019f36bec..000000000
--- a/public/build/assets/Create.f0feda6b.js
+++ /dev/null
@@ -1 +0,0 @@
-var oe=Object.defineProperty,se=Object.defineProperties;var le=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable;var P=(u,e,r)=>e in u?oe(u,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[e]=r,b=(u,e)=>{for(var r in e||(e={}))re.call(e,r)&&P(u,r,e[r]);if(N)for(var r of N(e))ie.call(e,r)&&P(u,r,e[r]);return u},h=(u,e)=>se(u,le(e));import{J as me,G as ue,aN as ce,B as T,k as p,L as x,M as de,N as pe,S as _e,T as ge,r as s,o as M,l as w,w as l,f as o,u as t,h as j,x as q,i as E,t as G,j as L,m as Ie,U as fe}from"./vendor.d12b5734.js";import{p as ve,q as Be,c as be,b as $e,e as ye,g as Ve}from"./main.465728e1.js";import{_ as Se}from"./ItemUnitModal.031bb625.js";const he=["onSubmit"],Ue={setup(u){const e=ve(),r=Be(),$=be(),z=$e(),{t:_}=me(),y=ue(),A=ce(),D=ye(),I=T(!1),V=T(z.selectedCompanySettings.tax_per_item);let i=T(!1);e.$reset(),J();const v=p({get:()=>e.currentItem.price/100,set:n=>{e.currentItem.price=Math.round(n*100)}}),S=p({get:()=>{var n,a;return(a=(n=e==null?void 0:e.currentItem)==null?void 0:n.taxes)==null?void 0:a.map(d=>{if(d)return h(b({},d),{tax_type_id:d.id,tax_name:d.name+" ("+d.percent+"%)"})})},set:n=>{e.currentItem.taxes=n}}),B=p(()=>y.name==="items.edit"),U=p(()=>B.value?_("items.edit_item"):_("items.new_item")),R=p(()=>r.taxTypes.map(n=>h(b({},n),{tax_type_id:n.id,tax_name:n.name+" ("+n.percent+"%)"}))),Y=p(()=>V.value==="YES"),H=p(()=>({currentItem:{name:{required:x.withMessage(_("validation.required"),de),minLength:x.withMessage(_("validation.name_min_length",{count:3}),pe(3))},description:{maxLength:x.withMessage(_("validation.description_maxlength"),_e(65e3))}}})),c=ge(H,e);async function F(){$.openModal({title:_("settings.customization.items.add_item_unit"),componentName:"ItemUnitModal",size:"sm"})}async function J(){if(i.value=!0,await e.fetchItemUnits({limit:"all"}),D.hasAbilities(Ve.VIEW_TAX_TYPE)&&await r.fetchTaxTypes({limit:"all"}),B.value){let n=y.params.id;await e.fetchItem(n),e.currentItem.tax_per_item===1?V.value="YES":V.value="NO"}i.value=!1}async function O(){if(c.value.currentItem.$touch(),c.value.currentItem.$invalid)return!1;I.value=!0;try{let a=b({id:y.params.id},e.currentItem);e.currentItem&&e.currentItem.taxes&&(a.taxes=e.currentItem.taxes.map(g=>({tax_type_id:g.tax_type_id,amount:v.value*g.percent,percent:g.percent,name:g.name,collective_tax:0}))),await(B.value?e.updateItem:e.addItem)(a),I.value=!1,A.push("/admin/items"),n()}catch{I.value=!1;return}function n(){$.closeModal(),setTimeout(()=>{e.resetCurrentItem(),$.$reset(),c.value.$reset()},300)}}return(n,a)=>{const d=s("BaseBreadcrumbItem"),g=s("BaseBreadcrumb"),W=s("BasePageHeader"),X=s("BaseInput"),f=s("BaseInputGroup"),K=s("BaseMoney"),C=s("BaseIcon"),Q=s("BaseSelectAction"),k=s("BaseMultiselect"),Z=s("BaseTextarea"),ee=s("BaseButton"),te=s("BaseInputGrid"),ne=s("BaseCard"),ae=s("BasePage");return M(),w(ae,null,{default:l(()=>[o(W,{title:t(U)},{default:l(()=>[o(g,null,{default:l(()=>[o(d,{title:n.$t("general.home"),to:"dashboard"},null,8,["title"]),o(d,{title:n.$tc("items.item",2),to:"/admin/items"},null,8,["title"]),o(d,{title:t(U),to:"#",active:""},null,8,["title"])]),_:1})]),_:1},8,["title"]),o(Se),j("form",{class:"grid lg:grid-cols-2 mt-6",action:"submit",onSubmit:fe(O,["prevent"])},[o(ne,{class:"w-full"},{default:l(()=>[o(te,{layout:"one-column"},{default:l(()=>[o(f,{label:n.$t("items.name"),"content-loading":t(i),required:"",error:t(c).currentItem.name.$error&&t(c).currentItem.name.$errors[0].$message},{default:l(()=>[o(X,{modelValue:t(e).currentItem.name,"onUpdate:modelValue":a[0]||(a[0]=m=>t(e).currentItem.name=m),"content-loading":t(i),invalid:t(c).currentItem.name.$error,onInput:a[1]||(a[1]=m=>t(c).currentItem.name.$touch())},null,8,["modelValue","content-loading","invalid"])]),_:1},8,["label","content-loading","error"]),o(f,{label:n.$t("items.price"),"content-loading":t(i)},{default:l(()=>[o(K,{modelValue:t(v),"onUpdate:modelValue":a[2]||(a[2]=m=>q(v)?v.value=m:null),"content-loading":t(i)},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading"]),o(f,{"content-loading":t(i),label:n.$t("items.unit")},{default:l(()=>[o(k,{modelValue:t(e).currentItem.unit_id,"onUpdate:modelValue":a[3]||(a[3]=m=>t(e).currentItem.unit_id=m),"content-loading":t(i),label:"name",options:t(e).itemUnits,"value-prop":"id","can-deselect":!1,"can-clear":!1,placeholder:n.$t("items.select_a_unit"),searchable:"","track-by":"name"},{action:l(()=>[o(Q,{onClick:F},{default:l(()=>[o(C,{name:"PlusIcon",class:"h-4 mr-2 -ml-2 text-center text-primary-400"}),E(" "+G(n.$t("settings.customization.items.add_item_unit")),1)]),_:1})]),_:1},8,["modelValue","content-loading","options","placeholder"])]),_:1},8,["content-loading","label"]),t(Y)?(M(),w(f,{key:0,label:n.$t("items.taxes"),"content-loading":t(i)},{default:l(()=>[o(k,{modelValue:t(S),"onUpdate:modelValue":a[4]||(a[4]=m=>q(S)?S.value=m:null),"content-loading":t(i),options:t(R),mode:"tags",label:"tax_name",class:"w-full","value-prop":"id","can-deselect":!1,"can-clear":!1,searchable:"","track-by":"tax_name",object:""},null,8,["modelValue","content-loading","options"])]),_:1},8,["label","content-loading"])):L("",!0),o(f,{label:n.$t("items.description"),"content-loading":t(i),error:t(c).currentItem.description.$error&&t(c).currentItem.description.$errors[0].$message},{default:l(()=>[o(Z,{modelValue:t(e).currentItem.description,"onUpdate:modelValue":a[5]||(a[5]=m=>t(e).currentItem.description=m),"content-loading":t(i),name:"description",row:2,rows:"2",onInput:a[6]||(a[6]=m=>t(c).currentItem.description.$touch())},null,8,["modelValue","content-loading"])]),_:1},8,["label","content-loading","error"]),j("div",null,[o(ee,{"content-loading":t(i),type:"submit",loading:I.value},{left:l(m=>[I.value?L("",!0):(M(),w(C,{key:0,name:"SaveIcon",class:Ie(m.class)},null,8,["class"]))]),default:l(()=>[E(" "+G(t(B)?n.$t("items.update_item"):n.$t("items.save_item")),1)]),_:1},8,["content-loading","loading"])])]),_:1})]),_:1})],40,he)]),_:1})}}};export{Ue as default};
diff --git a/public/build/assets/CreateCustomFields.c1c460e4.js b/public/build/assets/CreateCustomFields.c1c460e4.js
deleted file mode 100644
index c92d2716e..000000000
--- a/public/build/assets/CreateCustomFields.c1c460e4.js
+++ /dev/null
@@ -1 +0,0 @@
-var I=Object.defineProperty,b=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var f=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))q.call(t,r)&&f(e,r,t[r]);if(y)for(var r of y(t))h.call(t,r)&&f(e,r,t[r]);return e},v=(e,t)=>b(e,g(t));import{J as j,L as w,O as V,T as L,k as T,aE as F,r as E,o as n,l as m,w as P,aj as O,u as c,_ as S,C as x,e as D,f as A,F as R,y as k,j as B,I as C}from"./vendor.d12b5734.js";import{o as i,m as Y}from"./main.465728e1.js";function $(e){switch(e){case"./types/DateTimeType.vue":return i(()=>import("./DateTimeType.6886ff98.js"),["assets/DateTimeType.6886ff98.js","assets/vendor.d12b5734.js"]);case"./types/DateType.vue":return i(()=>import("./DateType.12fc8765.js"),["assets/DateType.12fc8765.js","assets/vendor.d12b5734.js"]);case"./types/DropdownType.vue":return i(()=>import("./DropdownType.2d01b840.js"),["assets/DropdownType.2d01b840.js","assets/vendor.d12b5734.js"]);case"./types/InputType.vue":return i(()=>import("./InputType.cf0dfc7c.js"),["assets/InputType.cf0dfc7c.js","assets/vendor.d12b5734.js"]);case"./types/NumberType.vue":return i(()=>import("./NumberType.7b73360f.js"),["assets/NumberType.7b73360f.js","assets/vendor.d12b5734.js"]);case"./types/PhoneType.vue":return i(()=>import("./PhoneType.29ae66c8.js"),["assets/PhoneType.29ae66c8.js","assets/vendor.d12b5734.js"]);case"./types/SwitchType.vue":return i(()=>import("./SwitchType.591a8b07.js"),["assets/SwitchType.591a8b07.js","assets/vendor.d12b5734.js"]);case"./types/TextAreaType.vue":return i(()=>import("./TextAreaType.27565abe.js"),["assets/TextAreaType.27565abe.js","assets/vendor.d12b5734.js"]);case"./types/TimeType.vue":return i(()=>import("./TimeType.8ac8afd1.js"),["assets/TimeType.8ac8afd1.js","assets/vendor.d12b5734.js"]);case"./types/UrlType.vue":return i(()=>import("./UrlType.d123ab64.js"),["assets/UrlType.d123ab64.js","assets/vendor.d12b5734.js"]);default:return new Promise(function(t,r){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}const M={props:{field:{type:Object,required:!0},customFieldScope:{type:String,required:!0},index:{type:Number,required:!0},store:{type:Object,required:!0},storeProp:{type:String,required:!0}},setup(e){const t=e,{t:r}=j(),d={value:{required:w.withMessage(r("validation.required"),V(t.field.is_required))}},a=L(d,T(()=>t.field),{$scope:t.customFieldScope}),o=T(()=>t.field.type?F(()=>$(`./types/${t.field.type}Type.vue`)):!1);return(u,s)=>{const l=E("BaseInputGroup");return n(),m(l,{label:e.field.label,required:!!e.field.is_required,error:c(a).value.$error&&c(a).value.$errors[0].$message},{default:P(()=>[(n(),m(O(c(o)),{modelValue:e.field.value,"onUpdate:modelValue":s[0]||(s[0]=p=>e.field.value=p),options:e.field.options,invalid:c(a).value.$error,placeholder:e.field.placeholder},null,8,["modelValue","options","invalid","placeholder"]))]),_:1},8,["label","required","error"])}}},N={key:0},J={props:{store:{type:Object,required:!0},storeProp:{type:String,required:!0},isEdit:{type:Boolean,default:!1},type:{type:String,default:null},gridLayout:{type:String,default:"two-column"},isLoading:{type:Boolean,default:null},customFieldScope:{type:String,required:!0}},setup(e){const t=e,r=Y();a();function d(){t.isEdit&&t.store[t.storeProp].fields.forEach(o=>{const u=t.store[t.storeProp].customFields.findIndex(s=>s.id===o.custom_field_id);if(u>-1){let s=o.default_answer;s&&o.custom_field.type==="DateTime"&&(s=C(o.default_answer,"YYYY-MM-DD HH:mm:ss").format("YYYY-MM-DD HH:mm")),t.store[t.storeProp].customFields[u]=v(_({},o),{id:o.custom_field_id,value:s,label:o.custom_field.label,options:o.custom_field.options,is_required:o.custom_field.is_required,placeholder:o.custom_field.placeholder,order:o.custom_field.order})}})}async function a(){let u=(await r.fetchCustomFields({type:t.type,limit:"all"})).data.data;u.map(s=>s.value=s.default_answer),t.store[t.storeProp].customFields=S.sortBy(u,s=>s.order),d()}return x(()=>t.store[t.storeProp].fields,o=>{d()}),(o,u)=>{const s=E("BaseInputGrid");return e.store[e.storeProp]&&e.store[e.storeProp].customFields.length>0&&!e.isLoading?(n(),D("div",N,[A(s,{layout:e.gridLayout},{default:P(()=>[(n(!0),D(R,null,k(e.store[e.storeProp].customFields,(l,p)=>(n(),m(M,{key:l.id,"custom-field-scope":e.customFieldScope,store:e.store,"store-prop":e.storeProp,index:p,field:l},null,8,["custom-field-scope","store","store-prop","index","field"]))),128))]),_:1},8,["layout"])])):B("",!0)}}};export{J as _};
diff --git a/public/build/assets/CustomFieldsSetting.feceee26.js b/public/build/assets/CustomFieldsSetting.feceee26.js
deleted file mode 100644
index 7b1988600..000000000
--- a/public/build/assets/CustomFieldsSetting.feceee26.js
+++ /dev/null
@@ -1 +0,0 @@
-var ie=Object.defineProperty;var W=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable;var Z=(m,n,e)=>n in m?ie(m,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[n]=e,ee=(m,n)=>{for(var e in n||(n={}))de.call(n,e)&&Z(m,e,n[e]);if(W)for(var e of W(n))me.call(n,e)&&Z(m,e,n[e]);return m};import{J as H,G as ce,ah as te,r as d,o as C,l as F,w as u,f as l,u as t,i as B,t as $,j as M,B as L,e as z,aY as pe,U as se,a0 as le,k as D,aE as _e,L as k,M as A,aT as fe,T as ye,h as O,x as oe,y as ve,m as G,F as Ce,aj as be,V as ge}from"./vendor.d12b5734.js";import{j as Fe,u as Te,m as K,e as ae,c as Y,g as U,o as T}from"./main.465728e1.js";const we={props:{row:{type:Object,default:null},table:{type:Object,default:null},loadData:{type:Function,default:null}},setup(m){const n=m,e=Fe();Te();const{t:i}=H(),v=K();ce();const f=ae(),c=Y();te("utils");async function p(b){await v.fetchCustomField(b),c.openModal({title:i("settings.custom_fields.edit_custom_field"),componentName:"CustomFieldModal",size:"sm",data:b,refreshData:n.loadData})}async function V(b){e.openDialog({title:i("general.are_you_sure"),message:i("settings.custom_fields.custom_field_confirm_delete"),yesLabel:i("general.ok"),noLabel:i("general.cancel"),variant:"danger",hideNoButton:!1,size:"lg"}).then(async g=>{g&&(await v.deleteCustomFields(b),n.loadData&&n.loadData())})}return(b,g)=>{const y=d("BaseIcon"),I=d("BaseDropdownItem"),h=d("BaseDropdown");return C(),F(h,null,{activator:u(()=>[l(y,{name:"DotsHorizontalIcon",class:"h-5 text-gray-500"})]),default:u(()=>[t(f).hasAbilities(t(U).EDIT_CUSTOM_FIELDS)?(C(),F(I,{key:0,onClick:g[0]||(g[0]=o=>p(m.row.id))},{default:u(()=>[l(y,{name:"PencilIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),B(" "+$(b.$t("general.edit")),1)]),_:1})):M("",!0),t(f).hasAbilities(t(U).DELETE_CUSTOM_FIELDS)?(C(),F(I,{key:1,onClick:g[1]||(g[1]=o=>V(m.row.id))},{default:u(()=>[l(y,{name:"TrashIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),B(" "+$(b.$t("general.delete")),1)]),_:1})):M("",!0)]),_:1})}}},$e={class:"flex items-center mt-1"},Ie={emits:["onAdd"],setup(m,{emit:n}){const e=L(null);function i(){if(e.value==null||e.value==""||e.value==null)return!0;n("onAdd",e.value),e.value=null}return(v,f)=>{const c=d("BaseInput"),p=d("BaseIcon");return C(),z("div",$e,[l(c,{modelValue:e.value,"onUpdate:modelValue":f[0]||(f[0]=V=>e.value=V),type:"text",class:"w-full md:w-96",placeholder:v.$t("settings.custom_fields.press_enter_to_add"),onClick:i,onKeydown:pe(se(i,["prevent","stop"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),l(p,{name:"PlusCircleIcon",class:"ml-1 text-primary-500 cursor-pointer",onClick:i})])}}};function he(m){switch(m){case"../../custom-fields/types/DateTimeType.vue":return T(()=>import("./DateTimeType.6886ff98.js"),["assets/DateTimeType.6886ff98.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/DateType.vue":return T(()=>import("./DateType.12fc8765.js"),["assets/DateType.12fc8765.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/DropdownType.vue":return T(()=>import("./DropdownType.2d01b840.js"),["assets/DropdownType.2d01b840.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/InputType.vue":return T(()=>import("./InputType.cf0dfc7c.js"),["assets/InputType.cf0dfc7c.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/NumberType.vue":return T(()=>import("./NumberType.7b73360f.js"),["assets/NumberType.7b73360f.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/PhoneType.vue":return T(()=>import("./PhoneType.29ae66c8.js"),["assets/PhoneType.29ae66c8.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/SwitchType.vue":return T(()=>import("./SwitchType.591a8b07.js"),["assets/SwitchType.591a8b07.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/TextAreaType.vue":return T(()=>import("./TextAreaType.27565abe.js"),["assets/TextAreaType.27565abe.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/TimeType.vue":return T(()=>import("./TimeType.8ac8afd1.js"),["assets/TimeType.8ac8afd1.js","assets/vendor.d12b5734.js"]);case"../../custom-fields/types/UrlType.vue":return T(()=>import("./UrlType.d123ab64.js"),["assets/UrlType.d123ab64.js","assets/vendor.d12b5734.js"]);default:return new Promise(function(n,e){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(e.bind(null,new Error("Unknown variable dynamic import: "+m)))})}}const Be={class:"flex justify-between w-full"},De=["onSubmit"],Ve={class:"overflow-y-auto max-h-[550px]"},Se={class:"px-4 md:px-8 py-8 overflow-y-auto sm:p-6"},Ee={class:"z-0 flex justify-end p-4 border-t border-solid border-gray-light border-modal-bg"},qe={setup(m){const n=Y(),e=K(),{t:i}=H();let v=L(!1);const f=le(["Customer","Invoice","Estimate","Expense","Payment"]),c=le([{label:"Text",value:"Input"},{label:"Textarea",value:"TextArea"},{label:"Phone",value:"Phone"},{label:"URL",value:"Url"},{label:"Number",value:"Number"},{label:"Select Field",value:"Dropdown"},{label:"Switch Toggle",value:"Switch"},{label:"Date",value:"Date"},{label:"Time",value:"Time"},{label:"Date & Time",value:"DateTime"}]);let p=L(c[0]);const V=D(()=>n.active&&n.componentName==="CustomFieldModal"),b=D(()=>p.value&&p.value.label==="Switch Toggle"),g=D(()=>p.value&&p.value.label==="Select Field"),y=D(()=>e.currentCustomField.type?_e(()=>he(`../../custom-fields/types/${e.currentCustomField.type}Type.vue`)):!1),I=D({get:()=>e.currentCustomField.is_required===1,set:s=>{const a=s?1:0;e.currentCustomField.is_required=a}}),h=D(()=>({currentCustomField:{type:{required:k.withMessage(i("validation.required"),A)},name:{required:k.withMessage(i("validation.required"),A)},label:{required:k.withMessage(i("validation.required"),A)},model_type:{required:k.withMessage(i("validation.required"),A)},order:{required:k.withMessage(i("validation.required"),A),numeric:k.withMessage(i("validation.numbers_only"),fe)},type:{required:k.withMessage(i("validation.required"),A)}}})),o=ye(h,D(()=>e));function S(){e.isEdit?p.value=c.find(s=>s.value==e.currentCustomField.type):(e.currentCustomField.model_type=f[0],e.currentCustomField.type=c[0].value,p.value=c[0])}async function P(){if(o.value.currentCustomField.$touch(),o.value.currentCustomField.$invalid)return!0;v.value=!0;let s=ee({},e.currentCustomField);if(e.currentCustomField.options&&(s.options=e.currentCustomField.options.map(E=>E.name)),s.type=="Time"&&typeof s.default_answer=="object"){let E=s&&s.default_answer&&s.default_answer.HH?s.default_answer.HH:null,q=s&&s.default_answer&&s.default_answer.mm?s.default_answer.mm:null;s&&s.default_answer&&s.default_answer.ss&&s.default_answer.ss,s.default_answer=`${E}:${q}`}await(e.isEdit?e.updateCustomField:e.addCustomField)(s),v.value=!1,n.refreshData&&n.refreshData(),R()}function x(s){e.currentCustomField.options=[{name:s},...e.currentCustomField.options]}function _(s){if(e.isEdit&&e.currentCustomField.in_use)return;e.currentCustomField.options[s].name===e.currentCustomField.default_answer&&(e.currentCustomField.default_answer=null),e.currentCustomField.options.splice(s,1)}function N(s){e.currentCustomField.type=s.value}function R(){n.closeModal(),setTimeout(()=>{e.resetCurrentCustomField(),o.value.$reset()},300)}return(s,a)=>{const E=d("BaseIcon"),q=d("BaseInput"),w=d("BaseInputGroup"),J=d("BaseMultiselect"),re=d("BaseSwitch"),ne=d("BaseInputGrid"),X=d("BaseButton"),ue=d("BaseModal");return C(),F(ue,{show:t(V),onOpen:S},{header:u(()=>[O("div",Be,[B($(t(n).title)+" ",1),l(E,{name:"XIcon",class:"w-6 h-6 text-gray-500 cursor-pointer",onClick:R})])]),default:u(()=>[O("form",{action:"",onSubmit:se(P,["prevent"])},[O("div",Ve,[O("div",Se,[l(ne,{layout:"one-column"},{default:u(()=>[l(w,{label:s.$t("settings.custom_fields.name"),required:"",error:t(o).currentCustomField.name.$error&&t(o).currentCustomField.name.$errors[0].$message},{default:u(()=>[l(q,{ref:(r,j)=>{j.name=r},modelValue:t(e).currentCustomField.name,"onUpdate:modelValue":a[0]||(a[0]=r=>t(e).currentCustomField.name=r),invalid:t(o).currentCustomField.name.$error,onInput:a[1]||(a[1]=r=>t(o).currentCustomField.name.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),l(w,{label:s.$t("settings.custom_fields.model"),error:t(o).currentCustomField.model_type.$error&&t(o).currentCustomField.model_type.$errors[0].$message,"help-text":t(e).currentCustomField.in_use?s.$t("settings.custom_fields.model_in_use"):"",required:""},{default:u(()=>[l(J,{modelValue:t(e).currentCustomField.model_type,"onUpdate:modelValue":a[2]||(a[2]=r=>t(e).currentCustomField.model_type=r),options:t(f),"can-deselect":!1,invalid:t(o).currentCustomField.model_type.$error,searchable:!0,disabled:t(e).currentCustomField.in_use,onInput:a[3]||(a[3]=r=>t(o).currentCustomField.model_type.$touch())},null,8,["modelValue","options","invalid","disabled"])]),_:1},8,["label","error","help-text"]),l(w,{class:"flex items-center space-x-4",label:s.$t("settings.custom_fields.required")},{default:u(()=>[l(re,{modelValue:t(I),"onUpdate:modelValue":a[4]||(a[4]=r=>oe(I)?I.value=r:null)},null,8,["modelValue"])]),_:1},8,["label"]),l(w,{label:s.$t("settings.custom_fields.type"),error:t(o).currentCustomField.type.$error&&t(o).currentCustomField.type.$errors[0].$message,"help-text":t(e).currentCustomField.in_use?s.$t("settings.custom_fields.type_in_use"):"",required:""},{default:u(()=>[l(J,{modelValue:t(p),"onUpdate:modelValue":[a[5]||(a[5]=r=>oe(p)?p.value=r:p=r),N],options:t(c),invalid:t(o).currentCustomField.type.$error,disabled:t(e).currentCustomField.in_use,searchable:!0,"can-deselect":!1,object:""},null,8,["modelValue","options","invalid","disabled"])]),_:1},8,["label","error","help-text"]),l(w,{label:s.$t("settings.custom_fields.label"),required:"",error:t(o).currentCustomField.label.$error&&t(o).currentCustomField.label.$errors[0].$message},{default:u(()=>[l(q,{modelValue:t(e).currentCustomField.label,"onUpdate:modelValue":a[6]||(a[6]=r=>t(e).currentCustomField.label=r),invalid:t(o).currentCustomField.label.$error,onInput:a[7]||(a[7]=r=>t(o).currentCustomField.label.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),t(g)?(C(),F(w,{key:0,label:s.$t("settings.custom_fields.options")},{default:u(()=>[l(Ie,{onOnAdd:x}),(C(!0),z(Ce,null,ve(t(e).currentCustomField.options,(r,j)=>(C(),z("div",{key:j,class:"flex items-center mt-5"},[l(q,{modelValue:r.name,"onUpdate:modelValue":Q=>r.name=Q,class:"w-64"},null,8,["modelValue","onUpdate:modelValue"]),l(E,{name:"MinusCircleIcon",class:G(["ml-1 cursor-pointer",t(e).currentCustomField.in_use?"text-gray-300":"text-red-300"]),onClick:Q=>_(j)},null,8,["class","onClick"])]))),128))]),_:1},8,["label"])):M("",!0),l(w,{label:s.$t("settings.custom_fields.default_value"),class:"relative"},{default:u(()=>[(C(),F(be(t(y)),{modelValue:t(e).currentCustomField.default_answer,"onUpdate:modelValue":a[8]||(a[8]=r=>t(e).currentCustomField.default_answer=r),options:t(e).currentCustomField.options,"default-date-time":t(e).currentCustomField.dateTimeValue},null,8,["modelValue","options","default-date-time"]))]),_:1},8,["label"]),t(b)?M("",!0):(C(),F(w,{key:1,label:s.$t("settings.custom_fields.placeholder")},{default:u(()=>[l(q,{modelValue:t(e).currentCustomField.placeholder,"onUpdate:modelValue":a[9]||(a[9]=r=>t(e).currentCustomField.placeholder=r)},null,8,["modelValue"])]),_:1},8,["label"])),l(w,{label:s.$t("settings.custom_fields.order"),error:t(o).currentCustomField.order.$error&&t(o).currentCustomField.order.$errors[0].$message,required:""},{default:u(()=>[l(q,{modelValue:t(e).currentCustomField.order,"onUpdate:modelValue":a[10]||(a[10]=r=>t(e).currentCustomField.order=r),type:"number",invalid:t(o).currentCustomField.order.$error,onInput:a[11]||(a[11]=r=>t(o).currentCustomField.order.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"])]),_:1})])]),O("div",Ee,[l(X,{class:"mr-3",type:"button",variant:"primary-outline",onClick:R},{default:u(()=>[B($(s.$t("general.cancel")),1)]),_:1}),l(X,{variant:"primary",loading:t(v),disabled:t(v),type:"submit"},{left:u(r=>[t(v)?M("",!0):(C(),F(E,{key:0,class:G(r.class),name:"SaveIcon"},null,8,["class"]))]),default:u(()=>[B(" "+$(t(e).isEdit?s.$t("general.update"):s.$t("general.save")),1)]),_:1},8,["loading","disabled"])])],40,De)]),_:1},8,["show"])}}},ke={class:"text-xs text-gray-500"},Ue={setup(m){const n=Y(),e=K(),i=ae(),v=te("utils"),{t:f}=H(),c=L(null),p=D(()=>[{key:"name",label:f("settings.custom_fields.name"),thClass:"extra",tdClass:"font-medium text-gray-900"},{key:"model_type",label:f("settings.custom_fields.model")},{key:"type",label:f("settings.custom_fields.type")},{key:"is_required",label:f("settings.custom_fields.required")},{key:"actions",label:"",tdClass:"text-right text-sm font-medium",sortable:!1}]);async function V({page:y,filter:I,sort:h}){let o={orderByField:h.fieldName||"created_at",orderBy:h.order||"desc",page:y},S=await e.fetchCustomFields(o);return{data:S.data.data,pagination:{totalPages:S.data.meta.last_page,currentPage:y,limit:5,totalCount:S.data.meta.total}}}function b(){n.openModal({title:f("settings.custom_fields.add_custom_field"),componentName:"CustomFieldModal",size:"sm",refreshData:c.value&&c.value.refresh})}async function g(){c.value&&c.value.refresh()}return(y,I)=>{const h=d("BaseIcon"),o=d("BaseButton"),S=d("BaseBadge"),P=d("BaseTable"),x=d("BaseSettingCard");return C(),F(x,{title:y.$t("settings.menu_title.custom_fields"),description:y.$t("settings.custom_fields.section_description")},{action:u(()=>[t(i).hasAbilities(t(U).CREATE_CUSTOM_FIELDS)?(C(),F(o,{key:0,variant:"primary-outline",onClick:b},{left:u(_=>[l(h,{class:G(_.class),name:"PlusIcon"},null,8,["class"]),B(" "+$(y.$t("settings.custom_fields.add_custom_field")),1)]),_:1})):M("",!0)]),default:u(()=>[l(qe),l(P,{ref:(_,N)=>{N.table=_,c.value=_},data:V,columns:t(p),class:"mt-16"},ge({"cell-name":u(({row:_})=>[B($(_.data.name)+" ",1),O("span",ke," ("+$(_.data.slug)+")",1)]),"cell-is_required":u(({row:_})=>[l(S,{"bg-color":t(v).getBadgeStatusColor(_.data.is_required?"YES":"NO").bgColor,color:t(v).getBadgeStatusColor(_.data.is_required?"YES":"NO").color},{default:u(()=>[B($(_.data.is_required?y.$t("settings.custom_fields.yes"):y.$t("settings.custom_fields.no").replace("_"," ")),1)]),_:2},1032,["bg-color","color"])]),_:2},[t(i).hasAbilities([t(U).DELETE_CUSTOM_FIELDS,t(U).EDIT_CUSTOM_FIELDS])?{name:"cell-actions",fn:u(({row:_})=>[l(we,{row:_.data,table:c.value,"load-data":g},null,8,["row","table"])])}:void 0]),1032,["columns"])]),_:1},8,["title","description"])}}};export{Ue as default};
diff --git a/public/build/assets/CustomerIndexDropdown.bf4b48d6.js b/public/build/assets/CustomerIndexDropdown.bf4b48d6.js
deleted file mode 100644
index aa109956b..000000000
--- a/public/build/assets/CustomerIndexDropdown.bf4b48d6.js
+++ /dev/null
@@ -1 +0,0 @@
-import{l as S,u as b,j as C,e as x,g}from"./main.465728e1.js";import{J as E,G as j,aN as T,ah as N,r as l,o as a,l as s,w as t,u as e,f as n,i as p,t as f,j as y}from"./vendor.d12b5734.js";const V={props:{row:{type:Object,default:null},table:{type:Object,default:null},loadData:{type:Function,default:()=>{}}},setup(i){const w=i,_=S();b();const v=C(),m=x(),{t:u}=E(),h=j();T(),N("utils");function B(r){v.openDialog({title:u("general.are_you_sure"),message:u("customers.confirm_delete",1),yesLabel:u("general.ok"),noLabel:u("general.cancel"),variant:"danger",hideNoButton:!1,size:"lg"}).then(c=>{c&&_.deleteCustomer({ids:[r]}).then(o=>{if(o.data.success)return w.loadData&&w.loadData(),!0})})}return(r,c)=>{const o=l("BaseIcon"),I=l("BaseButton"),d=l("BaseDropdownItem"),D=l("router-link"),k=l("BaseDropdown");return a(),s(k,{"content-loading":e(_).isFetchingViewData},{activator:t(()=>[e(h).name==="customers.view"?(a(),s(I,{key:0,variant:"primary"},{default:t(()=>[n(o,{name:"DotsHorizontalIcon",class:"h-5 text-white"})]),_:1})):(a(),s(o,{key:1,name:"DotsHorizontalIcon",class:"h-5 text-gray-500"}))]),default:t(()=>[e(m).hasAbilities(e(g).EDIT_CUSTOMER)?(a(),s(D,{key:0,to:`/admin/customers/${i.row.id}/edit`},{default:t(()=>[n(d,null,{default:t(()=>[n(o,{name:"PencilIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),p(" "+f(r.$t("general.edit")),1)]),_:1})]),_:1},8,["to"])):y("",!0),e(h).name!=="customers.view"&&e(m).hasAbilities(e(g).VIEW_CUSTOMER)?(a(),s(D,{key:1,to:`customers/${i.row.id}/view`},{default:t(()=>[n(d,null,{default:t(()=>[n(o,{name:"EyeIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),p(" "+f(r.$t("general.view")),1)]),_:1})]),_:1},8,["to"])):y("",!0),e(m).hasAbilities(e(g).DELETE_CUSTOMER)?(a(),s(d,{key:2,onClick:c[0]||(c[0]=$=>B(i.row.id))},{default:t(()=>[n(o,{name:"TrashIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),p(" "+f(r.$t("general.delete")),1)]),_:1})):y("",!0)]),_:1},8,["content-loading"])}}};export{V as _};
diff --git a/public/build/assets/CustomerSettings.295ae76d.js b/public/build/assets/CustomerSettings.295ae76d.js
deleted file mode 100644
index 7f8880a0f..000000000
--- a/public/build/assets/CustomerSettings.295ae76d.js
+++ /dev/null
@@ -1 +0,0 @@
-import{G as R,J as G,B as p,k as C,L as c,M as k,N as S,Q as L,P,T as A,r as v,o as g,e as D,f as u,w as i,h as _,t as h,u as e,x as b,l as y,m as O,j as T,i as z,U as J}from"./vendor.d12b5734.js";import{a as Q,u as H}from"./global.dc565c4e.js";import"./auth.c88ceb4c.js";import"./main.465728e1.js";const K=["onSubmit"],W={class:"font-bold text-left"},X={class:"mt-2 text-sm leading-snug text-left text-gray-500",style:{"max-width":"680px"}},Y={class:"grid gap-6 sm:grid-col-1 md:grid-cols-2 mt-6"},Z=_("span",null,null,-1),te={setup(ee){const r=Q();H(),R();const{t:m,tm:U}=G();let f=p([]),d=p(!1),w=p(null),n=p(!1),l=p(!1);const I=p(!1);r.userForm.avatar&&f.value.push({image:r.userForm.avatar});const x=C(()=>({userForm:{name:{required:c.withMessage(m("validation.required"),k),minLength:c.withMessage(m("validation.name_min_length",{count:3}),S(3))},email:{required:c.withMessage(m("validation.required"),k),email:c.withMessage(m("validation.email_incorrect"),L)},password:{minLength:c.withMessage(m("validation.password_min_length",{count:8}),S(8))},confirm_password:{sameAsPassword:c.withMessage(m("validation.password_incorrect"),P(r.userForm.password))}}})),o=A(x,C(()=>r));function M(t,s){w.value=s}function q(){w.value=null,I.value=!0}function N(){if(o.value.userForm.$touch(),o.value.userForm.$invalid)return!0;d.value=!0;let t=new FormData;t.append("name",r.userForm.name),t.append("email",r.userForm.email),r.userForm.password!=null&&r.userForm.password!==void 0&&r.userForm.password!==""&&t.append("password",r.userForm.password),w.value&&t.append("customer_avatar",w.value),t.append("is_customer_avatar_removed",I.value),r.updateCurrentUser({data:t,message:U("settings.account_settings.updated_message")}).then(s=>{s.data.data&&(d.value=!1,r.$patch(B=>{B.userForm.password="",B.userForm.confirm_password=""}),w.value=null,I.value=!1)}).catch(s=>{d.value=!1})}return(t,s)=>{const B=v("BaseFileUploader"),F=v("BaseInputGroup"),V=v("BaseInput"),$=v("BaseIcon"),j=v("BaseButton"),E=v("BaseCard");return g(),D("form",{class:"relative h-full mt-4",onSubmit:J(N,["prevent"])},[u(E,null,{default:i(()=>[_("div",null,[_("h6",W,h(t.$t("settings.account_settings.account_settings")),1),_("p",X,h(t.$t("settings.account_settings.section_description")),1)]),_("div",Y,[u(F,{label:t.$tc("settings.account_settings.profile_picture")},{default:i(()=>[u(B,{modelValue:e(f),"onUpdate:modelValue":s[0]||(s[0]=a=>b(f)?f.value=a:f=a),avatar:!0,accept:"image/*",onChange:M,onRemove:q},null,8,["modelValue"])]),_:1},8,["label"]),Z,u(F,{label:t.$tc("settings.account_settings.name"),error:e(o).userForm.name.$error&&e(o).userForm.name.$errors[0].$message,required:""},{default:i(()=>[u(V,{modelValue:e(r).userForm.name,"onUpdate:modelValue":s[1]||(s[1]=a=>e(r).userForm.name=a),invalid:e(o).userForm.name.$error,onInput:s[2]||(s[2]=a=>e(o).userForm.name.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),u(F,{label:t.$tc("settings.account_settings.email"),error:e(o).userForm.email.$error&&e(o).userForm.email.$errors[0].$message,required:""},{default:i(()=>[u(V,{modelValue:e(r).userForm.email,"onUpdate:modelValue":s[3]||(s[3]=a=>e(r).userForm.email=a),invalid:e(o).userForm.email.$error,onInput:s[4]||(s[4]=a=>e(o).userForm.email.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),u(F,{error:e(o).userForm.password.$error&&e(o).userForm.password.$errors[0].$message,label:t.$tc("settings.account_settings.password")},{default:i(()=>[u(V,{modelValue:e(r).userForm.password,"onUpdate:modelValue":s[7]||(s[7]=a=>e(r).userForm.password=a),type:e(n)?"text":"password",invalid:e(o).userForm.password.$error,onInput:s[8]||(s[8]=a=>e(o).userForm.password.$touch())},{right:i(()=>[e(n)?(g(),y($,{key:0,name:"EyeOffIcon",class:"w-5 h-5 mr-1 text-gray-500 cursor-pointer",onClick:s[5]||(s[5]=a=>b(n)?n.value=!e(n):n=!e(n))})):(g(),y($,{key:1,name:"EyeIcon",class:"w-5 h-5 mr-1 text-gray-500 cursor-pointer",onClick:s[6]||(s[6]=a=>b(n)?n.value=!e(n):n=!e(n))}))]),_:1},8,["modelValue","type","invalid"])]),_:1},8,["error","label"]),u(F,{label:t.$tc("settings.account_settings.confirm_password"),error:e(o).userForm.confirm_password.$error&&e(o).userForm.confirm_password.$errors[0].$message},{default:i(()=>[u(V,{modelValue:e(r).userForm.confirm_password,"onUpdate:modelValue":s[11]||(s[11]=a=>e(r).userForm.confirm_password=a),type:e(l)?"text":"password",invalid:e(o).userForm.confirm_password.$error,onInput:s[12]||(s[12]=a=>e(o).userForm.confirm_password.$touch())},{right:i(()=>[e(l)?(g(),y($,{key:0,name:"EyeOffIcon",class:"w-5 h-5 mr-1 text-gray-500 cursor-pointer",onClick:s[9]||(s[9]=a=>b(l)?l.value=!e(l):l=!e(l))})):(g(),y($,{key:1,name:"EyeIcon",class:"w-5 h-5 mr-1 text-gray-500 cursor-pointer",onClick:s[10]||(s[10]=a=>b(l)?l.value=!e(l):l=!e(l))}))]),_:1},8,["modelValue","type","invalid"])]),_:1},8,["label","error"])]),u(j,{loading:e(d),disabled:e(d),class:"mt-6"},{left:i(a=>[e(d)?T("",!0):(g(),y($,{key:0,name:"SaveIcon",class:O(a.class)},null,8,["class"]))]),default:i(()=>[z(" "+h(t.$t("general.save")),1)]),_:1},8,["loading","disabled"])]),_:1})],40,K)}}};export{te as default};
diff --git a/public/build/assets/CustomizationSetting.31d8c655.js b/public/build/assets/CustomizationSetting.31d8c655.js
deleted file mode 100644
index 8440c75bc..000000000
--- a/public/build/assets/CustomizationSetting.31d8c655.js
+++ /dev/null
@@ -1 +0,0 @@
-var ut=Object.defineProperty,rt=Object.defineProperties;var dt=Object.getOwnPropertyDescriptors;var et=Object.getOwnPropertySymbols;var ct=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable;var st=(v,o,i)=>o in v?ut(v,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):v[o]=i,x=(v,o)=>{for(var i in o||(o={}))ct.call(o,i)&&st(v,i,o[i]);if(et)for(var i of et(o))_t.call(o,i)&&st(v,i,o[i]);return v},W=(v,o)=>rt(v,dt(o));import{b as N,d as Z,i as pt,k as gt,p as yt,c as ft,j as vt}from"./main.465728e1.js";import{J as j,B as z,k as F,C as bt,H as at,$ as St,r as d,o as $,e as D,h as c,t as b,f as t,w as r,U as Y,m as G,i as k,F as L,y as $t,l as E,u as e,j as R,ah as M,a0 as T,L as X,O as nt,aT as it,T as ot,x as H}from"./vendor.d12b5734.js";import{D as Bt,d as ht}from"./DragIcon.2da3872a.js";import{u as zt}from"./payment.93619753.js";import{_ as Vt}from"./ItemUnitModal.031bb625.js";const It={class:"text-gray-900 text-lg font-medium"},xt={class:"mt-1 text-sm text-gray-500"},wt={class:"overflow-x-auto"},Ct={class:"w-full mt-6 table-fixed"},Dt=c("colgroup",null,[c("col",{style:{width:"4%"}}),c("col",{style:{width:"45%"}}),c("col",{style:{width:"27%"}}),c("col",{style:{width:"24%"}})],-1),Ut=c("thead",null,[c("tr",null,[c("th",{class:"px-5 py-3 text-sm not-italic font-medium leading-5 text-left text-gray-700 border-t border-b border-gray-200 border-solid"}),c("th",{class:"px-5 py-3 text-sm not-italic font-medium leading-5 text-left text-gray-700 border-t border-b border-gray-200 border-solid"}," Component "),c("th",{class:"px-5 py-3 text-sm not-italic font-medium leading-5 text-left text-gray-700 border-t border-b border-gray-200 border-solid"}," Parameter "),c("th",{class:"px-5 py-3 text-sm not-italic font-medium leading-5 text-left text-gray-700 border-t border-b border-gray-200 border-solid"})])],-1),Ft={class:"relative"},kt={class:"text-gray-300 cursor-move handle align-middle"},Et={class:"px-5 py-4"},Nt={class:"block text-sm not-italic font-medium text-primary-800 whitespace-nowrap mr-2 min-w-[200px]"},Mt={class:"text-xs text-gray-500 mt-1"},Tt={class:"px-5 py-4 text-left align-middle"},Gt={class:"px-5 py-4 text-right align-middle pt-10"},qt=k(" Remove "),Lt={colspan:"2",class:"px-5 py-4"},Rt={class:"px-5 py-4 text-right align-middle",colspan:"2"},tt={props:{type:{type:String,required:!0},typeStore:{type:Object,required:!0},defaultSeries:{type:String,default:"INV"}},setup(v){const o=v,{t:i}=j(),p=N(),g=Z(),u=z([]),a=z(!1),m=z([{label:i("settings.customization.series"),description:i("settings.customization.series_description"),name:"SERIES",paramLabel:i("settings.customization.series_param_label"),value:o.defaultSeries,inputDisabled:!1,inputType:"text",allowMultiple:!1},{label:i("settings.customization.sequence"),description:i("settings.customization.sequence_description"),name:"SEQUENCE",paramLabel:i("settings.customization.sequence_param_label"),value:"6",inputDisabled:!1,inputType:"number",allowMultiple:!1},{label:i("settings.customization.delimiter"),description:i("settings.customization.delimiter_description"),name:"DELIMITER",paramLabel:i("settings.customization.delimiter_param_label"),value:"-",inputDisabled:!1,inputType:"text",allowMultiple:!0},{label:i("settings.customization.customer_series"),description:i("settings.customization.customer_series_description"),name:"CUSTOMER_SERIES",paramLabel:"",value:"",inputDisabled:!0,inputType:"text",allowMultiple:!1},{label:i("settings.customization.customer_sequence"),description:i("settings.customization.customer_sequence_description"),name:"CUSTOMER_SEQUENCE",paramLabel:i("settings.customization.customer_sequence_param_label"),value:"6",inputDisabled:!1,inputType:"number",allowMultiple:!1},{label:i("settings.customization.date_format"),description:i("settings.customization.date_format_description"),name:"DATE_FORMAT",paramLabel:i("settings.customization.date_format_param_label"),value:"Y",inputDisabled:!1,inputType:"text",allowMultiple:!0},{label:i("settings.customization.random_sequence"),description:i("settings.customization.random_sequence_description"),name:"RANDOM_SEQUENCE",paramLabel:i("settings.customization.random_sequence_param_label"),value:"6",inputDisabled:!1,inputType:"number",allowMultiple:!1}]),s=F(()=>m.value.filter(function(f){return!u.value.some(function(V){return f.allowMultiple?!1:f.name==V.name})})),_=z(""),n=z(!1),l=z(!1),y=F(()=>{let f="";return u.value.forEach(V=>{let q=`{{${V.name}`;V.value&&(q+=`:${V.value}`),f+=`${q}}}`}),f});bt(u,f=>{U()}),B();async function B(){let f={format:p.selectedCompanySettings[`${o.type}_number_format`]};l.value=!0,(await g.fetchPlaceholders(f)).data.placeholders.forEach(q=>{var O;let J=m.value.find(K=>K.name===q.name);const Q=(O=q.value)!=null?O:"";u.value.push(W(x({},J),{value:Q,id:at.raw()}))}),l.value=!1,U()}function C(f){return u.value.find(V=>V.name===f.name)}function h(f){C(f)&&!f.allowMultiple||(u.value.push(W(x({},f),{id:at.raw()})),U())}function S(f){u.value=u.value.filter(function(V){return f.id!==V.id})}function w(f,V){switch(V.name){case"SERIES":f.length>=6&&(f=f.substring(0,6));break;case"DELIMITER":f.length>=1&&(f=f.substring(0,1));break}setTimeout(()=>{V.value=f,U()},100)}const U=St(()=>{P()},500);async function P(){if(!y.value){_.value="";return}let f={key:o.type,format:y.value};n.value=!0;let V=await o.typeStore.getNextNumber(f);n.value=!1,V.data&&(_.value=V.data.nextNumber)}async function lt(){if(n.value||l.value)return;a.value=!0;let f={settings:{}};return f.settings[o.type+"_number_format"]=y.value,await p.updateCompanySettings({data:f,message:`settings.customization.${o.type}s.${o.type}_settings_updated`}),a.value=!1,!0}return(f,V)=>{const q=d("BaseInput"),J=d("BaseInputGroup"),Q=d("BaseIcon"),O=d("BaseButton"),K=d("BaseDropdownItem"),mt=d("BaseDropdown");return $(),D(L,null,[c("h6",It,b(f.$t(`settings.customization.${v.type}s.${v.type}_number_format`)),1),c("p",xt,b(f.$t(`settings.customization.${v.type}s.${v.type}_number_format_description`)),1),c("div",wt,[c("table",Ct,[Dt,Ut,t(e(ht),{modelValue:u.value,"onUpdate:modelValue":V[1]||(V[1]=I=>u.value=I),class:"divide-y divide-gray-200","item-key":"id",tag:"tbody",handle:".handle",filter:".ignore-element"},{item:r(({element:I})=>[c("tr",Ft,[c("td",kt,[t(Bt)]),c("td",Et,[c("label",Nt,b(I.label),1),c("p",Mt,b(I.description),1)]),c("td",Tt,[t(J,{label:I.paramLabel,class:"lg:col-span-3",required:""},{default:r(()=>[t(q,{modelValue:I.value,"onUpdate:modelValue":[A=>I.value=A,A=>w(A,I)],disabled:I.inputDisabled,type:I.inputType},null,8,["modelValue","onUpdate:modelValue","disabled","type"])]),_:2},1032,["label"])]),c("td",Gt,[t(O,{variant:"white",onClick:Y(A=>S(I),["prevent"])},{left:r(A=>[t(Q,{name:"XIcon",class:G(["!sm:m-0",A.class])},null,8,["class"])]),default:r(()=>[qt]),_:2},1032,["onClick"])])])]),footer:r(()=>[c("tr",null,[c("td",Lt,[t(J,{label:f.$t(`settings.customization.${v.type}s.preview_${v.type}_number`)},{default:r(()=>[t(q,{modelValue:_.value,"onUpdate:modelValue":V[0]||(V[0]=I=>_.value=I),disabled:"",loading:n.value},null,8,["modelValue","loading"])]),_:1},8,["label"])]),c("td",Rt,[t(mt,{"wrapper-class":"flex items-center justify-end mt-5"},{activator:r(()=>[t(O,{variant:"primary-outline"},{left:r(I=>[t(Q,{class:G(I.class),name:"PlusIcon"},null,8,["class"])]),default:r(()=>[k(" "+b(f.$t("settings.customization.add_new_component")),1)]),_:1})]),default:r(()=>[($(!0),D(L,null,$t(e(s),I=>($(),E(K,{key:I.label,onClick:Y(A=>h(I),["prevent"])},{default:r(()=>[k(b(I.label),1)]),_:2},1032,["onClick"]))),128))]),_:1})])])]),_:1},8,["modelValue"])])]),t(O,{loading:a.value,disabled:a.value,variant:"primary",type:"submit",class:"mt-4",onClick:lt},{left:r(I=>[a.value?R("",!0):($(),E(Q,{key:0,class:G(I.class),name:"SaveIcon"},null,8,["class"]))]),default:r(()=>[k(" "+b(f.$t("settings.customization.save")),1)]),_:1},8,["loading","disabled"])],64)}}},At={setup(v){const o=pt();return(i,p)=>($(),E(tt,{type:"invoice","type-store":e(o),"default-series":"INV"},null,8,["type-store"]))}},Yt={class:"text-gray-900 text-lg font-medium"},Ot={class:"mt-1 text-sm text-gray-500"},jt={setup(v){const{t:o,tm:i}=j(),p=N(),g=Z(),u=M("utils"),a=T({retrospective_edits:null});u.mergeSettings(a,x({},p.selectedCompanySettings)),F(()=>g.config.retrospective_edits.map(s=>(s.title=o(s.key),s)));async function m(){let s={settings:x({},a)};return await p.updateCompanySettings({data:s,message:"settings.customization.invoices.invoice_settings_updated"}),!0}return(s,_)=>{const n=d("BaseRadio"),l=d("BaseInputGroup");return $(),D(L,null,[c("h6",Yt,b(s.$tc("settings.customization.invoices.retrospective_edits")),1),c("p",Ot,b(s.$t("settings.customization.invoices.retrospective_edits_description")),1),t(l,{required:""},{default:r(()=>[t(n,{id:"allow",modelValue:e(a).retrospective_edits,"onUpdate:modelValue":[_[0]||(_[0]=y=>e(a).retrospective_edits=y),m],label:s.$t("settings.customization.invoices.allow"),size:"sm",name:"filter",value:"allow",class:"mt-2"},null,8,["modelValue","label"]),t(n,{id:"disable_on_invoice_partial_paid",modelValue:e(a).retrospective_edits,"onUpdate:modelValue":[_[1]||(_[1]=y=>e(a).retrospective_edits=y),m],label:s.$t("settings.customization.invoices.disable_on_invoice_partial_paid"),size:"sm",name:"filter",value:"disable_on_invoice_partial_paid",class:"mt-2"},null,8,["modelValue","label"]),t(n,{id:"disable_on_invoice_paid",modelValue:e(a).retrospective_edits,"onUpdate:modelValue":[_[2]||(_[2]=y=>e(a).retrospective_edits=y),m],label:s.$t("settings.customization.invoices.disable_on_invoice_paid"),size:"sm",name:"filter",value:"disable_on_invoice_paid",class:"my-2"},null,8,["modelValue","label"]),t(n,{id:"disable_on_invoice_sent",modelValue:e(a).retrospective_edits,"onUpdate:modelValue":[_[3]||(_[3]=y=>e(a).retrospective_edits=y),m],label:s.$t("settings.customization.invoices.disable_on_invoice_sent"),size:"sm",name:"filter",value:"disable_on_invoice_sent"},null,8,["modelValue","label"])]),_:1})],64)}}},Pt=["onSubmit"],Qt={class:"text-gray-900 text-lg font-medium"},Ht={class:"mt-1 text-sm text-gray-500 mb-2"},Jt={class:"w-full sm:w-1/2 md:w-1/4 lg:w-1/5"},Xt={setup(v){const{t:o}=j(),i=N(),p=M("utils");let g=z(!1);const u=T({invoice_set_due_date_automatically:null,invoice_due_date_days:null});p.mergeSettings(u,x({},i.selectedCompanySettings));const a=F({get:()=>u.invoice_set_due_date_automatically==="YES",set:async n=>{const l=n?"YES":"NO";u.invoice_set_due_date_automatically=l}}),m=F(()=>({dueDateSettings:{invoice_due_date_days:{required:X.withMessage(o("validation.required"),nt(a.value)),numeric:X.withMessage(o("validation.numbers_only"),it)}}})),s=ot(m,{dueDateSettings:u});async function _(){if(s.value.dueDateSettings.$touch(),s.value.dueDateSettings.$invalid)return!1;g.value=!0;let n={settings:x({},u)};return a.value||delete n.settings.invoice_due_date_days,await i.updateCompanySettings({data:n,message:"settings.customization.invoices.invoice_settings_updated"}),g.value=!1,!0}return(n,l)=>{const y=d("BaseSwitchSection"),B=d("BaseInput"),C=d("BaseInputGroup"),h=d("BaseIcon"),S=d("BaseButton");return $(),D("form",{onSubmit:Y(_,["prevent"])},[c("h6",Qt,b(n.$t("settings.customization.invoices.due_date")),1),c("p",Ht,b(n.$t("settings.customization.invoices.due_date_description")),1),t(y,{modelValue:e(a),"onUpdate:modelValue":l[0]||(l[0]=w=>H(a)?a.value=w:null),title:n.$t("settings.customization.invoices.set_due_date_automatically"),description:n.$t("settings.customization.invoices.set_due_date_automatically_description")},null,8,["modelValue","title","description"]),e(a)?($(),E(C,{key:0,label:n.$t("settings.customization.invoices.due_date_days"),error:e(s).dueDateSettings.invoice_due_date_days.$error&&e(s).dueDateSettings.invoice_due_date_days.$errors[0].$message,class:"mt-2 mb-4"},{default:r(()=>[c("div",Jt,[t(B,{modelValue:e(u).invoice_due_date_days,"onUpdate:modelValue":l[1]||(l[1]=w=>e(u).invoice_due_date_days=w),invalid:e(s).dueDateSettings.invoice_due_date_days.$error,type:"number",onInput:l[2]||(l[2]=w=>e(s).dueDateSettings.invoice_due_date_days.$touch())},null,8,["modelValue","invalid"])])]),_:1},8,["label","error"])):R("",!0),t(S,{loading:e(g),disabled:e(g),variant:"primary",type:"submit",class:"mt-4"},{left:r(w=>[e(g)?R("",!0):($(),E(h,{key:0,class:G(w.class),name:"SaveIcon"},null,8,["class"]))]),default:r(()=>[k(" "+b(n.$t("settings.customization.save")),1)]),_:1},8,["loading","disabled"])],40,Pt)}}},Kt=["onSubmit"],Wt={class:"text-gray-900 text-lg font-medium"},Zt={class:"mt-1 text-sm text-gray-500 mb-2"},te={setup(v){const o=N(),i=M("utils"),p=z(["customer","customerCustom","invoice","invoiceCustom","company"]),g=z(["billing","customer","customerCustom","invoiceCustom"]),u=z(["shipping","customer","customerCustom","invoiceCustom"]),a=z(["company","invoiceCustom"]);let m=z(!1);const s=T({invoice_mail_body:null,invoice_company_address_format:null,invoice_shipping_address_format:null,invoice_billing_address_format:null});i.mergeSettings(s,x({},o.selectedCompanySettings));async function _(){m.value=!0;let n={settings:x({},s)};return await o.updateCompanySettings({data:n,message:"settings.customization.invoices.invoice_settings_updated"}),m.value=!1,!0}return(n,l)=>{const y=d("BaseCustomInput"),B=d("BaseInputGroup"),C=d("BaseIcon"),h=d("BaseButton");return $(),D("form",{onSubmit:Y(_,["prevent"])},[c("h6",Wt,b(n.$t("settings.customization.invoices.default_formats")),1),c("p",Zt,b(n.$t("settings.customization.invoices.default_formats_description")),1),t(B,{label:n.$t("settings.customization.invoices.default_invoice_email_body"),class:"mt-6 mb-4"},{default:r(()=>[t(y,{modelValue:e(s).invoice_mail_body,"onUpdate:modelValue":l[0]||(l[0]=S=>e(s).invoice_mail_body=S),fields:p.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(B,{label:n.$t("settings.customization.invoices.company_address_format"),class:"mt-6 mb-4"},{default:r(()=>[t(y,{modelValue:e(s).invoice_company_address_format,"onUpdate:modelValue":l[1]||(l[1]=S=>e(s).invoice_company_address_format=S),fields:a.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(B,{label:n.$t("settings.customization.invoices.shipping_address_format"),class:"mt-6 mb-4"},{default:r(()=>[t(y,{modelValue:e(s).invoice_shipping_address_format,"onUpdate:modelValue":l[2]||(l[2]=S=>e(s).invoice_shipping_address_format=S),fields:u.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(B,{label:n.$t("settings.customization.invoices.billing_address_format"),class:"mt-6 mb-4"},{default:r(()=>[t(y,{modelValue:e(s).invoice_billing_address_format,"onUpdate:modelValue":l[3]||(l[3]=S=>e(s).invoice_billing_address_format=S),fields:g.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(h,{loading:e(m),disabled:e(m),variant:"primary",type:"submit",class:"mt-4"},{left:r(S=>[e(m)?R("",!0):($(),E(C,{key:0,class:G(S.class),name:"SaveIcon"},null,8,["class"]))]),default:r(()=>[k(" "+b(n.$t("settings.customization.save")),1)]),_:1},8,["loading","disabled"])],40,Kt)}}},ee={class:"divide-y divide-gray-200"},se={setup(v){const o=M("utils"),i=N(),p=T({invoice_email_attachment:null});o.mergeSettings(p,x({},i.selectedCompanySettings));const g=F({get:()=>p.invoice_email_attachment==="YES",set:async u=>{const a=u?"YES":"NO";let m={settings:{invoice_email_attachment:a}};p.invoice_email_attachment=a,await i.updateCompanySettings({data:m,message:"general.setting_updated"})}});return(u,a)=>{const m=d("BaseDivider"),s=d("BaseSwitchSection");return $(),D(L,null,[t(At),t(m,{class:"my-8"}),t(Xt),t(m,{class:"my-8"}),t(jt),t(m,{class:"my-8"}),t(te),t(m,{class:"mt-6 mb-2"}),c("ul",ee,[t(s,{modelValue:e(g),"onUpdate:modelValue":a[0]||(a[0]=_=>H(g)?g.value=_:null),title:u.$t("settings.customization.invoices.invoice_email_attachment"),description:u.$t("settings.customization.invoices.invoice_email_attachment_setting_description")},null,8,["modelValue","title","description"])])],64)}}},ae={setup(v){const o=gt();return(i,p)=>($(),E(tt,{type:"estimate","type-store":e(o),"default-series":"EST"},null,8,["type-store"]))}},ne=["onSubmit"],ie={class:"text-gray-900 text-lg font-medium"},oe={class:"mt-1 text-sm text-gray-500 mb-2"},le={class:"w-full sm:w-1/2 md:w-1/4 lg:w-1/5"},me={setup(v){const{t:o}=j(),i=N(),p=M("utils");let g=z(!1);const u=T({estimate_set_expiry_date_automatically:null,estimate_expiry_date_days:null});p.mergeSettings(u,x({},i.selectedCompanySettings));const a=F({get:()=>u.estimate_set_expiry_date_automatically==="YES",set:async n=>{const l=n?"YES":"NO";u.estimate_set_expiry_date_automatically=l}}),m=F(()=>({expiryDateSettings:{estimate_expiry_date_days:{required:X.withMessage(o("validation.required"),nt(a.value)),numeric:X.withMessage(o("validation.numbers_only"),it)}}})),s=ot(m,{expiryDateSettings:u});async function _(){if(s.value.expiryDateSettings.$touch(),s.value.expiryDateSettings.$invalid)return!1;g.value=!0;let n={settings:x({},u)};return a.value||delete n.settings.estimate_expiry_date_days,await i.updateCompanySettings({data:n,message:"settings.customization.estimates.estimate_settings_updated"}),g.value=!1,!0}return(n,l)=>{const y=d("BaseSwitchSection"),B=d("BaseInput"),C=d("BaseInputGroup"),h=d("BaseIcon"),S=d("BaseButton");return $(),D("form",{onSubmit:Y(_,["prevent"])},[c("h6",ie,b(n.$t("settings.customization.estimates.expiry_date")),1),c("p",oe,b(n.$t("settings.customization.estimates.expiry_date_description")),1),t(y,{modelValue:e(a),"onUpdate:modelValue":l[0]||(l[0]=w=>H(a)?a.value=w:null),title:n.$t("settings.customization.estimates.set_expiry_date_automatically"),description:n.$t("settings.customization.estimates.set_expiry_date_automatically_description")},null,8,["modelValue","title","description"]),e(a)?($(),E(C,{key:0,label:n.$t("settings.customization.estimates.expiry_date_days"),error:e(s).expiryDateSettings.estimate_expiry_date_days.$error&&e(s).expiryDateSettings.estimate_expiry_date_days.$errors[0].$message,class:"mt-2 mb-4"},{default:r(()=>[c("div",le,[t(B,{modelValue:e(u).estimate_expiry_date_days,"onUpdate:modelValue":l[1]||(l[1]=w=>e(u).estimate_expiry_date_days=w),invalid:e(s).expiryDateSettings.estimate_expiry_date_days.$error,type:"number",onInput:l[2]||(l[2]=w=>e(s).expiryDateSettings.estimate_expiry_date_days.$touch())},null,8,["modelValue","invalid"])])]),_:1},8,["label","error"])):R("",!0),t(S,{loading:e(g),disabled:e(g),variant:"primary",type:"submit",class:"mt-4"},{left:r(w=>[e(g)?R("",!0):($(),E(h,{key:0,class:G(w.class),name:"SaveIcon"},null,8,["class"]))]),default:r(()=>[k(" "+b(n.$t("settings.customization.save")),1)]),_:1},8,["loading","disabled"])],40,ne)}}},ue=["onSubmit"],re={class:"text-gray-900 text-lg font-medium"},de={class:"mt-1 text-sm text-gray-500 mb-2"},ce={setup(v){const o=N(),i=M("utils"),p=z(["customer","customerCustom","estimate","estimateCustom","company"]),g=z(["billing","customer","customerCustom","estimateCustom"]),u=z(["shipping","customer","customerCustom","estimateCustom"]),a=z(["company","estimateCustom"]);let m=z(!1);const s=T({estimate_mail_body:null,estimate_company_address_format:null,estimate_shipping_address_format:null,estimate_billing_address_format:null});i.mergeSettings(s,x({},o.selectedCompanySettings));async function _(){m.value=!0;let n={settings:x({},s)};return await o.updateCompanySettings({data:n,message:"settings.customization.estimates.estimate_settings_updated"}),m.value=!1,!0}return(n,l)=>{const y=d("BaseCustomInput"),B=d("BaseInputGroup"),C=d("BaseIcon"),h=d("BaseButton");return $(),D("form",{onSubmit:Y(_,["prevent"])},[c("h6",re,b(n.$t("settings.customization.estimates.default_formats")),1),c("p",de,b(n.$t("settings.customization.estimates.default_formats_description")),1),t(B,{label:n.$t("settings.customization.estimates.default_estimate_email_body"),class:"mt-6 mb-4"},{default:r(()=>[t(y,{modelValue:e(s).estimate_mail_body,"onUpdate:modelValue":l[0]||(l[0]=S=>e(s).estimate_mail_body=S),fields:p.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(B,{label:n.$t("settings.customization.estimates.company_address_format"),class:"mt-6 mb-4"},{default:r(()=>[t(y,{modelValue:e(s).estimate_company_address_format,"onUpdate:modelValue":l[1]||(l[1]=S=>e(s).estimate_company_address_format=S),fields:a.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(B,{label:n.$t("settings.customization.estimates.shipping_address_format"),class:"mt-6 mb-4"},{default:r(()=>[t(y,{modelValue:e(s).estimate_shipping_address_format,"onUpdate:modelValue":l[2]||(l[2]=S=>e(s).estimate_shipping_address_format=S),fields:u.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(B,{label:n.$t("settings.customization.estimates.billing_address_format"),class:"mt-6 mb-4"},{default:r(()=>[t(y,{modelValue:e(s).estimate_billing_address_format,"onUpdate:modelValue":l[3]||(l[3]=S=>e(s).estimate_billing_address_format=S),fields:g.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(h,{loading:e(m),disabled:e(m),variant:"primary",type:"submit",class:"mt-4"},{left:r(S=>[e(m)?R("",!0):($(),E(C,{key:0,class:G(S.class),name:"SaveIcon"},null,8,["class"]))]),default:r(()=>[k(" "+b(n.$t("settings.customization.save")),1)]),_:1},8,["loading","disabled"])],40,ue)}}},_e={class:"text-gray-900 text-lg font-medium"},pe={class:"mt-1 text-sm text-gray-500"},ge={setup(v){const{t:o,tm:i}=j(),p=N(),g=Z(),u=M("utils"),a=T({estimate_convert_action:null});u.mergeSettings(a,x({},p.selectedCompanySettings)),F(()=>g.config.estimate_convert_action.map(s=>(s.title=o(s.key),s)));async function m(){let s={settings:x({},a)};return await p.updateCompanySettings({data:s,message:"settings.customization.estimates.estimate_settings_updated"}),!0}return(s,_)=>{const n=d("BaseRadio"),l=d("BaseInputGroup");return $(),D(L,null,[c("h6",_e,b(s.$tc("settings.customization.estimates.convert_estimate_options")),1),c("p",pe,b(s.$t("settings.customization.estimates.convert_estimate_description")),1),t(l,{required:""},{default:r(()=>[t(n,{id:"no_action",modelValue:e(a).estimate_convert_action,"onUpdate:modelValue":[_[0]||(_[0]=y=>e(a).estimate_convert_action=y),m],label:s.$t("settings.customization.estimates.no_action"),size:"sm",name:"filter",value:"no_action",class:"mt-2"},null,8,["modelValue","label"]),t(n,{id:"delete_estimate",modelValue:e(a).estimate_convert_action,"onUpdate:modelValue":[_[1]||(_[1]=y=>e(a).estimate_convert_action=y),m],label:s.$t("settings.customization.estimates.delete_estimate"),size:"sm",name:"filter",value:"delete_estimate",class:"my-2"},null,8,["modelValue","label"]),t(n,{id:"mark_estimate_as_accepted",modelValue:e(a).estimate_convert_action,"onUpdate:modelValue":[_[2]||(_[2]=y=>e(a).estimate_convert_action=y),m],label:s.$t("settings.customization.estimates.mark_estimate_as_accepted"),size:"sm",name:"filter",value:"mark_estimate_as_accepted"},null,8,["modelValue","label"])]),_:1})],64)}}},ye={class:"divide-y divide-gray-200"},fe={setup(v){const o=M("utils"),i=N(),p=T({estimate_email_attachment:null});o.mergeSettings(p,x({},i.selectedCompanySettings));const g=F({get:()=>p.estimate_email_attachment==="YES",set:async u=>{const a=u?"YES":"NO";let m={settings:{estimate_email_attachment:a}};p.estimate_email_attachment=a,await i.updateCompanySettings({data:m,message:"general.setting_updated"})}});return(u,a)=>{const m=d("BaseDivider"),s=d("BaseSwitchSection");return $(),D(L,null,[t(ae),t(m,{class:"my-8"}),t(me),t(m,{class:"my-8"}),t(ge),t(m,{class:"my-8"}),t(ce),t(m,{class:"mt-6 mb-2"}),c("ul",ye,[t(s,{modelValue:e(g),"onUpdate:modelValue":a[0]||(a[0]=_=>H(g)?g.value=_:null),title:u.$t("settings.customization.estimates.estimate_email_attachment"),description:u.$t("settings.customization.estimates.estimate_email_attachment_setting_description")},null,8,["modelValue","title","description"])])],64)}}},ve={setup(v){const o=zt();return(i,p)=>($(),E(tt,{type:"payment","type-store":e(o),"default-series":"PAY"},null,8,["type-store"]))}},be=["onSubmit"],Se={class:"text-gray-900 text-lg font-medium"},$e={class:"mt-1 text-sm text-gray-500 mb-2"},Be={setup(v){const o=N(),i=M("utils"),p=z(["customer","customerCustom","company","payment","paymentCustom"]),g=z(["billing","customer","customerCustom","paymentCustom"]),u=z(["company","paymentCustom"]);let a=z(!1);const m=T({payment_mail_body:null,payment_company_address_format:null,payment_from_customer_address_format:null});i.mergeSettings(m,x({},o.selectedCompanySettings));async function s(){a.value=!0;let _={settings:x({},m)};return await o.updateCompanySettings({data:_,message:"settings.customization.payments.payment_settings_updated"}),a.value=!1,!0}return(_,n)=>{const l=d("BaseCustomInput"),y=d("BaseInputGroup"),B=d("BaseIcon"),C=d("BaseButton");return $(),D("form",{onSubmit:Y(s,["prevent"])},[c("h6",Se,b(_.$t("settings.customization.payments.default_formats")),1),c("p",$e,b(_.$t("settings.customization.payments.default_formats_description")),1),t(y,{label:_.$t("settings.customization.payments.default_payment_email_body"),class:"mt-6 mb-4"},{default:r(()=>[t(l,{modelValue:e(m).payment_mail_body,"onUpdate:modelValue":n[0]||(n[0]=h=>e(m).payment_mail_body=h),fields:p.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(y,{label:_.$t("settings.customization.payments.company_address_format"),class:"mt-6 mb-4"},{default:r(()=>[t(l,{modelValue:e(m).payment_company_address_format,"onUpdate:modelValue":n[1]||(n[1]=h=>e(m).payment_company_address_format=h),fields:u.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(y,{label:_.$t("settings.customization.payments.from_customer_address_format"),class:"mt-6 mb-4"},{default:r(()=>[t(l,{modelValue:e(m).payment_from_customer_address_format,"onUpdate:modelValue":n[2]||(n[2]=h=>e(m).payment_from_customer_address_format=h),fields:g.value},null,8,["modelValue","fields"])]),_:1},8,["label"]),t(C,{loading:e(a),disabled:e(a),variant:"primary",type:"submit",class:"mt-4"},{left:r(h=>[e(a)?R("",!0):($(),E(B,{key:0,class:G(h.class),name:"SaveIcon"},null,8,["class"]))]),default:r(()=>[k(" "+b(_.$t("settings.customization.save")),1)]),_:1},8,["loading","disabled"])],40,be)}}},he={class:"divide-y divide-gray-200"},ze={setup(v){const o=M("utils"),i=N(),p=T({payment_email_attachment:null});o.mergeSettings(p,x({},i.selectedCompanySettings));const g=F({get:()=>p.payment_email_attachment==="YES",set:async u=>{const a=u?"YES":"NO";let m={settings:{payment_email_attachment:a}};p.payment_email_attachment=a,await i.updateCompanySettings({data:m,message:"general.setting_updated"})}});return(u,a)=>{const m=d("BaseDivider"),s=d("BaseSwitchSection");return $(),D(L,null,[t(ve),t(m,{class:"my-8"}),t(Be),t(m,{class:"mt-6 mb-2"}),c("ul",he,[t(s,{modelValue:e(g),"onUpdate:modelValue":a[0]||(a[0]=_=>H(g)?g.value=_:null),title:u.$t("settings.customization.payments.payment_email_attachment"),description:u.$t("settings.customization.payments.payment_email_attachment_setting_description")},null,8,["modelValue","title","description"])])],64)}}},Ve={class:"flex flex-wrap justify-end mt-2 lg:flex-nowrap"},Ie={class:"inline-block"},xe={setup(v){const{t:o}=j(),i=z(null),p=yt(),g=ft(),u=vt(),a=F(()=>[{key:"name",label:o("settings.customization.items.unit_name"),thClass:"extra",tdClass:"font-medium text-gray-900"},{key:"actions",label:"",tdClass:"text-right text-sm font-medium",sortable:!1}]);async function m({page:l,filter:y,sort:B}){let C={orderByField:B.fieldName||"created_at",orderBy:B.order||"desc",page:l},h=await p.fetchItemUnits(C);return{data:h.data.data,pagination:{totalPages:h.data.meta.last_page,currentPage:l,totalCount:h.data.meta.total,limit:5}}}async function s(){g.openModal({title:o("settings.customization.items.add_item_unit"),componentName:"ItemUnitModal",refreshData:i.value.refresh,size:"sm"})}async function _(l){p.fetchItemUnit(l.data.id),g.openModal({title:o("settings.customization.items.edit_item_unit"),componentName:"ItemUnitModal",id:l.data.id,data:l.data,refreshData:i.value&&i.value.refresh})}function n(l){u.openDialog({title:o("general.are_you_sure"),message:o("settings.customization.items.item_unit_confirm_delete"),yesLabel:o("general.yes"),noLabel:o("general.no"),variant:"danger",hideNoButton:!1,size:"lg"}).then(async y=>{y&&(await p.deleteItemUnit(l.data.id),i.value&&i.value.refresh())})}return(l,y)=>{const B=d("BaseIcon"),C=d("BaseButton"),h=d("BaseDropdownItem"),S=d("BaseDropdown"),w=d("BaseTable");return $(),D(L,null,[t(Vt),c("div",Ve,[t(C,{variant:"primary-outline",onClick:s},{left:r(U=>[t(B,{class:G(U.class),name:"PlusIcon"},null,8,["class"])]),default:r(()=>[k(" "+b(l.$t("settings.customization.items.add_item_unit")),1)]),_:1})]),t(w,{ref:(U,P)=>{P.table=U,i.value=U},class:"mt-10",data:m,columns:e(a)},{"cell-actions":r(({row:U})=>[t(S,null,{activator:r(()=>[c("div",Ie,[t(B,{name:"DotsHorizontalIcon",class:"text-gray-500"})])]),default:r(()=>[t(h,{onClick:P=>_(U)},{default:r(()=>[t(B,{name:"PencilIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),k(" "+b(l.$t("general.edit")),1)]),_:2},1032,["onClick"]),t(h,{onClick:P=>n(U)},{default:r(()=>[t(B,{name:"TrashIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),k(" "+b(l.$t("general.delete")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),_:1},8,["columns"])],64)}}},we={class:"relative"},Ne={setup(v){return(o,i)=>{const p=d("BaseTab"),g=d("BaseTabGroup"),u=d("BaseCard");return $(),D("div",we,[t(u,{"container-class":"px-4 py-5 sm:px-8 sm:py-2"},{default:r(()=>[t(g,null,{default:r(()=>[t(p,{"tab-panel-container":"py-4 mt-px",title:o.$t("settings.customization.invoices.title")},{default:r(()=>[t(se)]),_:1},8,["title"]),t(p,{"tab-panel-container":"py-4 mt-px",title:o.$t("settings.customization.estimates.title")},{default:r(()=>[t(fe)]),_:1},8,["title"]),t(p,{"tab-panel-container":"py-4 mt-px",title:o.$t("settings.customization.payments.title")},{default:r(()=>[t(ze)]),_:1},8,["title"]),t(p,{"tab-panel-container":"py-4 mt-px",title:o.$t("settings.customization.items.title")},{default:r(()=>[t(xe)]),_:1},8,["title"])]),_:1})]),_:1})])}}};export{Ne as default};
diff --git a/public/build/assets/Dashboard.db3b8908.js b/public/build/assets/Dashboard.db3b8908.js
deleted file mode 100644
index a3e93c279..000000000
--- a/public/build/assets/Dashboard.db3b8908.js
+++ /dev/null
@@ -1 +0,0 @@
-import{D as I,_ as L,a as M}from"./EstimateIcon.7f89fb19.js";import{o as m,e as v,m as $,h as c,a as V,r as i,l as h,w as s,f as t,g as F,t as u,aj as T,ah as w,u as n,i as _,J as z,G as A,k as D}from"./vendor.d12b5734.js";import{u as C}from"./global.dc565c4e.js";import{h as Z}from"./auth.c88ceb4c.js";import{_ as k}from"./main.465728e1.js";import S from"./BaseTable.ec8995dc.js";const q=c("circle",{cx:"25",cy:"25",r:"25",fill:"#EAF1FB"},null,-1),N=c("path",{d:"M17.8 17.8C17.1635 17.8 16.5531 18.0529 16.103 18.503C15.6529 18.9531 15.4 19.5635 15.4 20.2V21.4H34.6V20.2C34.6 19.5635 34.3472 18.9531 33.8971 18.503C33.447 18.0529 32.8365 17.8 32.2 17.8H17.8Z",fill:"currentColor"},null,-1),G=c("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M34.6 23.8H15.4V29.8C15.4 30.4366 15.6529 31.047 16.103 31.4971C16.5531 31.9472 17.1635 32.2 17.8 32.2H32.2C32.8365 32.2 33.447 31.9472 33.8971 31.4971C34.3472 31.047 34.6 30.4366 34.6 29.8V23.8ZM17.8 28.6C17.8 28.2818 17.9265 27.9766 18.1515 27.7515C18.3765 27.5265 18.6818 27.4 19 27.4H20.2C20.5183 27.4 20.8235 27.5265 21.0486 27.7515C21.2736 27.9766 21.4 28.2818 21.4 28.6C21.4 28.9183 21.2736 29.2235 21.0486 29.4486C20.8235 29.6736 20.5183 29.8 20.2 29.8H19C18.6818 29.8 18.3765 29.6736 18.1515 29.4486C17.9265 29.2235 17.8 28.9183 17.8 28.6ZM23.8 27.4C23.4818 27.4 23.1765 27.5265 22.9515 27.7515C22.7265 27.9766 22.6 28.2818 22.6 28.6C22.6 28.9183 22.7265 29.2235 22.9515 29.4486C23.1765 29.6736 23.4818 29.8 23.8 29.8H25C25.3183 29.8 25.6235 29.6736 25.8486 29.4486C26.0736 29.2235 26.2 28.9183 26.2 28.6C26.2 28.2818 26.0736 27.9766 25.8486 27.7515C25.6235 27.5265 25.3183 27.4 25 27.4H23.8Z",fill:"currentColor"},null,-1),O=[q,N,G],J={props:{colorClass:{type:String,default:"text-primary-500"}},setup(r){return(a,o)=>(m(),v("svg",{width:"50",height:"50",viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:$(r.colorClass)},O,2))}},{defineStore:R}=window.pinia,P=R({id:"dashboard",state:()=>({recentInvoices:[],recentEstimates:[],invoiceCount:0,estimateCount:0,paymentCount:0,totalDueAmount:[],isDashboardDataLoaded:!1}),actions:{loadData(r){const a=C();return new Promise((o,d)=>{V.get(`/api/v1/${a.companySlug}/customer/dashboard`,{data:r}).then(e=>{this.totalDueAmount=e.data.due_amount,this.estimateCount=e.data.estimate_count,this.invoiceCount=e.data.invoice_count,this.paymentCount=e.data.payment_count,this.recentInvoices=e.data.recentInvoices,this.recentEstimates=e.data.recentEstimates,a.getDashboardDataLoaded=!0,o(e)}).catch(e=>{Z(e),d(e)})})}}}),K={},Q={class:"flex items-center"};function U(r,a){const o=i("BaseContentPlaceholdersText"),d=i("BaseContentPlaceholdersBox"),e=i("BaseContentPlaceholders");return m(),h(e,{rounded:!0,class:"relative flex justify-between w-full p-3 bg-white rounded shadow lg:col-span-3 xl:p-4"},{default:s(()=>[c("div",null,[t(o,{class:"h-5 -mb-1 w-14 xl:mb-6 xl:h-7",lines:1}),t(o,{class:"h-3 w-28 xl:h-4",lines:1})]),c("div",Q,[t(d,{circle:!0,class:"w-10 h-10 xl:w-12 xl:h-12"})])]),_:1})}var W=k(K,[["render",U]]);const X={},Y={class:"flex items-center"};function ee(r,a){const o=i("BaseContentPlaceholdersText"),d=i("BaseContentPlaceholdersBox"),e=i("BaseContentPlaceholders");return m(),h(e,{rounded:!0,class:"relative flex justify-between w-full p-3 bg-white rounded shadow lg:col-span-2 xl:p-4"},{default:s(()=>[c("div",null,[t(o,{class:"w-12 h-5 -mb-1 xl:mb-6 xl:h-7",lines:1}),t(o,{class:"w-20 h-3 xl:h-4",lines:1})]),c("div",Y,[t(d,{circle:!0,class:"w-10 h-10 xl:w-12 xl:h-12"})])]),_:1})}var te=k(X,[["render",ee]]);const ae={class:"text-xl font-semibold leading-tight text-black xl:text-3xl"},se={class:"block mt-1 text-sm leading-tight text-gray-500 xl:text-lg"},oe={class:"flex items-center"},f={props:{iconComponent:{type:Object,required:!0},loading:{type:Boolean,default:!1},route:{type:Object,required:!0},label:{type:String,required:!0},large:{type:Boolean,default:!1}},setup(r){return(a,o)=>{const d=i("router-link");return r.loading?r.large?(m(),h(W,{key:1})):(m(),h(te,{key:2})):(m(),h(d,{key:0,class:$(["relative flex justify-between p-3 bg-white rounded shadow hover:bg-gray-50 xl:p-4 lg:col-span-2",{"lg:!col-span-3":r.large}]),to:r.route},{default:s(()=>[c("div",null,[c("span",ae,[F(a.$slots,"default")]),c("span",se,u(r.label),1)]),c("div",oe,[(m(),h(T(r.iconComponent),{class:"w-10 h-10 xl:w-12 xl:h-12"}))])]),_:3},8,["class","to"]))}}},ne={class:"grid gap-6 sm:grid-cols-2 lg:grid-cols-9 xl:gap-8"},le={setup(r){w("utils");const a=C(),o=P();return o.loadData(),(d,e)=>{const g=i("BaseFormatMoney");return m(),v("div",ne,[t(f,{"icon-component":I,loading:!n(a).getDashboardDataLoaded,route:{name:"invoices.dashboard"},large:!0,label:d.$t("dashboard.cards.due_amount")},{default:s(()=>[t(g,{amount:n(o).totalDueAmount,currency:n(a).currency},null,8,["amount","currency"])]),_:1},8,["loading","route","label"]),t(f,{"icon-component":L,loading:!n(a).getDashboardDataLoaded,route:{name:"invoices.dashboard"},label:d.$t("dashboard.cards.invoices")},{default:s(()=>[_(u(n(o).invoiceCount),1)]),_:1},8,["loading","route","label"]),t(f,{"icon-component":M,loading:!n(a).getDashboardDataLoaded,route:{name:"estimates.dashboard"},label:d.$t("dashboard.cards.estimates")},{default:s(()=>[_(u(n(o).estimateCount),1)]),_:1},8,["loading","route","label"]),t(f,{"icon-component":J,loading:!n(a).getDashboardDataLoaded,route:{name:"payments.dashboard"},label:d.$t("dashboard.cards.payments")},{default:s(()=>[_(u(n(o).paymentCount),1)]),_:1},8,["loading","route","label"])])}}},ce={class:"grid grid-cols-1 gap-6 mt-10 xl:grid-cols-2"},re={class:"due-invoices"},de={class:"relative z-10 flex items-center justify-between mb-3"},ie={class:"mb-0 text-xl font-semibold leading-normal"},ue={class:"recent-estimates"},me={class:"relative z-10 flex items-center justify-between mb-3"},_e={class:"mb-0 text-xl font-semibold leading-normal"},he={setup(r){const a=C(),o=P(),{tm:d,t:e}=z();w("utils"),A();const g=D(()=>[{key:"formattedDueDate",label:e("dashboard.recent_invoices_card.due_on")},{key:"invoice_number",label:e("invoices.number")},{key:"paid_status",label:e("invoices.status")},{key:"due_amount",label:e("dashboard.recent_invoices_card.amount_due")}]),j=D(()=>[{key:"formattedEstimateDate",label:e("dashboard.recent_estimate_card.date")},{key:"estimate_number",label:e("estimates.number")},{key:"status",label:e("estimates.status")},{key:"total",label:e("dashboard.recent_estimate_card.amount_due")}]);return(b,p)=>{const x=i("BaseButton"),y=i("router-link"),E=i("BasePaidStatusBadge"),B=i("BaseFormatMoney"),H=i("BaseEstimateStatusBadge");return m(),v("div",ce,[c("div",re,[c("div",de,[c("h6",ie,u(b.$t("dashboard.recent_invoices_card.title")),1),t(x,{size:"sm",variant:"primary-outline",onClick:p[0]||(p[0]=l=>b.$router.push({name:"invoices.dashboard"}))},{default:s(()=>[_(u(b.$t("dashboard.recent_invoices_card.view_all")),1)]),_:1})]),t(S,{data:n(o).recentInvoices,columns:n(g),loading:!n(a).getDashboardDataLoaded},{"cell-invoice_number":s(({row:l})=>[t(y,{to:{path:`/${n(a).companySlug}/customer/invoices/${l.data.id}/view`},class:"font-medium text-primary-500"},{default:s(()=>[_(u(l.data.invoice_number),1)]),_:2},1032,["to"])]),"cell-paid_status":s(({row:l})=>[t(E,{status:l.data.paid_status},{default:s(()=>[_(u(l.data.paid_status),1)]),_:2},1032,["status"])]),"cell-due_amount":s(({row:l})=>[t(B,{amount:l.data.due_amount,currency:n(a).currency},null,8,["amount","currency"])]),_:1},8,["data","columns","loading"])]),c("div",ue,[c("div",me,[c("h6",_e,u(b.$t("dashboard.recent_estimate_card.title")),1),t(x,{variant:"primary-outline",size:"sm",onClick:p[1]||(p[1]=l=>b.$router.push({name:"estimates.dashboard"}))},{default:s(()=>[_(u(b.$t("dashboard.recent_estimate_card.view_all")),1)]),_:1})]),t(S,{data:n(o).recentEstimates,columns:n(j),loading:!n(a).getDashboardDataLoaded},{"cell-estimate_number":s(({row:l})=>[t(y,{to:{path:`/${n(a).companySlug}/customer/estimates/${l.data.id}/view`},class:"font-medium text-primary-500"},{default:s(()=>[_(u(l.data.estimate_number),1)]),_:2},1032,["to"])]),"cell-status":s(({row:l})=>[t(H,{status:l.data.status,class:"px-3 py-1"},{default:s(()=>[_(u(l.data.status),1)]),_:2},1032,["status"])]),"cell-total":s(({row:l})=>[t(B,{amount:l.data.total,currency:n(a).currency},null,8,["amount","currency"])]),_:1},8,["data","columns","loading"])])])}}},xe={setup(r){return(a,o)=>{const d=i("BasePage");return m(),h(d,null,{default:s(()=>[t(le),t(he)]),_:1})}}};export{xe as default};
diff --git a/public/build/assets/Dashboard.f55bd37e.js b/public/build/assets/Dashboard.f55bd37e.js
deleted file mode 100644
index 89c3dfba7..000000000
--- a/public/build/assets/Dashboard.f55bd37e.js
+++ /dev/null
@@ -1 +0,0 @@
-import{D as L,_ as F,a as R}from"./EstimateIcon.7f89fb19.js";import{o as c,e as C,m as j,h as t,r,l as p,w as i,f as a,g as W,t as _,aj as z,a as q,d as H,ah as V,u as e,j as v,i as y,B as D,C as U,J as Z,k as M,V as N,G,aN as J,D as Y}from"./vendor.d12b5734.js";import{_ as T,h as K,b as O,e as E,g as h}from"./main.465728e1.js";import{_ as Q}from"./LineChart.8ef63104.js";import{_ as X}from"./InvoiceIndexDropdown.c4bcaa08.js";import{_ as tt}from"./EstimateIndexDropdown.8917d9cc.js";const et=t("circle",{cx:"25",cy:"25",r:"25",fill:"#EAF1FB"},null,-1),at=t("path",{d:"M28.2656 23.0547C27.3021 24.0182 26.1302 24.5 24.75 24.5C23.3698 24.5 22.1849 24.0182 21.1953 23.0547C20.2318 22.0651 19.75 20.8802 19.75 19.5C19.75 18.1198 20.2318 16.9479 21.1953 15.9844C22.1849 14.9948 23.3698 14.5 24.75 14.5C26.1302 14.5 27.3021 14.9948 28.2656 15.9844C29.2552 16.9479 29.75 18.1198 29.75 19.5C29.75 20.8802 29.2552 22.0651 28.2656 23.0547ZM28.2656 25.75C29.6979 25.75 30.9219 26.2708 31.9375 27.3125C32.9792 28.3281 33.5 29.5521 33.5 30.9844V32.625C33.5 33.1458 33.3177 33.5885 32.9531 33.9531C32.5885 34.3177 32.1458 34.5 31.625 34.5H17.875C17.3542 34.5 16.9115 34.3177 16.5469 33.9531C16.1823 33.5885 16 33.1458 16 32.625V30.9844C16 29.5521 16.5078 28.3281 17.5234 27.3125C18.5651 26.2708 19.8021 25.75 21.2344 25.75H21.8984C22.8099 26.1667 23.7604 26.375 24.75 26.375C25.7396 26.375 26.6901 26.1667 27.6016 25.75H28.2656Z",fill:"currentColor"},null,-1),st=[et,at],ot={props:{colorClass:{type:String,default:"text-primary-500"}},setup(d){return(o,s)=>(c(),C("svg",{width:"50",height:"50",viewBox:"0 0 50 50",class:j(d.colorClass),fill:"none",xmlns:"http://www.w3.org/2000/svg"},st,2))}},lt={},nt={class:"flex items-center"};function ct(d,o){const s=r("BaseContentPlaceholdersText"),n=r("BaseContentPlaceholdersBox"),u=r("BaseContentPlaceholders");return c(),p(u,{rounded:!0,class:"relative flex justify-between w-full p-3 bg-white rounded shadow lg:col-span-3 xl:p-4"},{default:i(()=>[t("div",null,[a(s,{class:"h-5 -mb-1 w-14 xl:mb-6 xl:h-7",lines:1}),a(s,{class:"h-3 w-28 xl:h-4",lines:1})]),t("div",nt,[a(n,{circle:!0,class:"w-10 h-10 xl:w-12 xl:h-12"})])]),_:1})}var rt=T(lt,[["render",ct]]);const it={},dt={class:"flex items-center"};function ut(d,o){const s=r("BaseContentPlaceholdersText"),n=r("BaseContentPlaceholdersBox"),u=r("BaseContentPlaceholders");return c(),p(u,{rounded:!0,class:"relative flex justify-between w-full p-3 bg-white rounded shadow lg:col-span-2 xl:p-4"},{default:i(()=>[t("div",null,[a(s,{class:"w-12 h-5 -mb-1 xl:mb-6 xl:h-7",lines:1}),a(s,{class:"w-20 h-3 xl:h-4",lines:1})]),t("div",dt,[a(n,{circle:!0,class:"w-10 h-10 xl:w-12 xl:h-12"})])]),_:1})}var mt=T(it,[["render",ut]]);const _t={class:"text-xl font-semibold leading-tight text-black xl:text-3xl"},ht={class:"block mt-1 text-sm leading-tight text-gray-500 xl:text-lg"},pt={class:"flex items-center"},B={props:{iconComponent:{type:Object,required:!0},loading:{type:Boolean,default:!1},route:{type:String,required:!0},label:{type:String,required:!0},large:{type:Boolean,default:!1}},setup(d){return(o,s)=>{const n=r("router-link");return d.loading?d.large?(c(),p(rt,{key:1})):(c(),p(mt,{key:2})):(c(),p(n,{key:0,class:j(["relative flex justify-between p-3 bg-white rounded shadow hover:bg-gray-50 xl:p-4 lg:col-span-2",{"lg:!col-span-3":d.large}]),to:d.route},{default:i(()=>[t("div",null,[t("span",_t,[W(o.$slots,"default")]),t("span",ht,_(d.label),1)]),t("div",pt,[(c(),p(z(d.iconComponent),{class:"w-10 h-10 xl:w-12 xl:h-12"}))])]),_:3},8,["class","to"]))}}},S=(d=!1)=>(d?window.pinia.defineStore:H)({id:"dashboard",state:()=>({stats:{totalAmountDue:0,totalCustomerCount:0,totalInvoiceCount:0,totalEstimateCount:0},chartData:{months:[],invoiceTotals:[],expenseTotals:[],receiptTotals:[],netIncomeTotals:[]},totalSales:null,totalReceipts:null,totalExpenses:null,totalNetIncome:null,recentDueInvoices:[],recentEstimates:[],isDashboardDataLoaded:!1}),actions:{loadData(s){return new Promise((n,u)=>{q.get("/api/v1/dashboard",{params:s}).then(l=>{this.stats.totalAmountDue=l.data.total_amount_due,this.stats.totalCustomerCount=l.data.total_customer_count,this.stats.totalInvoiceCount=l.data.total_invoice_count,this.stats.totalEstimateCount=l.data.total_estimate_count,this.chartData&&l.data.chart_data&&(this.chartData.months=l.data.chart_data.months,this.chartData.invoiceTotals=l.data.chart_data.invoice_totals,this.chartData.expenseTotals=l.data.chart_data.expense_totals,this.chartData.receiptTotals=l.data.chart_data.receipt_totals,this.chartData.netIncomeTotals=l.data.chart_data.net_income_totals),this.totalSales=l.data.total_sales,this.totalReceipts=l.data.total_receipts,this.totalExpenses=l.data.total_expenses,this.totalNetIncome=l.data.total_net_income,this.recentDueInvoices=l.data.recent_due_invoices,this.recentEstimates=l.data.recent_estimates,this.isDashboardDataLoaded=!0,n(l)}).catch(l=>{K(l),u(l)})})}}})(),bt={class:"grid gap-6 sm:grid-cols-2 lg:grid-cols-9 xl:gap-8"},xt={setup(d){V("utils");const o=S(),s=O(),n=E();return(u,l)=>{const f=r("BaseFormatMoney");return c(),C("div",bt,[e(n).hasAbilities(e(h).VIEW_INVOICE)?(c(),p(B,{key:0,"icon-component":L,loading:!e(o).isDashboardDataLoaded,route:"/admin/invoices",large:!0,label:u.$t("dashboard.cards.due_amount")},{default:i(()=>[a(f,{amount:e(o).stats.totalAmountDue,currency:e(s).selectedCompanyCurrency},null,8,["amount","currency"])]),_:1},8,["loading","label"])):v("",!0),e(n).hasAbilities(e(h).VIEW_CUSTOMER)?(c(),p(B,{key:1,"icon-component":ot,loading:!e(o).isDashboardDataLoaded,route:"/admin/customers",label:u.$t("dashboard.cards.customers")},{default:i(()=>[y(_(e(o).stats.totalCustomerCount),1)]),_:1},8,["loading","label"])):v("",!0),e(n).hasAbilities(e(h).VIEW_INVOICE)?(c(),p(B,{key:2,"icon-component":F,loading:!e(o).isDashboardDataLoaded,route:"/admin/invoices",label:u.$t("dashboard.cards.invoices")},{default:i(()=>[y(_(e(o).stats.totalInvoiceCount),1)]),_:1},8,["loading","label"])):v("",!0),e(n).hasAbilities(e(h).VIEW_ESTIMATE)?(c(),p(B,{key:3,"icon-component":R,loading:!e(o).isDashboardDataLoaded,route:"/admin/estimates",label:u.$t("dashboard.cards.estimates")},{default:i(()=>[y(_(e(o).stats.totalEstimateCount),1)]),_:1},8,["loading","label"])):v("",!0)])}}},ft={},gt={class:"grid grid-cols-1 col-span-10 px-4 py-5 lg:col-span-7 xl:col-span-8 sm:p-8"},yt={class:"flex items-center justify-between mb-2 xl:mb-4"},Ct={class:"grid grid-cols-3 col-span-10 text-center border-t border-l border-gray-200 border-solid lg:border-t-0 lg:text-right lg:col-span-3 xl:col-span-2 lg:grid-cols-1"},vt={class:"flex flex-col items-center justify-center p-6 lg:justify-end lg:items-end"},wt={class:"flex flex-col items-center justify-center p-6 lg:justify-end lg:items-end"},$t={class:"flex flex-col items-center justify-center p-6 lg:justify-end lg:items-end"},Dt={class:"flex flex-col items-center justify-center col-span-3 p-6 border-t border-gray-200 border-solid lg:justify-end lg:items-end lg:col-span-1"};function Et(d,o){const s=r("BaseContentPlaceholdersText"),n=r("BaseContentPlaceholdersBox"),u=r("BaseContentPlaceholders");return c(),p(u,{class:"grid grid-cols-10 mt-8 bg-white rounded shadow"},{default:i(()=>[t("div",gt,[t("div",yt,[a(s,{class:"h-10 w-36",lines:1}),a(s,{class:"h-10 w-36 !mt-0",lines:1})]),a(n,{class:"h-80 xl:h-72 sm:w-full"})]),t("div",Ct,[t("div",vt,[a(s,{class:"h-3 w-14 xl:h-4",lines:1}),a(s,{class:"w-20 h-5 xl:h-6",lines:1})]),t("div",wt,[a(s,{class:"h-3 w-14 xl:h-4",lines:1}),a(s,{class:"w-20 h-5 xl:h-6",lines:1})]),t("div",$t,[a(s,{class:"h-3 w-14 xl:h-4",lines:1}),a(s,{class:"w-20 h-5 xl:h-6",lines:1})]),t("div",Dt,[a(s,{class:"h-3 w-14 xl:h-4",lines:1}),a(s,{class:"w-20 h-5 xl:h-6",lines:1})])])]),_:1})}var Bt=T(ft,[["render",Et]]);const It={key:0,class:"grid grid-cols-10 mt-8 bg-white rounded shadow"},Tt={class:"grid grid-cols-1 col-span-10 px-4 py-5 lg:col-span-7 xl:col-span-8 sm:p-6"},St={class:"flex justify-between mt-1 mb-4 flex-col md:flex-row"},kt={class:"flex items-center sw-section-title h-10"},At={class:"w-full my-2 md:m-0 md:w-40 h-10"},Pt={class:"grid grid-cols-3 col-span-10 text-center border-t border-l border-gray-200 border-solid lg:border-t-0 lg:text-right lg:col-span-3 xl:col-span-2 lg:grid-cols-1"},jt={class:"p-6"},Vt={class:"text-xs leading-5 lg:text-sm"},Mt=t("br",null,null,-1),Nt={class:"block mt-1 text-xl font-semibold leading-8 lg:text-2xl"},Ot={class:"p-6"},Lt={class:"text-xs leading-5 lg:text-sm"},Ft=t("br",null,null,-1),Rt={class:"block mt-1 text-xl font-semibold leading-8 lg:text-2xl text-green-400"},Wt={class:"p-6"},zt={class:"text-xs leading-5 lg:text-sm"},qt=t("br",null,null,-1),Ht={class:"block mt-1 text-xl font-semibold leading-8 lg:text-2xl text-red-400"},Ut={class:"col-span-3 p-6 border-t border-gray-200 border-solid lg:col-span-1"},Zt={class:"text-xs leading-5 lg:text-sm"},Gt=t("br",null,null,-1),Jt={class:"block mt-1 text-xl font-semibold leading-8 lg:text-2xl text-primary-500"},Yt={setup(d){const o=S(),s=O();V("utils");const n=E(),u=D(["This year","Previous year"]),l=D("This year");U(l,b=>{b==="Previous year"?f({previous_year:!0}):f()},{immediate:!0});async function f(b){n.hasAbilities(h.DASHBOARD)&&await o.loadData(b)}return(b,w)=>{const I=r("BaseIcon"),g=r("BaseMultiselect"),x=r("BaseFormatMoney");return c(),C("div",null,[e(o).isDashboardDataLoaded?(c(),C("div",It,[t("div",Tt,[t("div",St,[t("h6",kt,[a(I,{name:"ChartSquareBarIcon",class:"text-primary-400 mr-1"}),y(" "+_(b.$t("dashboard.monthly_chart.title")),1)]),t("div",At,[a(g,{modelValue:l.value,"onUpdate:modelValue":w[0]||(w[0]=$=>l.value=$),options:u.value,"allow-empty":!1,"show-labels":!1,placeholder:b.$t("dashboard.select_year"),"can-deselect":!1},null,8,["modelValue","options","placeholder"])])]),a(Q,{invoices:e(o).chartData.invoiceTotals,expenses:e(o).chartData.expenseTotals,receipts:e(o).chartData.receiptTotals,income:e(o).chartData.netIncomeTotals,labels:e(o).chartData.months,class:"sm:w-full"},null,8,["invoices","expenses","receipts","income","labels"])]),t("div",Pt,[t("div",jt,[t("span",Vt,_(b.$t("dashboard.chart_info.total_sales")),1),Mt,t("span",Nt,[a(x,{amount:e(o).totalSales,currency:e(s).selectedCompanyCurrency},null,8,["amount","currency"])])]),t("div",Ot,[t("span",Lt,_(b.$t("dashboard.chart_info.total_receipts")),1),Ft,t("span",Rt,[a(x,{amount:e(o).totalReceipts,currency:e(s).selectedCompanyCurrency},null,8,["amount","currency"])])]),t("div",Wt,[t("span",zt,_(b.$t("dashboard.chart_info.total_expense")),1),qt,t("span",Ht,[a(x,{amount:e(o).totalExpenses,currency:e(s).selectedCompanyCurrency},null,8,["amount","currency"])])]),t("div",Ut,[t("span",Zt,_(b.$t("dashboard.chart_info.net_income")),1),Gt,t("span",Jt,[a(x,{amount:e(o).totalNetIncome,currency:e(s).selectedCompanyCurrency},null,8,["amount","currency"])])])])])):(c(),p(Bt,{key:1}))])}}},Kt={class:"grid grid-cols-1 gap-6 mt-10 xl:grid-cols-2"},Qt={key:0,class:"due-invoices"},Xt={class:"relative z-10 flex items-center justify-between mb-3"},te={class:"mb-0 text-xl font-semibold leading-normal"},ee={key:1,class:"recent-estimates"},ae={class:"relative z-10 flex items-center justify-between mb-3"},se={class:"mb-0 text-xl font-semibold leading-normal"},oe={setup(d){const o=S(),{t:s}=Z(),n=E(),u=D(null),l=D(null),f=M(()=>[{key:"formattedDueDate",label:s("dashboard.recent_invoices_card.due_on")},{key:"user",label:s("dashboard.recent_invoices_card.customer")},{key:"due_amount",label:s("dashboard.recent_invoices_card.amount_due")},{key:"actions",tdClass:"text-right text-sm font-medium pl-0",thClass:"text-right pl-0",sortable:!1}]),b=M(()=>[{key:"formattedEstimateDate",label:s("dashboard.recent_estimate_card.date")},{key:"user",label:s("dashboard.recent_estimate_card.customer")},{key:"total",label:s("dashboard.recent_estimate_card.amount_due")},{key:"actions",tdClass:"text-right text-sm font-medium pl-0",thClass:"text-right pl-0",sortable:!1}]);function w(){return n.hasAbilities([h.DELETE_INVOICE,h.EDIT_INVOICE,h.VIEW_INVOICE,h.SEND_INVOICE])}function I(){return n.hasAbilities([h.CREATE_ESTIMATE,h.EDIT_ESTIMATE,h.VIEW_ESTIMATE,h.SEND_ESTIMATE])}return(g,x)=>{const $=r("BaseButton"),k=r("router-link"),A=r("BaseFormatMoney"),P=r("BaseTable");return c(),C("div",null,[t("div",Kt,[e(n).hasAbilities(e(h).VIEW_INVOICE)?(c(),C("div",Qt,[t("div",Xt,[t("h6",te,_(g.$t("dashboard.recent_invoices_card.title")),1),a($,{size:"sm",variant:"primary-outline",onClick:x[0]||(x[0]=m=>g.$router.push("/admin/invoices"))},{default:i(()=>[y(_(g.$t("dashboard.recent_invoices_card.view_all")),1)]),_:1})]),a(P,{data:e(o).recentDueInvoices,columns:e(f),loading:!e(o).isDashboardDataLoaded},N({"cell-user":i(({row:m})=>[a(k,{to:{path:`invoices/${m.data.id}/view`},class:"font-medium text-primary-500"},{default:i(()=>[y(_(m.data.customer.name),1)]),_:2},1032,["to"])]),"cell-due_amount":i(({row:m})=>[a(A,{amount:m.data.due_amount,currency:m.data.customer.currency},null,8,["amount","currency"])]),_:2},[w()?{name:"cell-actions",fn:i(({row:m})=>[a(X,{row:m.data,table:u.value},null,8,["row","table"])])}:void 0]),1032,["data","columns","loading"])])):v("",!0),e(n).hasAbilities(e(h).VIEW_ESTIMATE)?(c(),C("div",ee,[t("div",ae,[t("h6",se,_(g.$t("dashboard.recent_estimate_card.title")),1),a($,{variant:"primary-outline",size:"sm",onClick:x[1]||(x[1]=m=>g.$router.push("/admin/estimates"))},{default:i(()=>[y(_(g.$t("dashboard.recent_estimate_card.view_all")),1)]),_:1})]),a(P,{data:e(o).recentEstimates,columns:e(b),loading:!e(o).isDashboardDataLoaded},N({"cell-user":i(({row:m})=>[a(k,{to:{path:`estimates/${m.data.id}/view`},class:"font-medium text-primary-500"},{default:i(()=>[y(_(m.data.customer.name),1)]),_:2},1032,["to"])]),"cell-total":i(({row:m})=>[a(A,{amount:m.data.total,currency:m.data.customer.currency},null,8,["amount","currency"])]),_:2},[I()?{name:"cell-actions",fn:i(({row:m})=>[a(tt,{row:m,table:l.value},null,8,["row","table"])])}:void 0]),1032,["data","columns","loading"])])):v("",!0)])])}}},ue={setup(d){const o=G(),s=E(),n=J();return Y(()=>{o.meta.ability&&!s.hasAbilities(o.meta.ability)?n.push({name:"account.settings"}):o.meta.isOwner&&!s.currentUser.is_owner&&n.push({name:"account.settings"})}),(u,l)=>{const f=r("BasePage");return c(),p(f,null,{default:i(()=>[a(xt),a(Yt),a(oe)]),_:1})}}};export{ue as default};
diff --git a/public/build/assets/DateTimeType.6886ff98.js b/public/build/assets/DateTimeType.6886ff98.js
deleted file mode 100644
index 385b5d897..000000000
--- a/public/build/assets/DateTimeType.6886ff98.js
+++ /dev/null
@@ -1 +0,0 @@
-import{I as r,k as d,r as m,o as p,l as c,u as i,x as f}from"./vendor.d12b5734.js";const k={props:{modelValue:{type:String,default:r().format("YYYY-MM-DD hh:MM")}},emits:["update:modelValue"],setup(t,{emit:l}){const s=t,e=d({get:()=>s.modelValue,set:o=>{l("update:modelValue",o)}});return(o,a)=>{const u=m("BaseDatePicker");return p(),c(u,{modelValue:i(e),"onUpdate:modelValue":a[0]||(a[0]=n=>f(e)?e.value=n:null),"enable-time":""},null,8,["modelValue"])}}};export{k as default};
diff --git a/public/build/assets/DateType.12fc8765.js b/public/build/assets/DateType.12fc8765.js
deleted file mode 100644
index ca381239d..000000000
--- a/public/build/assets/DateType.12fc8765.js
+++ /dev/null
@@ -1 +0,0 @@
-import{I as r,k as d,r as m,o as p,l as c,u as f,x as i}from"./vendor.d12b5734.js";const k={props:{modelValue:{type:[String,Date],default:r().format("YYYY-MM-DD")}},emits:["update:modelValue"],setup(t,{emit:l}){const s=t,e=d({get:()=>s.modelValue,set:o=>{l("update:modelValue",o)}});return(o,a)=>{const u=m("BaseDatePicker");return p(),c(u,{modelValue:f(e),"onUpdate:modelValue":a[0]||(a[0]=n=>i(e)?e.value=n:null)},null,8,["modelValue"])}}};export{k as default};
diff --git a/public/build/assets/DragIcon.2da3872a.js b/public/build/assets/DragIcon.2da3872a.js
deleted file mode 100644
index 1b70f7a9a..000000000
--- a/public/build/assets/DragIcon.2da3872a.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import{aU as $r,aV as Br,aQ as Kr,aW as Hr,o as Wr,e as Xr,h as Yr}from"./vendor.d12b5734.js";import{_ as Vr}from"./main.465728e1.js";var gr={exports:{}};/**!
- * Sortable 1.14.0
- * @author RubaXa c+s*f/2:a