mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-11-03 22:13:18 -05:00 
			
		
		
		
	Compare commits
	
		
			160 Commits
		
	
	
		
			NickCrater
			...
			dependabot
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| be9768f6c3 | |||
| 05d5ce26fd | |||
| 393fe20010 | |||
| 57bdbd2897 | |||
| 7447cc24f9 | |||
| 889d22d92c | |||
| bc8f2cd484 | |||
| 4e47f58bad | |||
| d8c429912e | |||
| 0aaf0e7e75 | |||
| 3d0b89bb4d | |||
| 38c4b9ebce | |||
| 7be59e78e0 | |||
| 204483836a | |||
| 33bc9ded65 | |||
| 4271ef451e | |||
| 6eb44fba93 | |||
| 96e7300583 | |||
| a479d966d1 | |||
| bca2794c4c | |||
| cb88c19059 | |||
| 946c7efab4 | |||
| d7b1d15f93 | |||
| 94e1efe115 | |||
| b0e38b74e9 | |||
| 157559cc05 | |||
| 9d1484d62d | |||
| 654dd9e64d | |||
| 7cde971f8b | |||
| 4e7441a5cf | |||
| b714833b06 | |||
| 88035ea490 | |||
| 80847529fa | |||
| 18507ddb6f | |||
| 7275f3dd47 | |||
| e31f947aba | |||
| 7ba120db31 | |||
| bc73ed8c9e | |||
| b1689dd2c6 | |||
| f6c59b7423 | |||
| 2cadcad485 | |||
| 04deade111 | |||
| ee0632f0d3 | |||
| f6771dafd3 | |||
| fadef0ea07 | |||
| c07e44520a | |||
| 6552c4edd6 | |||
| 5183a825e6 | |||
| 83a7c97e9e | |||
| eea3925fcd | |||
| 9a0de9f64f | |||
| a23644c9d8 | |||
| b884001e87 | |||
| bb54edc147 | |||
| 25c43ab4d2 | |||
| 388d00241b | |||
| 69d8c95557 | |||
| ea9748ca68 | |||
| 66a5501bd2 | |||
| c897521137 | |||
| adf4b3a74d | |||
| cc737593b7 | |||
| 9356c309a2 | |||
| 35da80103e | |||
| 99f553f1c3 | |||
| 3f4305c7cb | |||
| a678b4d272 | |||
| 0c83456866 | |||
| 2cb51b84c7 | |||
| 3908878109 | |||
| 6970a4f243 | |||
| 5720803116 | |||
| 351e6617d9 | |||
| ffa7906382 | |||
| 2a43ec9e9d | |||
| 48f9da14ba | |||
| 4153d10a0a | |||
| 1322ed15dc | |||
| a452ec5eaf | |||
| b819307612 | |||
| 7202fdcbf2 | |||
| c28fc073e4 | |||
| 439fc4e002 | |||
| ca15751a5f | |||
| 50637f5f7c | |||
| e3219baad2 | |||
| 8de8a07e3e | |||
| ab28ba38ce | |||
| 7a27317f1a | |||
| ab153963e4 | |||
| 65dd1eca01 | |||
| bed05fc21f | |||
| 0578122fc3 | |||
| ce3db7d0c6 | |||
| 854ae10198 | |||
| 2383e89daa | |||
| 6529fa1892 | |||
| eef74fd2fc | |||
| 2f69b6fa71 | |||
| 7170fb0cef | |||
| db7a084a19 | |||
| e24a89fe39 | |||
| 6a3e9e132f | |||
| 68575b69b9 | |||
| 8da5f99511 | |||
| 912dbdc1c5 | |||
| 771d396bfb | |||
| 30dc428b1a | |||
| 6f7555bdce | |||
| 13cbb5439f | |||
| a0cd12913d | |||
| 67e93dcb00 | |||
| 7427f8a4ac | |||
| 10ceaa0e2c | |||
| 15256a19db | |||
| 8ba84f68c7 | |||
| 9e23f9b9b1 | |||
| 7f4cdfffc6 | |||
| c9d6824f8c | |||
| 84f5890294 | |||
| ab8089fe98 | |||
| 383ba65d7c | |||
| f34dac9d3f | |||
| c3965613b5 | |||
| c07e309918 | |||
| 35e71ec110 | |||
| 82dbee4794 | |||
| d883e89819 | |||
| 00133d66c2 | |||
| e8a88dbad3 | |||
| 2b7028b7c8 | |||
| 513d43d92f | |||
| b781f11175 | |||
| ca1aa604e3 | |||
| e1e1157f2d | |||
| 3f2c774f91 | |||
| 9448677dad | |||
| 9709489c66 | |||
| 2fcc87180f | |||
| 0c77562d0e | |||
| 5f53138dc5 | |||
| 2019e9be03 | |||
| 938e6f2a9f | |||
| c82dc94252 | |||
| c6b36d78b9 | |||
| 1d402e0143 | |||
| 75a0ed1ffc | |||
| 577c015d14 | |||
| 760f4566aa | |||
| d7ec554eba | |||
| c194e98a7b | |||
| 6a34708a37 | |||
| ab863a8d88 | |||
| f594556de0 | |||
| 30f36461c2 | |||
| 980de6d492 | |||
| ff3cd0f7b9 | |||
| 323b7d8ea6 | |||
| dc7282d6e9 | |||
| 85836c3f9c | 
							
								
								
									
										161
									
								
								.github/workflows/uffizzi-build.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										161
									
								
								.github/workflows/uffizzi-build.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,161 @@
 | 
				
			|||||||
 | 
					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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										84
									
								
								.github/workflows/uffizzi-preview.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								.github/workflows/uffizzi-preview.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,84 @@
 | 
				
			|||||||
 | 
					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<<EOF' >> $GITHUB_ENV
 | 
				
			||||||
 | 
					          cat event.json >> $GITHUB_ENV
 | 
				
			||||||
 | 
					          echo 'EOF' >> $GITHUB_ENV
 | 
				
			||||||
 | 
					      - name: Hash Rendered Compose File
 | 
				
			||||||
 | 
					        id: hash
 | 
				
			||||||
 | 
					        # If the previous workflow was triggered by a PR close event, we will not have a compose file artifact.
 | 
				
			||||||
 | 
					        if: ${{ fromJSON(env.EVENT_JSON).action != 'closed' }}
 | 
				
			||||||
 | 
					        run: echo "COMPOSE_FILE_HASH=$(md5sum docker-compose.rendered.yml | awk '{ print $1 }')" >> $GITHUB_ENV
 | 
				
			||||||
 | 
					      - name: Cache Rendered Compose File
 | 
				
			||||||
 | 
					        if: ${{ fromJSON(env.EVENT_JSON).action != 'closed' }}
 | 
				
			||||||
 | 
					        uses: actions/cache@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          path: docker-compose.rendered.yml
 | 
				
			||||||
 | 
					          key: ${{ env.COMPOSE_FILE_HASH }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Read PR Number From Event Object
 | 
				
			||||||
 | 
					        id: pr
 | 
				
			||||||
 | 
					        run: echo "PR_NUMBER=${{ fromJSON(env.EVENT_JSON).number }}" >> $GITHUB_ENV
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: DEBUG - Print Job Outputs
 | 
				
			||||||
 | 
					        if: ${{ runner.debug }}
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          echo "PR number: ${{ env.PR_NUMBER }}"
 | 
				
			||||||
 | 
					          echo "Compose file hash: ${{ env.COMPOSE_FILE_HASH }}"
 | 
				
			||||||
 | 
					          cat event.json
 | 
				
			||||||
 | 
					  deploy-uffizzi-preview:
 | 
				
			||||||
 | 
					    name: Use Remote Workflow to Preview on Uffizzi
 | 
				
			||||||
 | 
					    needs:
 | 
				
			||||||
 | 
					      - cache-compose-file
 | 
				
			||||||
 | 
					    uses: UffizziCloud/preview-action/.github/workflows/reusable.yaml@v2.6.1
 | 
				
			||||||
 | 
					    with:
 | 
				
			||||||
 | 
					      # If this workflow was triggered by a PR close event, cache-key will be an empty string
 | 
				
			||||||
 | 
					      # and this reusable workflow will delete the preview deployment.
 | 
				
			||||||
 | 
					      compose-file-cache-key: ${{ needs.cache-compose-file.outputs.compose-file-cache-key }}
 | 
				
			||||||
 | 
					      compose-file-cache-path: docker-compose.rendered.yml
 | 
				
			||||||
 | 
					      server: https://app.uffizzi.com/
 | 
				
			||||||
 | 
					      pr-number: ${{ needs.cache-compose-file.outputs.pr-number }}
 | 
				
			||||||
 | 
					    permissions:
 | 
				
			||||||
 | 
					      contents: read
 | 
				
			||||||
 | 
					      pull-requests: write
 | 
				
			||||||
 | 
					      id-token: write
 | 
				
			||||||
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -14,3 +14,7 @@ Homestead.yaml
 | 
				
			|||||||
/.vscode
 | 
					/.vscode
 | 
				
			||||||
/docker-compose/db/data/
 | 
					/docker-compose/db/data/
 | 
				
			||||||
.gitkeep
 | 
					.gitkeep
 | 
				
			||||||
 | 
					/public/docs
 | 
				
			||||||
 | 
					/.scribe
 | 
				
			||||||
 | 
					!storage/fonts/.gitkeep
 | 
				
			||||||
 | 
					.DS_Store
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
FROM php:7.4-fpm
 | 
					FROM php:8.1-fpm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Arguments defined in docker-compose.yml
 | 
					# Arguments defined in docker-compose.yml
 | 
				
			||||||
ARG user
 | 
					ARG user
 | 
				
			||||||
 | 
				
			|||||||
@ -40,10 +40,13 @@ class CheckInvoiceStatus extends Command
 | 
				
			|||||||
    public function handle()
 | 
					    public function handle()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $date = Carbon::now();
 | 
					        $date = Carbon::now();
 | 
				
			||||||
        $invoices = Invoice::where('status', '<>', Invoice::STATUS_COMPLETED)->whereDate('due_date', '<', $date)->get();
 | 
					        $invoices = Invoice::whereNotIn('status', [Invoice::STATUS_COMPLETED, Invoice::STATUS_DRAFT])
 | 
				
			||||||
 | 
					            ->where('overdue', false)
 | 
				
			||||||
 | 
					            ->whereDate('due_date', '<', $date)
 | 
				
			||||||
 | 
					            ->get();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        foreach ($invoices as $invoice) {
 | 
					        foreach ($invoices as $invoice) {
 | 
				
			||||||
            $invoice->status = Invoice::STATUS_OVERDUE;
 | 
					            $invoice->overdue = true;
 | 
				
			||||||
            printf("Invoice %s is OVERDUE \n", $invoice->invoice_number);
 | 
					            printf("Invoice %s is OVERDUE \n", $invoice->invoice_number);
 | 
				
			||||||
            $invoice->save();
 | 
					            $invoice->save();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -55,7 +55,7 @@ class CreateTemplateCommand extends Command
 | 
				
			|||||||
        copy(public_path("/build/img/PDF/{$type}1.png"), public_path("/build/img/PDF/{$templateName}.png"));
 | 
					        copy(public_path("/build/img/PDF/{$type}1.png"), public_path("/build/img/PDF/{$templateName}.png"));
 | 
				
			||||||
        copy(resource_path("/static/img/PDF/{$type}1.png"), resource_path("/static/img/PDF/{$templateName}.png"));
 | 
					        copy(resource_path("/static/img/PDF/{$type}1.png"), resource_path("/static/img/PDF/{$templateName}.png"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $path = resource_path("app/pdf/{$type}/{$templateName}.blade.php");
 | 
					        $path = resource_path("views/app/pdf/{$type}/{$templateName}.blade.php");
 | 
				
			||||||
        $type = ucfirst($type);
 | 
					        $type = ucfirst($type);
 | 
				
			||||||
        $this->info("{$type} Template created successfully at ".$path);
 | 
					        $this->info("{$type} Template created successfully at ".$path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -2,6 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
namespace Crater\Console;
 | 
					namespace Crater\Console;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Models\CompanySetting;
 | 
				
			||||||
use Crater\Models\RecurringInvoice;
 | 
					use Crater\Models\RecurringInvoice;
 | 
				
			||||||
use Illuminate\Console\Scheduling\Schedule;
 | 
					use Illuminate\Console\Scheduling\Schedule;
 | 
				
			||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
 | 
					use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
 | 
				
			||||||
@ -37,9 +38,11 @@ class Kernel extends ConsoleKernel
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            $recurringInvoices = RecurringInvoice::where('status', 'ACTIVE')->get();
 | 
					            $recurringInvoices = RecurringInvoice::where('status', 'ACTIVE')->get();
 | 
				
			||||||
            foreach ($recurringInvoices as $recurringInvoice) {
 | 
					            foreach ($recurringInvoices as $recurringInvoice) {
 | 
				
			||||||
 | 
					                $timeZone = CompanySetting::getSetting('time_zone', $recurringInvoice->company_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $schedule->call(function () use ($recurringInvoice) {
 | 
					                $schedule->call(function () use ($recurringInvoice) {
 | 
				
			||||||
                    $recurringInvoice->generateInvoice();
 | 
					                    $recurringInvoice->generateInvoice();
 | 
				
			||||||
                })->cron($recurringInvoice->frequency);
 | 
					                })->cron($recurringInvoice->frequency)->timezone($timeZone);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -12,6 +12,7 @@ use Crater\Models\Expense;
 | 
				
			|||||||
use Crater\Models\Invoice;
 | 
					use Crater\Models\Invoice;
 | 
				
			||||||
use Crater\Models\Payment;
 | 
					use Crater\Models\Payment;
 | 
				
			||||||
use Illuminate\Http\Request;
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					use Silber\Bouncer\BouncerFacade;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class DashboardController extends Controller
 | 
					class DashboardController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -151,8 +152,8 @@ class DashboardController extends Controller
 | 
				
			|||||||
            'total_invoice_count' => $total_invoice_count,
 | 
					            'total_invoice_count' => $total_invoice_count,
 | 
				
			||||||
            'total_estimate_count' => $total_estimate_count,
 | 
					            'total_estimate_count' => $total_estimate_count,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            'recent_due_invoices' => $recent_due_invoices,
 | 
					            'recent_due_invoices' => BouncerFacade::can('view-invoice', Invoice::class) ? $recent_due_invoices : [],
 | 
				
			||||||
            'recent_estimates' => $recent_estimates,
 | 
					            'recent_estimates' => BouncerFacade::can('view-estimate', Estimate::class) ? $recent_estimates : [],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            'chart_data' => $chart_data,
 | 
					            'chart_data' => $chart_data,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
namespace Crater\Http\Controllers\V1\Admin\Expense;
 | 
					namespace Crater\Http\Controllers\V1\Admin\Expense;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
use Crater\Http\Requests\ExpenseRequest;
 | 
					use Crater\Http\Requests\UploadExpenseReceiptRequest;
 | 
				
			||||||
use Crater\Models\Expense;
 | 
					use Crater\Models\Expense;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UploadReceiptController extends Controller
 | 
					class UploadReceiptController extends Controller
 | 
				
			||||||
@ -15,7 +15,7 @@ class UploadReceiptController extends Controller
 | 
				
			|||||||
     * @param  Expense $expense
 | 
					     * @param  Expense $expense
 | 
				
			||||||
     * @return \Illuminate\Http\JsonResponse
 | 
					     * @return \Illuminate\Http\JsonResponse
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function __invoke(ExpenseRequest $request, Expense $expense)
 | 
					    public function __invoke(UploadExpenseReceiptRequest $request, Expense $expense)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->authorize('update', $expense);
 | 
					        $this->authorize('update', $expense);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -49,7 +49,16 @@ class BootstrapController extends Controller
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        BouncerFacade::refreshFor($current_user);
 | 
					        BouncerFacade::refreshFor($current_user);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $global_settings = Setting::getSettings(['api_token', 'admin_portal_theme']);
 | 
					        $global_settings = Setting::getSettings([
 | 
				
			||||||
 | 
					            'api_token',
 | 
				
			||||||
 | 
					            'admin_portal_theme',
 | 
				
			||||||
 | 
					            'admin_portal_logo',
 | 
				
			||||||
 | 
					            'login_page_logo',
 | 
				
			||||||
 | 
					            'login_page_heading',
 | 
				
			||||||
 | 
					            'login_page_description',
 | 
				
			||||||
 | 
					            'admin_page_title',
 | 
				
			||||||
 | 
					            'copyright_text'
 | 
				
			||||||
 | 
					        ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return response()->json([
 | 
					        return response()->json([
 | 
				
			||||||
            'current_user' => new UserResource($current_user),
 | 
					            'current_user' => new UserResource($current_user),
 | 
				
			||||||
 | 
				
			|||||||
@ -3,18 +3,18 @@
 | 
				
			|||||||
namespace Crater\Http\Controllers\V1\Admin\Modules;
 | 
					namespace Crater\Http\Controllers\V1\Admin\Modules;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
 | 
					use Crater\Http\Requests\UnzipUpdateRequest;
 | 
				
			||||||
use Crater\Space\ModuleInstaller;
 | 
					use Crater\Space\ModuleInstaller;
 | 
				
			||||||
use Illuminate\Http\Request;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UnzipModuleController extends Controller
 | 
					class UnzipModuleController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Handle the incoming request.
 | 
					     * Handle the incoming request.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Crater\Http\Requests\UnzipUpdateRequest  $request
 | 
				
			||||||
     * @return \Illuminate\Http\Response
 | 
					     * @return \Illuminate\Http\Response
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Request $request)
 | 
					    public function __invoke(UnzipUpdateRequest $request)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->authorize('manage modules');
 | 
					        $this->authorize('manage modules');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -3,18 +3,18 @@
 | 
				
			|||||||
namespace Crater\Http\Controllers\V1\Admin\Modules;
 | 
					namespace Crater\Http\Controllers\V1\Admin\Modules;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
 | 
					use Crater\Http\Requests\UploadModuleRequest;
 | 
				
			||||||
use Crater\Space\ModuleInstaller;
 | 
					use Crater\Space\ModuleInstaller;
 | 
				
			||||||
use Illuminate\Http\Request;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UploadModuleController extends Controller
 | 
					class UploadModuleController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Handle the incoming request.
 | 
					     * Handle the incoming request.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Crater\Http\Requests\UploadModuleRequest  $request
 | 
				
			||||||
     * @return \Illuminate\Http\Response
 | 
					     * @return \Illuminate\Http\Response
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Request $request)
 | 
					    public function __invoke(UploadModuleRequest $request)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->authorize('manage modules');
 | 
					        $this->authorize('manage modules');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -2,24 +2,25 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
					namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use PDF;
 | 
				
			||||||
use Carbon\Carbon;
 | 
					use Carbon\Carbon;
 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					 | 
				
			||||||
use Crater\Models\Company;
 | 
					use Crater\Models\Company;
 | 
				
			||||||
use Crater\Models\CompanySetting;
 | 
					use Crater\Models\Currency;
 | 
				
			||||||
use Crater\Models\Customer;
 | 
					use Crater\Models\Customer;
 | 
				
			||||||
use Illuminate\Http\Request;
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					use Crater\Models\CompanySetting;
 | 
				
			||||||
use Illuminate\Support\Facades\App;
 | 
					use Illuminate\Support\Facades\App;
 | 
				
			||||||
use PDF;
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class CustomerSalesReportController extends Controller
 | 
					class CustomerSalesReportController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
    * Handle the incoming request.
 | 
					     * Handle the incoming request.
 | 
				
			||||||
    *
 | 
					     *
 | 
				
			||||||
    * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
    * @param  string  $hash
 | 
					     * @param  string  $hash
 | 
				
			||||||
    * @return \Illuminate\Http\JsonResponse
 | 
					     * @return \Illuminate\Http\JsonResponse
 | 
				
			||||||
    */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Request $request, $hash)
 | 
					    public function __invoke(Request $request, $hash)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $company = Company::where('unique_hash', $hash)->first();
 | 
					        $company = Company::where('unique_hash', $hash)->first();
 | 
				
			||||||
@ -56,6 +57,7 @@ class CustomerSalesReportController extends Controller
 | 
				
			|||||||
        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
					        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
				
			||||||
        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
					        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
				
			||||||
        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
					        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
				
			||||||
 | 
					        $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $colors = [
 | 
					        $colors = [
 | 
				
			||||||
            'primary_text_color',
 | 
					            'primary_text_color',
 | 
				
			||||||
@ -80,6 +82,7 @@ class CustomerSalesReportController extends Controller
 | 
				
			|||||||
            'company' => $company,
 | 
					            'company' => $company,
 | 
				
			||||||
            'from_date' => $from_date,
 | 
					            'from_date' => $from_date,
 | 
				
			||||||
            'to_date' => $to_date,
 | 
					            'to_date' => $to_date,
 | 
				
			||||||
 | 
					            'currency' => $currency,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $pdf = PDF::loadView('app.pdf.reports.sales-customers');
 | 
					        $pdf = PDF::loadView('app.pdf.reports.sales-customers');
 | 
				
			||||||
 | 
				
			|||||||
@ -2,24 +2,25 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
					namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Carbon\Carbon;
 | 
					 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					 | 
				
			||||||
use Crater\Models\Company;
 | 
					 | 
				
			||||||
use Crater\Models\CompanySetting;
 | 
					 | 
				
			||||||
use Crater\Models\Expense;
 | 
					 | 
				
			||||||
use Illuminate\Http\Request;
 | 
					 | 
				
			||||||
use Illuminate\Support\Facades\App;
 | 
					 | 
				
			||||||
use PDF;
 | 
					use PDF;
 | 
				
			||||||
 | 
					use Carbon\Carbon;
 | 
				
			||||||
 | 
					use Crater\Models\Company;
 | 
				
			||||||
 | 
					use Crater\Models\Expense;
 | 
				
			||||||
 | 
					use Crater\Models\Currency;
 | 
				
			||||||
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					use Crater\Models\CompanySetting;
 | 
				
			||||||
 | 
					use Illuminate\Support\Facades\App;
 | 
				
			||||||
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ExpensesReportController extends Controller
 | 
					class ExpensesReportController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
    * Handle the incoming request.
 | 
					     * Handle the incoming request.
 | 
				
			||||||
    *
 | 
					     *
 | 
				
			||||||
    * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
    * @param  string  $hash
 | 
					     * @param  string  $hash
 | 
				
			||||||
    * @return \Illuminate\Http\JsonResponse
 | 
					     * @return \Illuminate\Http\JsonResponse
 | 
				
			||||||
    */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Request $request, $hash)
 | 
					    public function __invoke(Request $request, $hash)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $company = Company::where('unique_hash', $hash)->first();
 | 
					        $company = Company::where('unique_hash', $hash)->first();
 | 
				
			||||||
@ -43,6 +44,7 @@ class ExpensesReportController extends Controller
 | 
				
			|||||||
        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
					        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
				
			||||||
        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
					        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
				
			||||||
        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
					        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
				
			||||||
 | 
					        $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $colors = [
 | 
					        $colors = [
 | 
				
			||||||
            'primary_text_color',
 | 
					            'primary_text_color',
 | 
				
			||||||
@ -66,6 +68,7 @@ class ExpensesReportController extends Controller
 | 
				
			|||||||
            'company' => $company,
 | 
					            'company' => $company,
 | 
				
			||||||
            'from_date' => $from_date,
 | 
					            'from_date' => $from_date,
 | 
				
			||||||
            'to_date' => $to_date,
 | 
					            'to_date' => $to_date,
 | 
				
			||||||
 | 
					            'currency' => $currency,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
        $pdf = PDF::loadView('app.pdf.reports.expenses');
 | 
					        $pdf = PDF::loadView('app.pdf.reports.expenses');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -2,24 +2,25 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
					namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Carbon\Carbon;
 | 
					 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					 | 
				
			||||||
use Crater\Models\Company;
 | 
					 | 
				
			||||||
use Crater\Models\CompanySetting;
 | 
					 | 
				
			||||||
use Crater\Models\InvoiceItem;
 | 
					 | 
				
			||||||
use Illuminate\Http\Request;
 | 
					 | 
				
			||||||
use Illuminate\Support\Facades\App;
 | 
					 | 
				
			||||||
use PDF;
 | 
					use PDF;
 | 
				
			||||||
 | 
					use Carbon\Carbon;
 | 
				
			||||||
 | 
					use Crater\Models\Company;
 | 
				
			||||||
 | 
					use Crater\Models\Currency;
 | 
				
			||||||
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					use Crater\Models\InvoiceItem;
 | 
				
			||||||
 | 
					use Crater\Models\CompanySetting;
 | 
				
			||||||
 | 
					use Illuminate\Support\Facades\App;
 | 
				
			||||||
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ItemSalesReportController extends Controller
 | 
					class ItemSalesReportController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
    * Handle the incoming request.
 | 
					     * Handle the incoming request.
 | 
				
			||||||
    *
 | 
					     *
 | 
				
			||||||
    * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
    * @param  string  $hash
 | 
					     * @param  string  $hash
 | 
				
			||||||
    * @return \Illuminate\Http\JsonResponse
 | 
					     * @return \Illuminate\Http\JsonResponse
 | 
				
			||||||
    */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Request $request, $hash)
 | 
					    public function __invoke(Request $request, $hash)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $company = Company::where('unique_hash', $hash)->first();
 | 
					        $company = Company::where('unique_hash', $hash)->first();
 | 
				
			||||||
@ -43,6 +44,7 @@ class ItemSalesReportController extends Controller
 | 
				
			|||||||
        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
					        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
				
			||||||
        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
					        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
				
			||||||
        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
					        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
				
			||||||
 | 
					        $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $colors = [
 | 
					        $colors = [
 | 
				
			||||||
            'primary_text_color',
 | 
					            'primary_text_color',
 | 
				
			||||||
@ -66,6 +68,7 @@ class ItemSalesReportController extends Controller
 | 
				
			|||||||
            'company' => $company,
 | 
					            'company' => $company,
 | 
				
			||||||
            'from_date' => $from_date,
 | 
					            'from_date' => $from_date,
 | 
				
			||||||
            'to_date' => $to_date,
 | 
					            'to_date' => $to_date,
 | 
				
			||||||
 | 
					            'currency' => $currency,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
        $pdf = PDF::loadView('app.pdf.reports.sales-items');
 | 
					        $pdf = PDF::loadView('app.pdf.reports.sales-items');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -2,25 +2,26 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
					namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use PDF;
 | 
				
			||||||
use Carbon\Carbon;
 | 
					use Carbon\Carbon;
 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					 | 
				
			||||||
use Crater\Models\Company;
 | 
					use Crater\Models\Company;
 | 
				
			||||||
use Crater\Models\CompanySetting;
 | 
					 | 
				
			||||||
use Crater\Models\Expense;
 | 
					use Crater\Models\Expense;
 | 
				
			||||||
use Crater\Models\Payment;
 | 
					use Crater\Models\Payment;
 | 
				
			||||||
 | 
					use Crater\Models\Currency;
 | 
				
			||||||
use Illuminate\Http\Request;
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					use Crater\Models\CompanySetting;
 | 
				
			||||||
use Illuminate\Support\Facades\App;
 | 
					use Illuminate\Support\Facades\App;
 | 
				
			||||||
use PDF;
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ProfitLossReportController extends Controller
 | 
					class ProfitLossReportController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
    * Handle the incoming request.
 | 
					     * Handle the incoming request.
 | 
				
			||||||
    *
 | 
					     *
 | 
				
			||||||
    * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
    * @param  string  $hash
 | 
					     * @param  string  $hash
 | 
				
			||||||
    * @return \Illuminate\Http\JsonResponse
 | 
					     * @return \Illuminate\Http\JsonResponse
 | 
				
			||||||
    */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Request $request, $hash)
 | 
					    public function __invoke(Request $request, $hash)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $company = Company::where('unique_hash', $hash)->first();
 | 
					        $company = Company::where('unique_hash', $hash)->first();
 | 
				
			||||||
@ -49,6 +50,8 @@ class ProfitLossReportController extends Controller
 | 
				
			|||||||
        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
					        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
				
			||||||
        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
					        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
				
			||||||
        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
					        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
				
			||||||
 | 
					        $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $colors = [
 | 
					        $colors = [
 | 
				
			||||||
            'primary_text_color',
 | 
					            'primary_text_color',
 | 
				
			||||||
@ -74,6 +77,7 @@ class ProfitLossReportController extends Controller
 | 
				
			|||||||
            'company' => $company,
 | 
					            'company' => $company,
 | 
				
			||||||
            'from_date' => $from_date,
 | 
					            'from_date' => $from_date,
 | 
				
			||||||
            'to_date' => $to_date,
 | 
					            'to_date' => $to_date,
 | 
				
			||||||
 | 
					            'currency' => $currency,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
        $pdf = PDF::loadView('app.pdf.reports.profit-loss');
 | 
					        $pdf = PDF::loadView('app.pdf.reports.profit-loss');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -2,24 +2,25 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
					namespace Crater\Http\Controllers\V1\Admin\Report;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Carbon\Carbon;
 | 
					 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					 | 
				
			||||||
use Crater\Models\Company;
 | 
					 | 
				
			||||||
use Crater\Models\CompanySetting;
 | 
					 | 
				
			||||||
use Crater\Models\Tax;
 | 
					 | 
				
			||||||
use Illuminate\Http\Request;
 | 
					 | 
				
			||||||
use Illuminate\Support\Facades\App;
 | 
					 | 
				
			||||||
use PDF;
 | 
					use PDF;
 | 
				
			||||||
 | 
					use Carbon\Carbon;
 | 
				
			||||||
 | 
					use Crater\Models\Tax;
 | 
				
			||||||
 | 
					use Crater\Models\Company;
 | 
				
			||||||
 | 
					use Crater\Models\Currency;
 | 
				
			||||||
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					use Crater\Models\CompanySetting;
 | 
				
			||||||
 | 
					use Illuminate\Support\Facades\App;
 | 
				
			||||||
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TaxSummaryReportController extends Controller
 | 
					class TaxSummaryReportController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
    * Handle the incoming request.
 | 
					     * Handle the incoming request.
 | 
				
			||||||
    *
 | 
					     *
 | 
				
			||||||
    * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
    * @param  string  $hash
 | 
					     * @param  string  $hash
 | 
				
			||||||
    * @return \Illuminate\Http\JsonResponse
 | 
					     * @return \Illuminate\Http\JsonResponse
 | 
				
			||||||
    */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Request $request, $hash)
 | 
					    public function __invoke(Request $request, $hash)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $company = Company::where('unique_hash', $hash)->first();
 | 
					        $company = Company::where('unique_hash', $hash)->first();
 | 
				
			||||||
@ -44,6 +45,8 @@ class TaxSummaryReportController extends Controller
 | 
				
			|||||||
        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
					        $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
 | 
				
			||||||
        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
					        $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
 | 
				
			||||||
        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
					        $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
 | 
				
			||||||
 | 
					        $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $colors = [
 | 
					        $colors = [
 | 
				
			||||||
            'primary_text_color',
 | 
					            'primary_text_color',
 | 
				
			||||||
@ -68,6 +71,7 @@ class TaxSummaryReportController extends Controller
 | 
				
			|||||||
            'company' => $company,
 | 
					            'company' => $company,
 | 
				
			||||||
            'from_date' => $from_date,
 | 
					            'from_date' => $from_date,
 | 
				
			||||||
            'to_date' => $to_date,
 | 
					            'to_date' => $to_date,
 | 
				
			||||||
 | 
					            'currency' => $currency,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $pdf = PDF::loadView('app.pdf.reports.tax-summary');
 | 
					        $pdf = PDF::loadView('app.pdf.reports.tax-summary');
 | 
				
			||||||
 | 
				
			|||||||
@ -71,6 +71,9 @@ class CompanyController extends Controller
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $data = json_decode($request->company_logo);
 | 
					        $data = json_decode($request->company_logo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (isset($request->is_company_logo_removed) && (bool) $request->is_company_logo_removed) {
 | 
				
			||||||
 | 
					            $company->clearMediaCollection('logo');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if ($data) {
 | 
					        if ($data) {
 | 
				
			||||||
            $company = Company::find($request->header('company'));
 | 
					            $company = Company::find($request->header('company'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -98,6 +101,9 @@ class CompanyController extends Controller
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        $user = auth()->user();
 | 
					        $user = auth()->user();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (isset($request->is_admin_avatar_removed) && (bool) $request->is_admin_avatar_removed) {
 | 
				
			||||||
 | 
					            $user->clearMediaCollection('admin_avatar');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if ($user && $request->hasFile('admin_avatar')) {
 | 
					        if ($user && $request->hasFile('admin_avatar')) {
 | 
				
			||||||
            $user->clearMediaCollection('admin_avatar');
 | 
					            $user->clearMediaCollection('admin_avatar');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Crater\Http\Controllers\V1\Admin\Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
 | 
					use Crater\Models\Company;
 | 
				
			||||||
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class CompanyCurrencyCheckTransactionsController extends Controller
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Handle the incoming request.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
 | 
					     * @return \Illuminate\Http\Response
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function __invoke(Request $request)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        $company = Company::find($request->header('company'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $this->authorize('manage company', $company);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return response()->json([
 | 
				
			||||||
 | 
					            'has_transactions' => $company->hasTransactions(),
 | 
				
			||||||
 | 
					        ]);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -6,6 +6,7 @@ use Crater\Http\Controllers\Controller;
 | 
				
			|||||||
use Crater\Http\Requests\UpdateSettingsRequest;
 | 
					use Crater\Http\Requests\UpdateSettingsRequest;
 | 
				
			||||||
use Crater\Models\Company;
 | 
					use Crater\Models\Company;
 | 
				
			||||||
use Crater\Models\CompanySetting;
 | 
					use Crater\Models\CompanySetting;
 | 
				
			||||||
 | 
					use Illuminate\Support\Arr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UpdateCompanySettingsController extends Controller
 | 
					class UpdateCompanySettingsController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -17,9 +18,23 @@ class UpdateCompanySettingsController extends Controller
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public function __invoke(UpdateSettingsRequest $request)
 | 
					    public function __invoke(UpdateSettingsRequest $request)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->authorize('manage company', Company::find($request->header('company')));
 | 
					        $company = Company::find($request->header('company'));
 | 
				
			||||||
 | 
					        $this->authorize('manage company', $company);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        CompanySetting::setSettings($request->settings, $request->header('company'));
 | 
					        $data = $request->settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (
 | 
				
			||||||
 | 
					            Arr::exists($data, 'currency') &&
 | 
				
			||||||
 | 
					            (CompanySetting::getSetting('currency', $company->id) !== $data['currency']) &&
 | 
				
			||||||
 | 
					            $company->hasTransactions()
 | 
				
			||||||
 | 
					        ) {
 | 
				
			||||||
 | 
					            return response()->json([
 | 
				
			||||||
 | 
					                'success' => false,
 | 
				
			||||||
 | 
					                'message' => 'Cannot update company currency after transactions are created.'
 | 
				
			||||||
 | 
					            ]);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        CompanySetting::setSettings($data, $request->header('company'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return response()->json([
 | 
					        return response()->json([
 | 
				
			||||||
            'success' => true,
 | 
					            'success' => true,
 | 
				
			||||||
 | 
				
			|||||||
@ -17,6 +17,9 @@ class ProfileController extends Controller
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $customer->update($request->validated());
 | 
					        $customer->update($request->validated());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (isset($request->is_customer_avatar_removed) && (bool) $request->is_customer_avatar_removed) {
 | 
				
			||||||
 | 
					            $customer->clearMediaCollection('customer_avatar');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if ($customer && $request->hasFile('customer_avatar')) {
 | 
					        if ($customer && $request->hasFile('customer_avatar')) {
 | 
				
			||||||
            $customer->clearMediaCollection('customer_avatar');
 | 
					            $customer->clearMediaCollection('customer_avatar');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -44,8 +44,8 @@ class InvoicePdfController extends Controller
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return view('app')->with([
 | 
					            return view('app')->with([
 | 
				
			||||||
                'customer_logo' => get_customer_logo($invoice->company_id),
 | 
					                'customer_logo' => get_company_setting('customer_portal_logo', $invoice->company_id),
 | 
				
			||||||
                'current_theme' => get_customer_portal_theme($invoice->company_id)
 | 
					                'current_theme' => get_company_setting('customer_portal_theme', $invoice->company_id)
 | 
				
			||||||
            ]);
 | 
					            ]);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,7 @@ namespace Crater\Http\Controllers\V1\PDF;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
use Crater\Models\Estimate;
 | 
					use Crater\Models\Estimate;
 | 
				
			||||||
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class EstimatePdfController extends Controller
 | 
					class EstimatePdfController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -13,8 +14,13 @@ class EstimatePdfController extends Controller
 | 
				
			|||||||
     * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
     * @return \Illuminate\Http\Response
 | 
					     * @return \Illuminate\Http\Response
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Estimate $estimate)
 | 
					    public function __invoke(Request $request, Estimate $estimate)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        if ($request->has('preview')) {
 | 
				
			||||||
 | 
					            return $estimate->getPDFData();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $estimate->getGeneratedPDFOrStream('estimate');
 | 
					        return $estimate->getGeneratedPDFOrStream('estimate');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,7 @@ namespace Crater\Http\Controllers\V1\PDF;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
use Crater\Models\Invoice;
 | 
					use Crater\Models\Invoice;
 | 
				
			||||||
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class InvoicePdfController extends Controller
 | 
					class InvoicePdfController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -13,8 +14,12 @@ class InvoicePdfController extends Controller
 | 
				
			|||||||
     * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
     * @return \Illuminate\Http\Response
 | 
					     * @return \Illuminate\Http\Response
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Invoice $invoice)
 | 
					    public function __invoke(Request $request, Invoice $invoice)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        if ($request->has('preview')) {
 | 
				
			||||||
 | 
					            return $invoice->getPDFData();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $invoice->getGeneratedPDFOrStream('invoice');
 | 
					        return $invoice->getGeneratedPDFOrStream('invoice');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,7 @@ namespace Crater\Http\Controllers\V1\PDF;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use Crater\Http\Controllers\Controller;
 | 
					use Crater\Http\Controllers\Controller;
 | 
				
			||||||
use Crater\Models\Payment;
 | 
					use Crater\Models\Payment;
 | 
				
			||||||
 | 
					use Illuminate\Http\Request;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PaymentPdfController extends Controller
 | 
					class PaymentPdfController extends Controller
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -13,8 +14,12 @@ class PaymentPdfController extends Controller
 | 
				
			|||||||
     * @param  \Illuminate\Http\Request  $request
 | 
					     * @param  \Illuminate\Http\Request  $request
 | 
				
			||||||
     * @return \Illuminate\Http\Response
 | 
					     * @return \Illuminate\Http\Response
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function __invoke(Payment $payment)
 | 
					    public function __invoke(Request $request, Payment $payment)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        if ($request->has('preview')) {
 | 
				
			||||||
 | 
					            return view('app.pdf.payment.payment');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $payment->getGeneratedPDFOrStream('payment');
 | 
					        return $payment->getGeneratedPDFOrStream('payment');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,6 @@
 | 
				
			|||||||
namespace Crater\Http\Middleware;
 | 
					namespace Crater\Http\Middleware;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Closure;
 | 
					use Closure;
 | 
				
			||||||
use Crater\Models\CompanySetting;
 | 
					 | 
				
			||||||
use Crater\Models\FileDisk;
 | 
					use Crater\Models\FileDisk;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ConfigMiddleware
 | 
					class ConfigMiddleware
 | 
				
			||||||
@ -18,15 +17,6 @@ class ConfigMiddleware
 | 
				
			|||||||
    public function handle($request, Closure $next)
 | 
					    public function handle($request, Closure $next)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (\Storage::disk('local')->has('database_created')) {
 | 
					        if (\Storage::disk('local')->has('database_created')) {
 | 
				
			||||||
            $setting = CompanySetting::getSetting('time_zone', $request->header('company'));
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            $timezone = config('app.timezone');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if ($setting && $setting != null && $setting != $timezone) {
 | 
					 | 
				
			||||||
                config(['app.timezone' => $setting]);
 | 
					 | 
				
			||||||
                date_default_timezone_set($setting);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if ($request->has('file_disk_id')) {
 | 
					            if ($request->has('file_disk_id')) {
 | 
				
			||||||
                $file_disk = FileDisk::find($request->file_disk_id);
 | 
					                $file_disk = FileDisk::find($request->file_disk_id);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,7 @@ class PdfMiddleware
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public function handle(Request $request, Closure $next)
 | 
					    public function handle(Request $request, Closure $next)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (Auth::guard('web')->check() || Auth::guard('api')->check() || Auth::guard('customer')->check()) {
 | 
					        if (Auth::guard('web')->check() || Auth::guard('sanctum')->check() || Auth::guard('customer')->check()) {
 | 
				
			||||||
            return $next($request);
 | 
					            return $next($request);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -92,6 +92,12 @@ class CustomerProfileRequest extends FormRequest
 | 
				
			|||||||
            ],
 | 
					            ],
 | 
				
			||||||
            'shipping.fax' => [
 | 
					            'shipping.fax' => [
 | 
				
			||||||
                'nullable',
 | 
					                'nullable',
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					            'customer_avatar' => [
 | 
				
			||||||
 | 
					                'nullable',
 | 
				
			||||||
 | 
					                'file',
 | 
				
			||||||
 | 
					                'mimes:gif,jpg,png',
 | 
				
			||||||
 | 
					                'max:20000'
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										37
									
								
								app/Http/Requests/UnzipUpdateRequest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								app/Http/Requests/UnzipUpdateRequest.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,37 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Crater\Http\Requests;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Illuminate\Foundation\Http\FormRequest;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class UnzipUpdateRequest extends FormRequest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Determine if the user is authorized to make this request.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return bool
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function authorize()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get the validation rules that apply to the request.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return array
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function rules()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return [
 | 
				
			||||||
 | 
					            'path' => [
 | 
				
			||||||
 | 
					                'required',
 | 
				
			||||||
 | 
					                'regex:/^[\.\/\w\-]+$/'
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					            'module' => [
 | 
				
			||||||
 | 
					                'required',
 | 
				
			||||||
 | 
					                'string'
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										34
									
								
								app/Http/Requests/UploadExpenseReceiptRequest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								app/Http/Requests/UploadExpenseReceiptRequest.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Crater\Http\Requests;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Rules\Base64Mime;
 | 
				
			||||||
 | 
					use Illuminate\Foundation\Http\FormRequest;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class UploadExpenseReceiptRequest extends FormRequest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Determine if the user is authorized to make this request.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return bool
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function authorize()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get the validation rules that apply to the request.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return array
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function rules()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return [
 | 
				
			||||||
 | 
					            'attachment_receipt' => [
 | 
				
			||||||
 | 
					                'nullable',
 | 
				
			||||||
 | 
					                new Base64Mime(['gif', 'jpg', 'png'])
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										40
									
								
								app/Http/Requests/UploadModuleRequest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								app/Http/Requests/UploadModuleRequest.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Crater\Http\Requests;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Illuminate\Foundation\Http\FormRequest;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class UploadModuleRequest extends FormRequest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Determine if the user is authorized to make this request.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return bool
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function authorize()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get the validation rules that apply to the request.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return array
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function rules()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return [
 | 
				
			||||||
 | 
					            'avatar' => [
 | 
				
			||||||
 | 
					                'required',
 | 
				
			||||||
 | 
					                'file',
 | 
				
			||||||
 | 
					                'mimes:zip',
 | 
				
			||||||
 | 
					                'max:20000'
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					            'module' => [
 | 
				
			||||||
 | 
					                'required',
 | 
				
			||||||
 | 
					                'string',
 | 
				
			||||||
 | 
					                'max:100'
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -24,7 +24,7 @@ class InvoiceResource extends JsonResource
 | 
				
			|||||||
            'paid_status' => $this->paid_status,
 | 
					            'paid_status' => $this->paid_status,
 | 
				
			||||||
            'tax_per_item' => $this->tax_per_item,
 | 
					            'tax_per_item' => $this->tax_per_item,
 | 
				
			||||||
            'discount_per_item' => $this->discount_per_item,
 | 
					            'discount_per_item' => $this->discount_per_item,
 | 
				
			||||||
            'notes' => $this->notes,
 | 
					            'notes' => $this->getNotes(),
 | 
				
			||||||
            'discount_type' => $this->discount_type,
 | 
					            'discount_type' => $this->discount_type,
 | 
				
			||||||
            'discount' => $this->discount,
 | 
					            'discount' => $this->discount,
 | 
				
			||||||
            'discount_val' => $this->discount_val,
 | 
					            'discount_val' => $this->discount_val,
 | 
				
			||||||
@ -46,10 +46,12 @@ class InvoiceResource extends JsonResource
 | 
				
			|||||||
            'base_due_amount' => $this->base_due_amount,
 | 
					            'base_due_amount' => $this->base_due_amount,
 | 
				
			||||||
            'currency_id' => $this->currency_id,
 | 
					            'currency_id' => $this->currency_id,
 | 
				
			||||||
            'formatted_created_at' => $this->formattedCreatedAt,
 | 
					            'formatted_created_at' => $this->formattedCreatedAt,
 | 
				
			||||||
 | 
					            'formatted_notes' => $this->formattedNotes,
 | 
				
			||||||
            'invoice_pdf_url' => $this->invoicePdfUrl,
 | 
					            'invoice_pdf_url' => $this->invoicePdfUrl,
 | 
				
			||||||
            'formatted_invoice_date' => $this->formattedInvoiceDate,
 | 
					            'formatted_invoice_date' => $this->formattedInvoiceDate,
 | 
				
			||||||
            'formatted_due_date' => $this->formattedDueDate,
 | 
					            'formatted_due_date' => $this->formattedDueDate,
 | 
				
			||||||
            'payment_module_enabled' => $this->payment_module_enabled,
 | 
					            'payment_module_enabled' => $this->payment_module_enabled,
 | 
				
			||||||
 | 
					            'overdue' => $this->overdue,
 | 
				
			||||||
            'items' => $this->when($this->items()->exists(), function () {
 | 
					            'items' => $this->when($this->items()->exists(), function () {
 | 
				
			||||||
                return InvoiceItemResource::collection($this->items);
 | 
					                return InvoiceItemResource::collection($this->items);
 | 
				
			||||||
            }),
 | 
					            }),
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,7 @@ class EstimateResource extends JsonResource
 | 
				
			|||||||
            'reference_number' => $this->reference_number,
 | 
					            'reference_number' => $this->reference_number,
 | 
				
			||||||
            'tax_per_item' => $this->tax_per_item,
 | 
					            'tax_per_item' => $this->tax_per_item,
 | 
				
			||||||
            'discount_per_item' => $this->discount_per_item,
 | 
					            'discount_per_item' => $this->discount_per_item,
 | 
				
			||||||
            'notes' => $this->notes,
 | 
					            'notes' => $this->getNotes(),
 | 
				
			||||||
            'discount' => $this->discount,
 | 
					            'discount' => $this->discount,
 | 
				
			||||||
            'discount_type' => $this->discount_type,
 | 
					            'discount_type' => $this->discount_type,
 | 
				
			||||||
            'discount_val' => $this->discount_val,
 | 
					            'discount_val' => $this->discount_val,
 | 
				
			||||||
 | 
				
			|||||||
@ -55,6 +55,7 @@ class InvoiceResource extends JsonResource
 | 
				
			|||||||
            'payment_module_enabled' => $this->payment_module_enabled,
 | 
					            'payment_module_enabled' => $this->payment_module_enabled,
 | 
				
			||||||
            'sales_tax_type' => $this->sales_tax_type,
 | 
					            'sales_tax_type' => $this->sales_tax_type,
 | 
				
			||||||
            'sales_tax_address_type' => $this->sales_tax_address_type,
 | 
					            'sales_tax_address_type' => $this->sales_tax_address_type,
 | 
				
			||||||
 | 
					            'overdue' => $this->overdue,
 | 
				
			||||||
            'items' => $this->when($this->items()->exists(), function () {
 | 
					            'items' => $this->when($this->items()->exists(), function () {
 | 
				
			||||||
                return InvoiceItemResource::collection($this->items);
 | 
					                return InvoiceItemResource::collection($this->items);
 | 
				
			||||||
            }),
 | 
					            }),
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@ class PaymentResource extends JsonResource
 | 
				
			|||||||
            'id' => $this->id,
 | 
					            'id' => $this->id,
 | 
				
			||||||
            'payment_number' => $this->payment_number,
 | 
					            'payment_number' => $this->payment_number,
 | 
				
			||||||
            'payment_date' => $this->payment_date,
 | 
					            'payment_date' => $this->payment_date,
 | 
				
			||||||
            'notes' => $this->notes,
 | 
					            'notes' => $this->getNotes(),
 | 
				
			||||||
            'amount' => $this->amount,
 | 
					            'amount' => $this->amount,
 | 
				
			||||||
            'unique_hash' => $this->unique_hash,
 | 
					            'unique_hash' => $this->unique_hash,
 | 
				
			||||||
            'invoice_id' => $this->invoice_id,
 | 
					            'invoice_id' => $this->invoice_id,
 | 
				
			||||||
 | 
				
			|||||||
@ -217,7 +217,7 @@ class Company extends Model implements HasMedia
 | 
				
			|||||||
            'estimate_billing_address_format' => $billingAddressFormat,
 | 
					            'estimate_billing_address_format' => $billingAddressFormat,
 | 
				
			||||||
            'payment_company_address_format' => $companyAddressFormat,
 | 
					            'payment_company_address_format' => $companyAddressFormat,
 | 
				
			||||||
            'payment_from_customer_address_format' => $paymentFromCustomerAddress,
 | 
					            'payment_from_customer_address_format' => $paymentFromCustomerAddress,
 | 
				
			||||||
            'currency' => request()->currency ?? 12,
 | 
					            'currency' => request()->currency ?? 13,
 | 
				
			||||||
            'time_zone' => 'Asia/Kolkata',
 | 
					            'time_zone' => 'Asia/Kolkata',
 | 
				
			||||||
            'language' => 'en',
 | 
					            'language' => 'en',
 | 
				
			||||||
            'fiscal_year' => '1-12',
 | 
					            'fiscal_year' => '1-12',
 | 
				
			||||||
@ -300,6 +300,10 @@ class Company extends Model implements HasMedia
 | 
				
			|||||||
        if ($this->invoices()->exists()) {
 | 
					        if ($this->invoices()->exists()) {
 | 
				
			||||||
            $this->invoices->map(function ($invoice) {
 | 
					            $this->invoices->map(function ($invoice) {
 | 
				
			||||||
                $this->checkModelData($invoice);
 | 
					                $this->checkModelData($invoice);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if ($invoice->transactions()->exists()) {
 | 
				
			||||||
 | 
					                    $invoice->transactions()->delete();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $this->invoices()->delete();
 | 
					            $this->invoices()->delete();
 | 
				
			||||||
@ -376,4 +380,21 @@ class Company extends Model implements HasMedia
 | 
				
			|||||||
            $model->taxes()->delete();
 | 
					            $model->taxes()->delete();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function hasTransactions()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if (
 | 
				
			||||||
 | 
					            $this->customers()->exists() ||
 | 
				
			||||||
 | 
					            $this->items()->exists() ||
 | 
				
			||||||
 | 
					            $this->invoices()->exists() ||
 | 
				
			||||||
 | 
					            $this->estimates()->exists() ||
 | 
				
			||||||
 | 
					            $this->expenses()->exists() ||
 | 
				
			||||||
 | 
					            $this->payments()->exists() ||
 | 
				
			||||||
 | 
					            $this->recurringInvoices()->exists()
 | 
				
			||||||
 | 
					        ) {
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -139,7 +139,12 @@ class Customer extends Authenticatable implements HasMedia
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if ($customer->invoices()->exists()) {
 | 
					            if ($customer->invoices()->exists()) {
 | 
				
			||||||
                $customer->invoices()->delete();
 | 
					                $customer->invoices->map(function ($invoice) {
 | 
				
			||||||
 | 
					                    if ($invoice->transactions()->exists()) {
 | 
				
			||||||
 | 
					                        $invoice->transactions()->delete();
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    $invoice->delete();
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if ($customer->payments()->exists()) {
 | 
					            if ($customer->payments()->exists()) {
 | 
				
			||||||
 | 
				
			|||||||
@ -412,6 +412,10 @@ class Estimate extends Model implements HasMedia
 | 
				
			|||||||
            'taxes' => $taxes,
 | 
					            'taxes' => $taxes,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (request()->has('preview')) {
 | 
				
			||||||
 | 
					            return view('app.pdf.estimate.'.$estimateTemplate);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return PDF::loadView('app.pdf.estimate.'.$estimateTemplate);
 | 
					        return PDF::loadView('app.pdf.estimate.'.$estimateTemplate);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -480,7 +484,6 @@ class Estimate extends Model implements HasMedia
 | 
				
			|||||||
            '{ESTIMATE_EXPIRY_DATE}' => $this->formattedExpiryDate,
 | 
					            '{ESTIMATE_EXPIRY_DATE}' => $this->formattedExpiryDate,
 | 
				
			||||||
            '{ESTIMATE_NUMBER}' => $this->estimate_number,
 | 
					            '{ESTIMATE_NUMBER}' => $this->estimate_number,
 | 
				
			||||||
            '{ESTIMATE_REF_NUMBER}' => $this->reference_number,
 | 
					            '{ESTIMATE_REF_NUMBER}' => $this->reference_number,
 | 
				
			||||||
            '{ESTIMATE_LINK}' => url('/customer/estimates/pdf/'.$this->unique_hash),
 | 
					 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -262,6 +262,9 @@ class Expense extends Model implements HasMedia
 | 
				
			|||||||
            ExchangeRateLog::addExchangeRateLog($this);
 | 
					            ExchangeRateLog::addExchangeRateLog($this);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (isset($request->is_attachment_receipt_removed) && (bool) $request->is_attachment_receipt_removed) {
 | 
				
			||||||
 | 
					            $this->clearMediaCollection('receipts');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if ($request->hasFile('attachment_receipt')) {
 | 
					        if ($request->hasFile('attachment_receipt')) {
 | 
				
			||||||
            $this->clearMediaCollection('receipts');
 | 
					            $this->clearMediaCollection('receipts');
 | 
				
			||||||
            $this->addMediaFromRequest('attachment_receipt')->toMediaCollection('receipts');
 | 
					            $this->addMediaFromRequest('attachment_receipt')->toMediaCollection('receipts');
 | 
				
			||||||
 | 
				
			|||||||
@ -28,10 +28,8 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
    public const STATUS_DRAFT = 'DRAFT';
 | 
					    public const STATUS_DRAFT = 'DRAFT';
 | 
				
			||||||
    public const STATUS_SENT = 'SENT';
 | 
					    public const STATUS_SENT = 'SENT';
 | 
				
			||||||
    public const STATUS_VIEWED = 'VIEWED';
 | 
					    public const STATUS_VIEWED = 'VIEWED';
 | 
				
			||||||
    public const STATUS_OVERDUE = 'OVERDUE';
 | 
					 | 
				
			||||||
    public const STATUS_COMPLETED = 'COMPLETED';
 | 
					    public const STATUS_COMPLETED = 'COMPLETED';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public const STATUS_DUE = 'DUE';
 | 
					 | 
				
			||||||
    public const STATUS_UNPAID = 'UNPAID';
 | 
					    public const STATUS_UNPAID = 'UNPAID';
 | 
				
			||||||
    public const STATUS_PARTIALLY_PAID = 'PARTIALLY_PAID';
 | 
					    public const STATUS_PARTIALLY_PAID = 'PARTIALLY_PAID';
 | 
				
			||||||
    public const STATUS_PAID = 'PAID';
 | 
					    public const STATUS_PAID = 'PAID';
 | 
				
			||||||
@ -138,7 +136,6 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
            self::STATUS_DRAFT,
 | 
					            self::STATUS_DRAFT,
 | 
				
			||||||
            self::STATUS_SENT,
 | 
					            self::STATUS_SENT,
 | 
				
			||||||
            self::STATUS_VIEWED,
 | 
					            self::STATUS_VIEWED,
 | 
				
			||||||
            self::STATUS_OVERDUE,
 | 
					 | 
				
			||||||
            self::STATUS_COMPLETED,
 | 
					            self::STATUS_COMPLETED,
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -155,9 +152,7 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public function getPreviousStatus()
 | 
					    public function getPreviousStatus()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if ($this->due_date < Carbon::now()) {
 | 
					        if ($this->viewed) {
 | 
				
			||||||
            return self::STATUS_OVERDUE;
 | 
					 | 
				
			||||||
        } elseif ($this->viewed) {
 | 
					 | 
				
			||||||
            return self::STATUS_VIEWED;
 | 
					            return self::STATUS_VIEWED;
 | 
				
			||||||
        } elseif ($this->sent) {
 | 
					        } elseif ($this->sent) {
 | 
				
			||||||
            return self::STATUS_SENT;
 | 
					            return self::STATUS_SENT;
 | 
				
			||||||
@ -166,6 +161,11 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function getFormattedNotesAttribute($value)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return $this->getNotes();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function getFormattedCreatedAtAttribute($value)
 | 
					    public function getFormattedCreatedAtAttribute($value)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
 | 
					        $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
 | 
				
			||||||
@ -249,7 +249,7 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
                $filters->get('status') == self::STATUS_PAID
 | 
					                $filters->get('status') == self::STATUS_PAID
 | 
				
			||||||
            ) {
 | 
					            ) {
 | 
				
			||||||
                $query->wherePaidStatus($filters->get('status'));
 | 
					                $query->wherePaidStatus($filters->get('status'));
 | 
				
			||||||
            } elseif ($filters->get('status') == self::STATUS_DUE) {
 | 
					            } elseif ($filters->get('status') == 'DUE') {
 | 
				
			||||||
                $query->whereDueStatus($filters->get('status'));
 | 
					                $query->whereDueStatus($filters->get('status'));
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                $query->whereStatus($filters->get('status'));
 | 
					                $query->whereStatus($filters->get('status'));
 | 
				
			||||||
@ -443,7 +443,8 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
        $data['invoice'] = $this->toArray();
 | 
					        $data['invoice'] = $this->toArray();
 | 
				
			||||||
        $data['customer'] = $this->customer->toArray();
 | 
					        $data['customer'] = $this->customer->toArray();
 | 
				
			||||||
        $data['company'] = Company::find($this->company_id);
 | 
					        $data['company'] = Company::find($this->company_id);
 | 
				
			||||||
        $data['body'] = $this->getEmailBody($data['body']);
 | 
					        $data['subject'] = $this->getEmailString($data['subject']);
 | 
				
			||||||
 | 
					        $data['body'] = $this->getEmailString($data['body']);
 | 
				
			||||||
        $data['attach']['data'] = ($this->getEmailAttachmentSetting()) ? $this->getPDFData() : null;
 | 
					        $data['attach']['data'] = ($this->getEmailAttachmentSetting()) ? $this->getPDFData() : null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $data;
 | 
					        return $data;
 | 
				
			||||||
@ -498,6 +499,10 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
            if (array_key_exists('taxes', $invoiceItem) && $invoiceItem['taxes']) {
 | 
					            if (array_key_exists('taxes', $invoiceItem) && $invoiceItem['taxes']) {
 | 
				
			||||||
                foreach ($invoiceItem['taxes'] as $tax) {
 | 
					                foreach ($invoiceItem['taxes'] as $tax) {
 | 
				
			||||||
                    $tax['company_id'] = $invoice->company_id;
 | 
					                    $tax['company_id'] = $invoice->company_id;
 | 
				
			||||||
 | 
					                    $tax['exchange_rate'] = $invoice->exchange_rate;
 | 
				
			||||||
 | 
					                    $tax['base_amount'] = $tax['amount'] * $exchange_rate;
 | 
				
			||||||
 | 
					                    $tax['currency_id'] = $invoice->currency_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (gettype($tax['amount']) !== "NULL") {
 | 
					                    if (gettype($tax['amount']) !== "NULL") {
 | 
				
			||||||
                        if (array_key_exists('recurring_invoice_id', $invoiceItem)) {
 | 
					                        if (array_key_exists('recurring_invoice_id', $invoiceItem)) {
 | 
				
			||||||
                            unset($invoiceItem['recurring_invoice_id']);
 | 
					                            unset($invoiceItem['recurring_invoice_id']);
 | 
				
			||||||
@ -520,7 +525,7 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        foreach ($taxes as $tax) {
 | 
					        foreach ($taxes as $tax) {
 | 
				
			||||||
            $tax['company_id'] = $invoice->company_id;
 | 
					            $tax['company_id'] = $invoice->company_id;
 | 
				
			||||||
            $tax['exchnage_rate'] = $invoice->exchange_rate;
 | 
					            $tax['exchange_rate'] = $invoice->exchange_rate;
 | 
				
			||||||
            $tax['base_amount'] = $tax['amount'] * $exchange_rate;
 | 
					            $tax['base_amount'] = $tax['amount'] * $exchange_rate;
 | 
				
			||||||
            $tax['currency_id'] = $invoice->currency_id;
 | 
					            $tax['currency_id'] = $invoice->currency_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -575,6 +580,10 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
            'taxes' => $taxes,
 | 
					            'taxes' => $taxes,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (request()->has('preview')) {
 | 
				
			||||||
 | 
					            return view('app.pdf.invoice.'.$invoiceTemplate);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return PDF::loadView('app.pdf.invoice.'.$invoiceTemplate);
 | 
					        return PDF::loadView('app.pdf.invoice.'.$invoiceTemplate);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -627,7 +636,7 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
        return $this->getFormattedString($this->notes);
 | 
					        return $this->getFormattedString($this->notes);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function getEmailBody($body)
 | 
					    public function getEmailString($body)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $values = array_merge($this->getFieldsArray(), $this->getExtraFields());
 | 
					        $values = array_merge($this->getFieldsArray(), $this->getExtraFields());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -643,7 +652,6 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
            '{INVOICE_DUE_DATE}' => $this->formattedDueDate,
 | 
					            '{INVOICE_DUE_DATE}' => $this->formattedDueDate,
 | 
				
			||||||
            '{INVOICE_NUMBER}' => $this->invoice_number,
 | 
					            '{INVOICE_NUMBER}' => $this->invoice_number,
 | 
				
			||||||
            '{INVOICE_REF_NUMBER}' => $this->reference_number,
 | 
					            '{INVOICE_REF_NUMBER}' => $this->reference_number,
 | 
				
			||||||
            '{INVOICE_LINK}' => url('/customer/invoices/pdf/'.$this->unique_hash),
 | 
					 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -688,6 +696,7 @@ class Invoice extends Model implements HasMedia
 | 
				
			|||||||
        if ($amount == 0) {
 | 
					        if ($amount == 0) {
 | 
				
			||||||
            $this->status = Invoice::STATUS_COMPLETED;
 | 
					            $this->status = Invoice::STATUS_COMPLETED;
 | 
				
			||||||
            $this->paid_status = Invoice::STATUS_PAID;
 | 
					            $this->paid_status = Invoice::STATUS_PAID;
 | 
				
			||||||
 | 
					            $this->overdue = false;
 | 
				
			||||||
        } elseif ($amount == $this->total) {
 | 
					        } elseif ($amount == $this->total) {
 | 
				
			||||||
            $this->status = $this->getPreviousStatus();
 | 
					            $this->status = $this->getPreviousStatus();
 | 
				
			||||||
            $this->paid_status = Invoice::STATUS_UNPAID;
 | 
					            $this->paid_status = Invoice::STATUS_UNPAID;
 | 
				
			||||||
 | 
				
			|||||||
@ -375,6 +375,10 @@ class Payment extends Model implements HasMedia
 | 
				
			|||||||
            'logo' => $logo ?? null,
 | 
					            'logo' => $logo ?? null,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (request()->has('preview')) {
 | 
				
			||||||
 | 
					            return view('app.pdf.payment.payment');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return PDF::loadView('app.pdf.payment.payment');
 | 
					        return PDF::loadView('app.pdf.payment.payment');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -432,7 +436,6 @@ class Payment extends Model implements HasMedia
 | 
				
			|||||||
            '{PAYMENT_MODE}' => $this->paymentMethod ? $this->paymentMethod->name : null,
 | 
					            '{PAYMENT_MODE}' => $this->paymentMethod ? $this->paymentMethod->name : null,
 | 
				
			||||||
            '{PAYMENT_NUMBER}' => $this->payment_number,
 | 
					            '{PAYMENT_NUMBER}' => $this->payment_number,
 | 
				
			||||||
            '{PAYMENT_AMOUNT}' => $this->reference_number,
 | 
					            '{PAYMENT_AMOUNT}' => $this->reference_number,
 | 
				
			||||||
            '{PAYMENT_LINK}' => url('/customer/payments/pdf/'.$this->unique_hash)
 | 
					 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -305,9 +305,15 @@ class RecurringInvoice extends Model
 | 
				
			|||||||
            ->setCustomer($this->customer_id)
 | 
					            ->setCustomer($this->customer_id)
 | 
				
			||||||
            ->setNextNumbers();
 | 
					            ->setNextNumbers();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $days = CompanySetting::getSetting('invoice_due_date_days', $this->company_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (! $days || $days == "null") {
 | 
				
			||||||
 | 
					            $days = 7;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $newInvoice['creator_id'] = $this->creator_id;
 | 
					        $newInvoice['creator_id'] = $this->creator_id;
 | 
				
			||||||
        $newInvoice['invoice_date'] = Carbon::today()->format('Y-m-d');
 | 
					        $newInvoice['invoice_date'] = Carbon::today()->format('Y-m-d');
 | 
				
			||||||
        $newInvoice['due_date'] = Carbon::today()->addDays(7)->format('Y-m-d');
 | 
					        $newInvoice['due_date'] = Carbon::today()->addDays($days)->format('Y-m-d');
 | 
				
			||||||
        $newInvoice['status'] = Invoice::STATUS_DRAFT;
 | 
					        $newInvoice['status'] = Invoice::STATUS_DRAFT;
 | 
				
			||||||
        $newInvoice['company_id'] = $this->company_id;
 | 
					        $newInvoice['company_id'] = $this->company_id;
 | 
				
			||||||
        $newInvoice['paid_status'] = Invoice::STATUS_UNPAID;
 | 
					        $newInvoice['paid_status'] = Invoice::STATUS_UNPAID;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										36
									
								
								app/Providers/ViewServiceProvider.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								app/Providers/ViewServiceProvider.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Crater\Providers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Illuminate\Support\Facades\View;
 | 
				
			||||||
 | 
					use Illuminate\Support\ServiceProvider;
 | 
				
			||||||
 | 
					use Schema;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class ViewServiceProvider extends ServiceProvider
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Register services.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function register()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Bootstrap services.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function boot()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if (\Storage::disk('local')->has('database_created') && Schema::hasTable('settings')) {
 | 
				
			||||||
 | 
					            View::share('login_page_logo', get_app_setting('login_page_logo'));
 | 
				
			||||||
 | 
					            View::share('login_page_heading', get_app_setting('login_page_heading'));
 | 
				
			||||||
 | 
					            View::share('login_page_description', get_app_setting('login_page_description'));
 | 
				
			||||||
 | 
					            View::share('admin_page_title', get_app_setting('admin_page_title'));
 | 
				
			||||||
 | 
					            View::share('copyright_text', get_app_setting('copyright_text'));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -7,51 +7,55 @@ use Crater\Models\Setting;
 | 
				
			|||||||
use Illuminate\Support\Str;
 | 
					use Illuminate\Support\Str;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Get current customer theme
 | 
					 * Get company setting
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @param $company_id
 | 
					 * @param $company_id
 | 
				
			||||||
 * @return string
 | 
					 * @return string
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
function get_customer_portal_theme($company_id)
 | 
					function get_company_setting($key, $company_id)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (\Storage::disk('local')->has('database_created')) {
 | 
					    if (\Storage::disk('local')->has('database_created')) {
 | 
				
			||||||
        return CompanySetting::getSetting('customer_portal_theme', $company_id);
 | 
					        return CompanySetting::getSetting($key, $company_id);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Get current customer logo
 | 
					 * Get app setting
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @param $company_id
 | 
					 * @param $company_id
 | 
				
			||||||
 * @return string
 | 
					 * @return string
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
function get_customer_logo($company_id)
 | 
					function get_app_setting($key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (\Storage::disk('local')->has('database_created')) {
 | 
					    if (\Storage::disk('local')->has('database_created')) {
 | 
				
			||||||
        return CompanySetting::getSetting('customer_portal_logo', $company_id);
 | 
					        return Setting::getSetting($key);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Get current admin theme
 | 
					 * Get page title
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 | 
					 * @param $company_id
 | 
				
			||||||
 * @return string
 | 
					 * @return string
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
function get_admin_portal_theme()
 | 
					function get_page_title($company_id)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (\Storage::disk('local')->has('database_created')) {
 | 
					    $routeName = Route::currentRouteName();
 | 
				
			||||||
        $setting = Setting::getSetting('admin_portal_theme');
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ($setting) {
 | 
					    $pageTitle = null;
 | 
				
			||||||
            return $setting;
 | 
					    $defaultPageTitle = 'Crater - Self Hosted Invoicing Platform';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (\Storage::disk('local')->has('database_created')) {
 | 
				
			||||||
 | 
					        if ($routeName === 'customer.dashboard') {
 | 
				
			||||||
 | 
					            $pageTitle = CompanySetting::getSetting('customer_portal_page_title', $company_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return $pageTitle ? $pageTitle : $defaultPageTitle;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return  'crater';
 | 
					        $pageTitle = Setting::getSetting('admin_page_title');
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 'crater';
 | 
					        return $pageTitle ? $pageTitle : $defaultPageTitle;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 | 
				
			|||||||
@ -16,7 +16,7 @@ trait GeneratesPdfTrait
 | 
				
			|||||||
        if ($pdf && file_exists($pdf['path'])) {
 | 
					        if ($pdf && file_exists($pdf['path'])) {
 | 
				
			||||||
            return response()->make(file_get_contents($pdf['path']), 200, [
 | 
					            return response()->make(file_get_contents($pdf['path']), 200, [
 | 
				
			||||||
                'Content-Type' => 'application/pdf',
 | 
					                'Content-Type' => 'application/pdf',
 | 
				
			||||||
                'Content-Disposition' => 'inline; filename="'.$pdf['file_name'].'.pdf"',
 | 
					                'Content-Disposition' => 'inline; filename="'.$pdf['file_name'].'"',
 | 
				
			||||||
            ]);
 | 
					            ]);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -38,15 +38,15 @@
 | 
				
			|||||||
    "barryvdh/laravel-ide-helper": "^2.6",
 | 
					    "barryvdh/laravel-ide-helper": "^2.6",
 | 
				
			||||||
    "beyondcode/laravel-dump-server": "^1.0",
 | 
					    "beyondcode/laravel-dump-server": "^1.0",
 | 
				
			||||||
    "facade/ignition": "^2.3.6",
 | 
					    "facade/ignition": "^2.3.6",
 | 
				
			||||||
    "friendsofphp/php-cs-fixer": "^3.0",
 | 
					    "friendsofphp/php-cs-fixer": "^3.8",
 | 
				
			||||||
    "fzaninotto/faker": "^1.9.1",
 | 
					    "fakerphp/faker": "^1.9.1",
 | 
				
			||||||
    "mockery/mockery": "^1.3.1",
 | 
					    "mockery/mockery": "^1.3.1",
 | 
				
			||||||
    "nunomaduro/collision": "^5.0",
 | 
					    "nunomaduro/collision": "^5.0",
 | 
				
			||||||
    "pestphp/pest": "^1.0",
 | 
					    "pestphp/pest": "^1.0",
 | 
				
			||||||
    "pestphp/pest-plugin-faker": "^1.0",
 | 
					    "pestphp/pest-plugin-faker": "^1.0",
 | 
				
			||||||
    "pestphp/pest-plugin-laravel": "^1.0",
 | 
					    "pestphp/pest-plugin-laravel": "^1.0",
 | 
				
			||||||
    "pestphp/pest-plugin-parallel": "^0.2.1",
 | 
					    "pestphp/pest-plugin-parallel": "^0.2.1",
 | 
				
			||||||
    "phpunit/phpunit": "^9.0"
 | 
					    "phpunit/phpunit": "^9.3"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "autoload": {
 | 
					  "autoload": {
 | 
				
			||||||
    "psr-4": {
 | 
					    "psr-4": {
 | 
				
			||||||
@ -81,7 +81,10 @@
 | 
				
			|||||||
  "config": {
 | 
					  "config": {
 | 
				
			||||||
    "optimize-autoloader": true,
 | 
					    "optimize-autoloader": true,
 | 
				
			||||||
    "preferred-install": "dist",
 | 
					    "preferred-install": "dist",
 | 
				
			||||||
    "sort-packages": true
 | 
					    "sort-packages": true,
 | 
				
			||||||
 | 
					    "allow-plugins": {
 | 
				
			||||||
 | 
					      "pestphp/pest-plugin": true
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "extra": {
 | 
					  "extra": {
 | 
				
			||||||
    "laravel": {
 | 
					    "laravel": {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2347
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2347
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -168,6 +168,7 @@ return [
 | 
				
			|||||||
        Crater\Providers\EventServiceProvider::class,
 | 
					        Crater\Providers\EventServiceProvider::class,
 | 
				
			||||||
        Crater\Providers\RouteServiceProvider::class,
 | 
					        Crater\Providers\RouteServiceProvider::class,
 | 
				
			||||||
        Crater\Providers\DropboxServiceProvider::class,
 | 
					        Crater\Providers\DropboxServiceProvider::class,
 | 
				
			||||||
 | 
					        Crater\Providers\ViewServiceProvider::class,
 | 
				
			||||||
        Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
 | 
					        Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -68,8 +68,10 @@ return [
 | 
				
			|||||||
        ["code" => "sv", "name" => "Svenska"],
 | 
					        ["code" => "sv", "name" => "Svenska"],
 | 
				
			||||||
        ["code" => "sk", "name" => "Slovak"],
 | 
					        ["code" => "sk", "name" => "Slovak"],
 | 
				
			||||||
        ["code" => "vi", "name" => "Tiếng Việt"],
 | 
					        ["code" => "vi", "name" => "Tiếng Việt"],
 | 
				
			||||||
 | 
					        ["code" => "cs", "name" => "Czech"],
 | 
				
			||||||
        ["code" => "el", "name" => "Greek"],
 | 
					        ["code" => "el", "name" => "Greek"],
 | 
				
			||||||
        ["code" => "hr", "name" => "Crotian"],
 | 
					        ["code" => "hr", "name" => "Crotian"],
 | 
				
			||||||
 | 
					        ["code" => "th", "name" => "ไทย"],
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /*
 | 
					    /*
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,7 @@ return [
 | 
				
			|||||||
            'tokenizer',
 | 
					            'tokenizer',
 | 
				
			||||||
            'JSON',
 | 
					            'JSON',
 | 
				
			||||||
            'cURL',
 | 
					            'cURL',
 | 
				
			||||||
 | 
					            'zip',
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        'apache' => [
 | 
					        'apache' => [
 | 
				
			||||||
            'mod_rewrite',
 | 
					            'mod_rewrite',
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								crowdin.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								crowdin.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					files:
 | 
				
			||||||
 | 
					  - source: /resources/scripts/locales/en.json
 | 
				
			||||||
 | 
					    translation: /resources/scripts/locales/%two_letters_code%.json
 | 
				
			||||||
@ -37,15 +37,6 @@ class InvoiceFactory extends Factory
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function overdue()
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return $this->state(function (array $attributes) {
 | 
					 | 
				
			||||||
            return [
 | 
					 | 
				
			||||||
                'status' => Invoice::STATUS_OVERDUE,
 | 
					 | 
				
			||||||
            ];
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public function completed()
 | 
					    public function completed()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return $this->state(function (array $attributes) {
 | 
					        return $this->state(function (array $attributes) {
 | 
				
			||||||
@ -55,15 +46,6 @@ class InvoiceFactory extends Factory
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function due()
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return $this->state(function (array $attributes) {
 | 
					 | 
				
			||||||
            return [
 | 
					 | 
				
			||||||
                'status' => Invoice::STATUS_DUE,
 | 
					 | 
				
			||||||
            ];
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public function unpaid()
 | 
					    public function unpaid()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return $this->state(function (array $attributes) {
 | 
					        return $this->state(function (array $attributes) {
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Models\Setting;
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class UpdateCraterVersion603 extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Setting::setSetting('version', '6.0.3');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Reverse the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function down()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Models\Setting;
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class UpdateCraterVersion604 extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Setting::setSetting('version', '6.0.4');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Reverse the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function down()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					use Illuminate\Database\Schema\Blueprint;
 | 
				
			||||||
 | 
					use Illuminate\Support\Facades\Schema;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class UpdateValueColumnToNullableOnSettingsTable extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Schema::table('settings', function (Blueprint $table) {
 | 
				
			||||||
 | 
					            $table->string('value')->nullable()->change();
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Reverse the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function down()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,32 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					use Illuminate\Database\Schema\Blueprint;
 | 
				
			||||||
 | 
					use Illuminate\Support\Facades\Schema;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class AddOverdueToInvoicesTable extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Schema::table('invoices', function (Blueprint $table) {
 | 
				
			||||||
 | 
					            $table->boolean('overdue')->default(false);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Reverse the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function down()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Schema::table('invoices', function (Blueprint $table) {
 | 
				
			||||||
 | 
					            $table->dropForeign(['overdue']);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										27
									
								
								database/migrations/2022_03_03_060121_crater_version_605.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								database/migrations/2022_03_03_060121_crater_version_605.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Models\Setting;
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class CraterVersion605 extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Setting::setSetting('version', '6.0.5');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Reverse the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function down()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Models\Invoice;
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class ChangeOverDueStatusToSent extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        $overdueInvoices = Invoice::where('status', 'OVERDUE')->get();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ($overdueInvoices) {
 | 
				
			||||||
 | 
					            $overdueInvoices->map(function ($overdueInvoice) {
 | 
				
			||||||
 | 
					                $overdueInvoice->status = Invoice::STATUS_SENT;
 | 
				
			||||||
 | 
					                $overdueInvoice->overdue = true;
 | 
				
			||||||
 | 
					                $overdueInvoice->save();
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Reverse the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function down()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,38 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Models\InvoiceItem;
 | 
				
			||||||
 | 
					use Crater\Models\Tax;
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class CalculateBaseValuesForInvoiceItems extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        $taxes = Tax::whereRelation('invoiceItem', 'base_amount', null)->get();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ($taxes) {
 | 
				
			||||||
 | 
					            $taxes->map(function ($tax) {
 | 
				
			||||||
 | 
					                $invoiceItem = InvoiceItem::find($tax->invoice_item_id);
 | 
				
			||||||
 | 
					                $exchange_rate = $invoiceItem->exchange_rate;
 | 
				
			||||||
 | 
					                $tax->exchange_rate = $exchange_rate;
 | 
				
			||||||
 | 
					                $tax->base_amount = $tax->amount * $exchange_rate;
 | 
				
			||||||
 | 
					                $tax->save();
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Reverse the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function down()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Crater\Models\Setting;
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class UpdateCraterVersion606 extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Setting::setSetting('version', '6.0.6');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Reverse the migrations.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return void
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function down()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -170,7 +170,7 @@ class CountriesTableSeeder extends Seeder
 | 
				
			|||||||
        ['id' => 152,'code' => 'NR','name' => "Nauru",'phonecode' => 674],
 | 
					        ['id' => 152,'code' => 'NR','name' => "Nauru",'phonecode' => 674],
 | 
				
			||||||
        ['id' => 153,'code' => 'NP','name' => "Nepal",'phonecode' => 977],
 | 
					        ['id' => 153,'code' => 'NP','name' => "Nepal",'phonecode' => 977],
 | 
				
			||||||
        ['id' => 154,'code' => 'AN','name' => "Netherlands Antilles",'phonecode' => 599],
 | 
					        ['id' => 154,'code' => 'AN','name' => "Netherlands Antilles",'phonecode' => 599],
 | 
				
			||||||
        ['id' => 155,'code' => 'NL','name' => "Netherlands The",'phonecode' => 31],
 | 
					        ['id' => 155,'code' => 'NL','name' => "Netherlands",'phonecode' => 31],
 | 
				
			||||||
        ['id' => 156,'code' => 'NC','name' => "New Caledonia",'phonecode' => 687],
 | 
					        ['id' => 156,'code' => 'NC','name' => "New Caledonia",'phonecode' => 687],
 | 
				
			||||||
        ['id' => 157,'code' => 'NZ','name' => "New Zealand",'phonecode' => 64],
 | 
					        ['id' => 157,'code' => 'NZ','name' => "New Zealand",'phonecode' => 64],
 | 
				
			||||||
        ['id' => 158,'code' => 'NI','name' => "Nicaragua",'phonecode' => 505],
 | 
					        ['id' => 158,'code' => 'NI','name' => "Nicaragua",'phonecode' => 505],
 | 
				
			||||||
 | 
				
			|||||||
@ -106,6 +106,14 @@ class CurrenciesTableSeeder extends Seeder
 | 
				
			|||||||
                'thousand_separator' => ',',
 | 
					                'thousand_separator' => ',',
 | 
				
			||||||
                'decimal_separator' => '.',
 | 
					                'decimal_separator' => '.',
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
 | 
					            [
 | 
				
			||||||
 | 
					                'name' => 'Nepali Rupee',
 | 
				
			||||||
 | 
					                'code' => 'NPR',
 | 
				
			||||||
 | 
					                'symbol' => 'रू',
 | 
				
			||||||
 | 
					                'precision' => '2',
 | 
				
			||||||
 | 
					                'thousand_separator' => ',',
 | 
				
			||||||
 | 
					                'decimal_separator' => '.',
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
            [
 | 
					            [
 | 
				
			||||||
                'name' => 'Indian Rupee',
 | 
					                'name' => 'Indian Rupee',
 | 
				
			||||||
                'code' => 'INR',
 | 
					                'code' => 'INR',
 | 
				
			||||||
@ -267,6 +275,14 @@ class CurrenciesTableSeeder extends Seeder
 | 
				
			|||||||
                'thousand_separator' => '.',
 | 
					                'thousand_separator' => '.',
 | 
				
			||||||
                'decimal_separator' => ',',
 | 
					                'decimal_separator' => ',',
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
 | 
					            [
 | 
				
			||||||
 | 
					                'name' => 'Central African Franc',
 | 
				
			||||||
 | 
					                'code' => 'XAF',
 | 
				
			||||||
 | 
					                'symbol' => 'CFA ',
 | 
				
			||||||
 | 
					                'precision' => '2',
 | 
				
			||||||
 | 
					                'thousand_separator' => ',',
 | 
				
			||||||
 | 
					                'decimal_separator' => '.',
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
            [
 | 
					            [
 | 
				
			||||||
                'name' => 'West African Franc',
 | 
					                'name' => 'West African Franc',
 | 
				
			||||||
                'code' => 'XOF',
 | 
					                'code' => 'XOF',
 | 
				
			||||||
@ -575,6 +591,15 @@ class CurrenciesTableSeeder extends Seeder
 | 
				
			|||||||
                'thousand_separator' => ',',
 | 
					                'thousand_separator' => ',',
 | 
				
			||||||
                'decimal_separator' => '.',
 | 
					                'decimal_separator' => '.',
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
 | 
					            [
 | 
				
			||||||
 | 
					                'name' => 'Macedonian Denar',
 | 
				
			||||||
 | 
					                'code' => 'MKD',
 | 
				
			||||||
 | 
					                'symbol' => 'ден',
 | 
				
			||||||
 | 
					                'precision' => '0',
 | 
				
			||||||
 | 
					                'thousand_separator' => '.',
 | 
				
			||||||
 | 
					                'decimal_separator' => ',',
 | 
				
			||||||
 | 
					                'swap_currency_symbol' => true,
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
FROM php:7.4-fpm-alpine
 | 
					FROM php:8.0-fpm-alpine
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN apk add --no-cache \
 | 
					RUN apk add --no-cache \
 | 
				
			||||||
    php7-bcmath
 | 
					    php8-bcmath
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN docker-php-ext-install pdo pdo_mysql bcmath
 | 
					RUN docker-php-ext-install pdo pdo_mysql bcmath
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										502
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										502
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -65,6 +65,13 @@
 | 
				
			|||||||
        "to-fast-properties": "^2.0.0"
 | 
					        "to-fast-properties": "^2.0.0"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "@esbuild/linux-loong64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@eslint/eslintrc": {
 | 
					    "@eslint/eslintrc": {
 | 
				
			||||||
      "version": "0.4.3",
 | 
					      "version": "0.4.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
 | 
				
			||||||
@ -214,6 +221,23 @@
 | 
				
			|||||||
      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz",
 | 
				
			||||||
      "integrity": "sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ=="
 | 
					      "integrity": "sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "@rvxlab/tailwind-plugin-ios-full-height": {
 | 
				
			||||||
 | 
					      "version": "1.1.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@rvxlab/tailwind-plugin-ios-full-height/-/tailwind-plugin-ios-full-height-1.1.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-jPIxXn0raN/YTk8nXesqM+JbS2WWd5XaUk/MbaAgVDDPyYtsPfeN3B26xIhSa2oE2+JB66tegPUMSOmixzroXg==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "@stripe/stripe-js": {
 | 
				
			||||||
 | 
					      "version": "1.48.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-1.48.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-Kw2BRXk6z/wnTU9m2IJOhxJNrx9xzmpFSbk6D/Z0x6LJntMafiHeHFag2PvSF30O2quMb1UUdWsnZqGVDruZww=="
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "@tailwindcss/aspect-ratio": {
 | 
				
			||||||
 | 
					      "version": "0.4.2",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@tailwindcss/forms": {
 | 
					    "@tailwindcss/forms": {
 | 
				
			||||||
      "version": "0.4.0",
 | 
					      "version": "0.4.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.4.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.4.0.tgz",
 | 
				
			||||||
@ -223,6 +247,35 @@
 | 
				
			|||||||
        "mini-svg-data-uri": "^1.2.3"
 | 
					        "mini-svg-data-uri": "^1.2.3"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "@tailwindcss/line-clamp": {
 | 
				
			||||||
 | 
					      "version": "0.3.1",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@tailwindcss/line-clamp/-/line-clamp-0.3.1.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-pNr0T8LAc3TUx/gxCfQZRe9NB2dPEo/cedPHzUGIPxqDMhgjwNm6jYxww4W5l0zAsAddxr+XfZcqttGiFDgrGg=="
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "@tailwindcss/typography": {
 | 
				
			||||||
 | 
					      "version": "0.5.9",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.9.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-t8Sg3DyynFysV9f4JDOVISGsjazNb48AeIYQwcL+Bsq5uf4RYL75C1giZ43KISjeDGBaTN3Kxh7Xj/vRSMJUUg==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "lodash.castarray": "^4.4.0",
 | 
				
			||||||
 | 
					        "lodash.isplainobject": "^4.0.6",
 | 
				
			||||||
 | 
					        "lodash.merge": "^4.6.2",
 | 
				
			||||||
 | 
					        "postcss-selector-parser": "6.0.10"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "postcss-selector-parser": {
 | 
				
			||||||
 | 
					          "version": "6.0.10",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
 | 
				
			||||||
 | 
					          "dev": true,
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "cssesc": "^3.0.0",
 | 
				
			||||||
 | 
					            "util-deprecate": "^1.0.2"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@tiptap/core": {
 | 
					    "@tiptap/core": {
 | 
				
			||||||
      "version": "2.0.0-beta.99",
 | 
					      "version": "2.0.0-beta.99",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.0-beta.99.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.0-beta.99.tgz",
 | 
				
			||||||
@ -386,6 +439,11 @@
 | 
				
			|||||||
      "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.0.0-beta.13.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.0.0-beta.13.tgz",
 | 
				
			||||||
      "integrity": "sha512-0EtAwuRldCAoFaL/iXgkRepEeOd55rPg5N4FQUN1xTwZT7PDofukP0DG/2jff/Uj17x4uTaJAa9qlFWuNnDvjw=="
 | 
					      "integrity": "sha512-0EtAwuRldCAoFaL/iXgkRepEeOd55rPg5N4FQUN1xTwZT7PDofukP0DG/2jff/Uj17x4uTaJAa9qlFWuNnDvjw=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "@tiptap/extension-text-align": {
 | 
				
			||||||
 | 
					      "version": "2.0.0-beta.220",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.0.0-beta.220.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-xUYhozdJA0UVLxlrxYLHLhwDYD5oDDiy0omAzFKAyRRtHAkNSPot7Vp7UJW2M0R6XHIQDMFEopxKQNJMBTRk3w=="
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@tiptap/starter-kit": {
 | 
					    "@tiptap/starter-kit": {
 | 
				
			||||||
      "version": "2.0.0-beta.97",
 | 
					      "version": "2.0.0-beta.97",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.0.0-beta.97.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.0.0-beta.97.tgz",
 | 
				
			||||||
@ -537,6 +595,12 @@
 | 
				
			|||||||
        "@types/prosemirror-transform": "*"
 | 
					        "@types/prosemirror-transform": "*"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "@vitejs/plugin-vue": {
 | 
				
			||||||
 | 
					      "version": "1.10.2",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.10.2.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-/QJ0Z9qfhAFtKRY+r57ziY4BSbGUTGsPRMpB/Ron3QPwBZM4OZAZHdTa4a8PafCwU5DTatXG8TMDoP8z+oDqJw==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@vue/compiler-core": {
 | 
					    "@vue/compiler-core": {
 | 
				
			||||||
      "version": "3.2.4",
 | 
					      "version": "3.2.4",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.4.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.4.tgz",
 | 
				
			||||||
@ -558,6 +622,70 @@
 | 
				
			|||||||
        "@vue/shared": "3.2.4"
 | 
					        "@vue/shared": "3.2.4"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "@vue/compiler-sfc": {
 | 
				
			||||||
 | 
					      "version": "3.2.47",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "@babel/parser": "^7.16.4",
 | 
				
			||||||
 | 
					        "@vue/compiler-core": "3.2.47",
 | 
				
			||||||
 | 
					        "@vue/compiler-dom": "3.2.47",
 | 
				
			||||||
 | 
					        "@vue/compiler-ssr": "3.2.47",
 | 
				
			||||||
 | 
					        "@vue/reactivity-transform": "3.2.47",
 | 
				
			||||||
 | 
					        "@vue/shared": "3.2.47",
 | 
				
			||||||
 | 
					        "estree-walker": "^2.0.2",
 | 
				
			||||||
 | 
					        "magic-string": "^0.25.7",
 | 
				
			||||||
 | 
					        "postcss": "^8.1.10",
 | 
				
			||||||
 | 
					        "source-map": "^0.6.1"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "@babel/parser": {
 | 
				
			||||||
 | 
					          "version": "7.21.2",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==",
 | 
				
			||||||
 | 
					          "dev": true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "@vue/compiler-core": {
 | 
				
			||||||
 | 
					          "version": "3.2.47",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.47.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==",
 | 
				
			||||||
 | 
					          "dev": true,
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "@babel/parser": "^7.16.4",
 | 
				
			||||||
 | 
					            "@vue/shared": "3.2.47",
 | 
				
			||||||
 | 
					            "estree-walker": "^2.0.2",
 | 
				
			||||||
 | 
					            "source-map": "^0.6.1"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "@vue/compiler-dom": {
 | 
				
			||||||
 | 
					          "version": "3.2.47",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==",
 | 
				
			||||||
 | 
					          "dev": true,
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "@vue/compiler-core": "3.2.47",
 | 
				
			||||||
 | 
					            "@vue/shared": "3.2.47"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "@vue/compiler-ssr": {
 | 
				
			||||||
 | 
					          "version": "3.2.47",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==",
 | 
				
			||||||
 | 
					          "dev": true,
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "@vue/compiler-dom": "3.2.47",
 | 
				
			||||||
 | 
					            "@vue/shared": "3.2.47"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "@vue/shared": {
 | 
				
			||||||
 | 
					          "version": "3.2.47",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.47.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==",
 | 
				
			||||||
 | 
					          "dev": true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@vue/compiler-ssr": {
 | 
					    "@vue/compiler-ssr": {
 | 
				
			||||||
      "version": "3.2.19",
 | 
					      "version": "3.2.19",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.19.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.19.tgz",
 | 
				
			||||||
@ -607,6 +735,45 @@
 | 
				
			|||||||
        "@vue/shared": "3.2.4"
 | 
					        "@vue/shared": "3.2.4"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "@vue/reactivity-transform": {
 | 
				
			||||||
 | 
					      "version": "3.2.47",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "@babel/parser": "^7.16.4",
 | 
				
			||||||
 | 
					        "@vue/compiler-core": "3.2.47",
 | 
				
			||||||
 | 
					        "@vue/shared": "3.2.47",
 | 
				
			||||||
 | 
					        "estree-walker": "^2.0.2",
 | 
				
			||||||
 | 
					        "magic-string": "^0.25.7"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "@babel/parser": {
 | 
				
			||||||
 | 
					          "version": "7.21.2",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==",
 | 
				
			||||||
 | 
					          "dev": true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "@vue/compiler-core": {
 | 
				
			||||||
 | 
					          "version": "3.2.47",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.47.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==",
 | 
				
			||||||
 | 
					          "dev": true,
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "@babel/parser": "^7.16.4",
 | 
				
			||||||
 | 
					            "@vue/shared": "3.2.47",
 | 
				
			||||||
 | 
					            "estree-walker": "^2.0.2",
 | 
				
			||||||
 | 
					            "source-map": "^0.6.1"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "@vue/shared": {
 | 
				
			||||||
 | 
					          "version": "3.2.47",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.47.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==",
 | 
				
			||||||
 | 
					          "dev": true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@vue/ref-transform": {
 | 
					    "@vue/ref-transform": {
 | 
				
			||||||
      "version": "3.2.19",
 | 
					      "version": "3.2.19",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.19.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.19.tgz",
 | 
				
			||||||
@ -677,6 +844,44 @@
 | 
				
			|||||||
      "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.4.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.4.tgz",
 | 
				
			||||||
      "integrity": "sha512-j2j1MRmjalVKr3YBTxl/BClSIc8UQ8NnPpLYclxerK65JIowI4O7n8O8lElveEtEoHxy1d7BelPUDI0Q4bumqg=="
 | 
					      "integrity": "sha512-j2j1MRmjalVKr3YBTxl/BClSIc8UQ8NnPpLYclxerK65JIowI4O7n8O8lElveEtEoHxy1d7BelPUDI0Q4bumqg=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "@vuelidate/components": {
 | 
				
			||||||
 | 
					      "version": "1.2.3",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@vuelidate/components/-/components-1.2.3.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-QE+oSzJVYZUfYcIAsM+QCrB3xRJoesFzUTNtfuYbhWfdMmTHxA9YtKuKWlTsR1nK8+SmHMJROIG8PnL77ZLSuQ==",
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "@vuelidate/core": "^2.0.0"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "@vuelidate/core": {
 | 
				
			||||||
 | 
					      "version": "2.0.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@vuelidate/core/-/core-2.0.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-xIFgdQlScO0aaSZ0wTGPJh8YcTMNAj5veI8yPgiAyxOT+GV7vNQFiU1vpYWCL4cklkkhYvRRSC2OEX7YOZNmPQ==",
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "vue-demi": "^0.13.11"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "vue-demi": {
 | 
				
			||||||
 | 
					          "version": "0.13.11",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A=="
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "@vuelidate/validators": {
 | 
				
			||||||
 | 
					      "version": "2.0.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@vuelidate/validators/-/validators-2.0.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-fQQcmDWfz7pyH5/JPi0Ng2GEgNK1pUHn/Z/j5rG/Q+HwhgIXvJblTPcZwKOj1ABL7V4UVuGKECvZCDHNGOwdrg==",
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "vue-demi": "^0.13.11"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "vue-demi": {
 | 
				
			||||||
 | 
					          "version": "0.13.11",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A=="
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@vueuse/core": {
 | 
					    "@vueuse/core": {
 | 
				
			||||||
      "version": "6.0.0",
 | 
					      "version": "6.0.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-6.0.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-6.0.0.tgz",
 | 
				
			||||||
@ -1240,6 +1445,175 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "@esbuild/linux-loong64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-android-64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-android-arm64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-darwin-64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-darwin-arm64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-freebsd-64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-freebsd-arm64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-linux-32": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-linux-64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-linux-arm": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-linux-arm64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-linux-mips64le": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-linux-ppc64le": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-linux-riscv64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-linux-s390x": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-netbsd-64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-openbsd-64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-sunos-64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-windows-32": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-windows-64": "0.14.54",
 | 
				
			||||||
 | 
					        "esbuild-windows-arm64": "0.14.54"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-android-64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-android-arm64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-darwin-64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-darwin-arm64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-freebsd-64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-freebsd-arm64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-linux-32": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-linux-64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-linux-arm": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-linux-arm64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-linux-mips64le": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-linux-ppc64le": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-linux-riscv64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-linux-s390x": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-netbsd-64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-openbsd-64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-sunos-64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-windows-32": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-windows-64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "esbuild-windows-arm64": {
 | 
				
			||||||
 | 
					      "version": "0.14.54",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "optional": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "escalade": {
 | 
					    "escalade": {
 | 
				
			||||||
      "version": "3.1.1",
 | 
					      "version": "3.1.1",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
 | 
				
			||||||
@ -1947,12 +2321,24 @@
 | 
				
			|||||||
      "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
 | 
				
			||||||
      "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
 | 
					      "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "lodash.castarray": {
 | 
				
			||||||
 | 
					      "version": "4.4.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "lodash.clonedeep": {
 | 
					    "lodash.clonedeep": {
 | 
				
			||||||
      "version": "4.5.0",
 | 
					      "version": "4.5.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
 | 
				
			||||||
      "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
 | 
					      "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
 | 
				
			||||||
      "dev": true
 | 
					      "dev": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "lodash.isplainobject": {
 | 
				
			||||||
 | 
					      "version": "4.0.6",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "lodash.merge": {
 | 
					    "lodash.merge": {
 | 
				
			||||||
      "version": "4.6.2",
 | 
					      "version": "4.6.2",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
 | 
				
			||||||
@ -2027,9 +2413,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "minimist": {
 | 
					    "minimist": {
 | 
				
			||||||
      "version": "1.2.5",
 | 
					      "version": "1.2.8",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
 | 
				
			||||||
      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
 | 
					      "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
 | 
				
			||||||
      "dev": true
 | 
					      "dev": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "modern-normalize": {
 | 
					    "modern-normalize": {
 | 
				
			||||||
@ -2205,6 +2591,22 @@
 | 
				
			|||||||
      "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
 | 
					      "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
 | 
				
			||||||
      "dev": true
 | 
					      "dev": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "pinia": {
 | 
				
			||||||
 | 
					      "version": "2.0.32",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.32.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-8Tw4OrpCSJ028UUyp0gYPP/wyjigLoEceuO/x1G+FlHVf73337e5vLm4uDmrRIoBG1hvaed/eSHnrCFjOc4nkA==",
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "@vue/devtools-api": "^6.5.0",
 | 
				
			||||||
 | 
					        "vue-demi": "*"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "@vue/devtools-api": {
 | 
				
			||||||
 | 
					          "version": "6.5.0",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "postcss": {
 | 
					    "postcss": {
 | 
				
			||||||
      "version": "8.4.5",
 | 
					      "version": "8.4.5",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz",
 | 
				
			||||||
@ -2508,6 +2910,15 @@
 | 
				
			|||||||
        "glob": "^7.1.3"
 | 
					        "glob": "^7.1.3"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "rollup": {
 | 
				
			||||||
 | 
					      "version": "2.77.3",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "fsevents": "~2.3.2"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "rope-sequence": {
 | 
					    "rope-sequence": {
 | 
				
			||||||
      "version": "1.3.2",
 | 
					      "version": "1.3.2",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.2.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.2.tgz",
 | 
				
			||||||
@ -2668,6 +3079,12 @@
 | 
				
			|||||||
        "has-flag": "^3.0.0"
 | 
					        "has-flag": "^3.0.0"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "supports-preserve-symlinks-flag": {
 | 
				
			||||||
 | 
					      "version": "1.0.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "table": {
 | 
					    "table": {
 | 
				
			||||||
      "version": "6.7.2",
 | 
					      "version": "6.7.2",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/table/-/table-6.7.2.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/table/-/table-6.7.2.tgz",
 | 
				
			||||||
@ -2934,12 +3351,86 @@
 | 
				
			|||||||
      "resolved": "https://registry.npmjs.org/v-money3/-/v-money3-3.16.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/v-money3/-/v-money3-3.16.1.tgz",
 | 
				
			||||||
      "integrity": "sha512-U0GjmdybvEwfxCpZiTUbKugSglJbX6wxlyMeg0YJdLTAKlnjMRDph3hpNJlTlg5Gs8MQRpDVdaLysBjV749HLg=="
 | 
					      "integrity": "sha512-U0GjmdybvEwfxCpZiTUbKugSglJbX6wxlyMeg0YJdLTAKlnjMRDph3hpNJlTlg5Gs8MQRpDVdaLysBjV749HLg=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "v-tooltip": {
 | 
				
			||||||
 | 
					      "version": "4.0.0-beta.17",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-4.0.0-beta.17.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-d7v/6KEXQOtcj3NT3Z1LpbDv8SBh8JgbsD+3s/zGIGCxiXC2SoVW6wGV4X0MlCo97PiosibcSe+VKbFiy4AKnQ==",
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "@popperjs/core": "^2.11.0",
 | 
				
			||||||
 | 
					        "vue-resize": "^2.0.0-alpha.1"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "@popperjs/core": {
 | 
				
			||||||
 | 
					          "version": "2.11.6",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw=="
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "v8-compile-cache": {
 | 
					    "v8-compile-cache": {
 | 
				
			||||||
      "version": "2.3.0",
 | 
					      "version": "2.3.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
 | 
				
			||||||
      "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
 | 
					      "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
 | 
				
			||||||
      "dev": true
 | 
					      "dev": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "vite": {
 | 
				
			||||||
 | 
					      "version": "2.9.15",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/vite/-/vite-2.9.15.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-fzMt2jK4vQ3yK56te3Kqpkaeq9DkcZfBbzHwYpobasvgYmP2SoAr6Aic05CsB4CzCZbsDv4sujX3pkEGhLabVQ==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "esbuild": "^0.14.27",
 | 
				
			||||||
 | 
					        "fsevents": "~2.3.2",
 | 
				
			||||||
 | 
					        "postcss": "^8.4.13",
 | 
				
			||||||
 | 
					        "resolve": "^1.22.0",
 | 
				
			||||||
 | 
					        "rollup": ">=2.59.0 <2.78.0"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "is-core-module": {
 | 
				
			||||||
 | 
					          "version": "2.11.0",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
 | 
				
			||||||
 | 
					          "dev": true,
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "has": "^1.0.3"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "nanoid": {
 | 
				
			||||||
 | 
					          "version": "3.3.4",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
 | 
				
			||||||
 | 
					          "dev": true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "postcss": {
 | 
				
			||||||
 | 
					          "version": "8.4.21",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
 | 
				
			||||||
 | 
					          "dev": true,
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "nanoid": "^3.3.4",
 | 
				
			||||||
 | 
					            "picocolors": "^1.0.0",
 | 
				
			||||||
 | 
					            "source-map-js": "^1.0.2"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "resolve": {
 | 
				
			||||||
 | 
					          "version": "1.22.1",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
 | 
				
			||||||
 | 
					          "dev": true,
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "is-core-module": "^2.9.0",
 | 
				
			||||||
 | 
					            "path-parse": "^1.0.7",
 | 
				
			||||||
 | 
					            "supports-preserve-symlinks-flag": "^1.0.0"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "source-map-js": {
 | 
				
			||||||
 | 
					          "version": "1.0.2",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
 | 
				
			||||||
 | 
					          "dev": true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "vue": {
 | 
					    "vue": {
 | 
				
			||||||
      "version": "3.2.4",
 | 
					      "version": "3.2.4",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.4.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.4.tgz",
 | 
				
			||||||
@ -3002,6 +3493,11 @@
 | 
				
			|||||||
        "@vue/devtools-api": "^6.0.0-beta.7"
 | 
					        "@vue/devtools-api": "^6.0.0-beta.7"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "vue-resize": {
 | 
				
			||||||
 | 
					      "version": "2.0.0-alpha.1",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-2.0.0-alpha.1.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg=="
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "vue-router": {
 | 
					    "vue-router": {
 | 
				
			||||||
      "version": "4.0.11",
 | 
					      "version": "4.0.11",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.11.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.11.tgz",
 | 
				
			||||||
 | 
				
			|||||||
@ -33,6 +33,7 @@
 | 
				
			|||||||
    "@stripe/stripe-js": "^1.21.2",
 | 
					    "@stripe/stripe-js": "^1.21.2",
 | 
				
			||||||
    "@tailwindcss/line-clamp": "^0.3.0",
 | 
					    "@tailwindcss/line-clamp": "^0.3.0",
 | 
				
			||||||
    "@tiptap/core": "^2.0.0-beta.85",
 | 
					    "@tiptap/core": "^2.0.0-beta.85",
 | 
				
			||||||
 | 
					    "@tiptap/extension-text-align": "^2.0.0-beta.29",
 | 
				
			||||||
    "@tiptap/starter-kit": "^2.0.0-beta.81",
 | 
					    "@tiptap/starter-kit": "^2.0.0-beta.81",
 | 
				
			||||||
    "@tiptap/vue-3": "^2.0.0-beta.38",
 | 
					    "@tiptap/vue-3": "^2.0.0-beta.38",
 | 
				
			||||||
    "@vuelidate/components": "^1.1.12",
 | 
					    "@vuelidate/components": "^1.1.12",
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +0,0 @@
 | 
				
			|||||||
import{G as u,aN as d,k as m,r as n,o as h,e as p,h as s,t as o,f as c,w as f,i as _,u as x}from"./vendor.01d0adc5.js";const g={class:"w-full h-screen h-screen-ios"},w={class:"flex items-center justify-center w-full h-full"},y={class:"flex flex-col items-center justify-center"},b={class:"text-primary-500",style:{"font-size":"10rem"}},v={class:"mb-10 text-3xl text-primary-500"},$={setup(k){const e=u();d();const l=m(()=>{if(e.path.indexOf("customer")>-1&&e.params.company)return`/${e.params.company}/customer/dashboard`;if(e.params.catchAll){let a=e.params.catchAll.indexOf("/");return a>-1?`/${e.params.catchAll.substring(a,0)}/customer/dashboard`:"/"}else return"/admin/dashboard"});return(t,a)=>{const r=n("BaseIcon"),i=n("router-link");return h(),p("div",g,[s("div",w,[s("div",y,[s("h1",b,o(t.$t("general.four_zero_four")),1),s("h5",v,o(t.$t("general.you_got_lost")),1),c(i,{class:"flex items-center w-32 h-12 px-3 py-1 text-base font-medium leading-none text-center text-white rounded whitespace-nowrap bg-primary-500 btn-lg hover:text-white",to:x(l)},{default:f(()=>[c(r,{name:"ArrowLeftIcon",class:"mr-2 text-white icon"}),_(" "+o(t.$t("general.go_home")),1)]),_:1},8,["to"])])])])}}};export{$ as default};
 | 
					 | 
				
			||||||
							
								
								
									
										1
									
								
								public/build/assets/404.e81599b7.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/404.e81599b7.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					import{G as u,aN as d,k as m,r as n,o as h,e as p,h as s,t as o,f as c,w as f,i as _,u as x}from"./vendor.d12b5734.js";const g={class:"w-full h-screen"},w={class:"flex items-center justify-center w-full h-full"},y={class:"flex flex-col items-center justify-center"},b={class:"text-primary-500",style:{"font-size":"10rem"}},v={class:"mb-10 text-3xl text-primary-500"},$={setup(k){const e=u();d();const l=m(()=>{if(e.path.indexOf("customer")>-1&&e.params.company)return`/${e.params.company}/customer/dashboard`;if(e.params.catchAll){let a=e.params.catchAll.indexOf("/");return a>-1?`/${e.params.catchAll.substring(a,0)}/customer/dashboard`:"/"}else return"/admin/dashboard"});return(t,a)=>{const r=n("BaseIcon"),i=n("router-link");return h(),p("div",g,[s("div",w,[s("div",y,[s("h1",b,o(t.$t("general.four_zero_four")),1),s("h5",v,o(t.$t("general.you_got_lost")),1),c(i,{class:"flex items-center w-32 h-12 px-3 py-1 text-base font-medium leading-none text-center text-white rounded whitespace-nowrap bg-primary-500 btn-lg hover:text-white",to:x(l)},{default:f(()=>[c(r,{name:"ArrowLeftIcon",class:"mr-2 text-white icon"}),_(" "+o(t.$t("general.go_home")),1)]),_:1},8,["to"])])])])}}};export{$ as default};
 | 
				
			||||||
							
								
								
									
										1
									
								
								public/build/assets/AccountSetting.7f3b69b7.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/AccountSetting.7f3b69b7.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					var L=Object.defineProperty,P=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var U=(u,s,i)=>s in u?L(u,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[s]=i,S=(u,s)=>{for(var i in s||(s={}))z.call(s,i)&&U(u,i,s[i]);if(V)for(var i of V(s))E.call(s,i)&&U(u,i,s[i]);return u},I=(u,s)=>P(u,T(s));import{J,B as b,k as y,L as _,M as C,Q,N as H,P as K,a0 as O,T as W,r as m,o as M,e as X,f as r,w as d,u as e,x as Y,l as Z,m as x,j as ee,i as ae,t as se,U as te,h as ne}from"./vendor.d12b5734.js";import{e as oe,d as re,b as le}from"./main.465728e1.js";const ie=["onSubmit"],ue=ne("span",null,null,-1),ce={setup(u){const s=oe(),i=re(),F=le(),{t:v}=J();let p=b(!1),c=b(null),f=b([]);const $=b(!1);s.currentUser.avatar&&f.value.push({image:s.currentUser.avatar});const q=y(()=>({name:{required:_.withMessage(v("validation.required"),C)},email:{required:_.withMessage(v("validation.required"),C),email:_.withMessage(v("validation.email_incorrect"),Q)},password:{minLength:_.withMessage(v("validation.password_length",{count:8}),H(8))},confirm_password:{sameAsPassword:_.withMessage(v("validation.password_incorrect"),K(t.password))}})),t=O({name:s.currentUser.name,email:s.currentUser.email,language:s.currentUserSettings.language||F.selectedCompanySettings.language,password:"",confirm_password:""}),o=W(q,y(()=>t));function k(l,a){c.value=a}function N(){c.value=null,$.value=!0}async function A(){if(o.value.$touch(),o.value.$invalid)return!0;p.value=!0;let l={name:t.name,email:t.email};try{if(t.password!=null&&t.password!==void 0&&t.password!==""&&(l=I(S({},l),{password:t.password})),s.currentUserSettings.language!==t.language&&await s.updateUserSettings({settings:{language:t.language}}),(await s.updateCurrentUser(l)).data.data){if(p.value=!1,c.value||$.value){let w=new FormData;c.value&&w.append("admin_avatar",c.value),w.append("is_admin_avatar_removed",$.value),await s.uploadAvatar(w),c.value=null,$.value=!1}t.password="",t.confirm_password=""}}catch{return p.value=!1,!0}}return(l,a)=>{const w=m("BaseFileUploader"),g=m("BaseInputGroup"),B=m("BaseInput"),G=m("BaseMultiselect"),D=m("BaseInputGrid"),R=m("BaseIcon"),h=m("BaseButton"),j=m("BaseSettingCard");return M(),X("form",{class:"relative",onSubmit:te(A,["prevent"])},[r(j,{title:l.$t("settings.account_settings.account_settings"),description:l.$t("settings.account_settings.section_description")},{default:d(()=>[r(D,null,{default:d(()=>[r(g,{label:l.$tc("settings.account_settings.profile_picture")},{default:d(()=>[r(w,{modelValue:e(f),"onUpdate:modelValue":a[0]||(a[0]=n=>Y(f)?f.value=n:f=n),avatar:!0,accept:"image/*",onChange:k,onRemove:N},null,8,["modelValue"])]),_:1},8,["label"]),ue,r(g,{label:l.$tc("settings.account_settings.name"),error:e(o).name.$error&&e(o).name.$errors[0].$message,required:""},{default:d(()=>[r(B,{modelValue:e(t).name,"onUpdate:modelValue":a[1]||(a[1]=n=>e(t).name=n),invalid:e(o).name.$error,onInput:a[2]||(a[2]=n=>e(o).name.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),r(g,{label:l.$tc("settings.account_settings.email"),error:e(o).email.$error&&e(o).email.$errors[0].$message,required:""},{default:d(()=>[r(B,{modelValue:e(t).email,"onUpdate:modelValue":a[3]||(a[3]=n=>e(t).email=n),invalid:e(o).email.$error,onInput:a[4]||(a[4]=n=>e(o).email.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),r(g,{error:e(o).password.$error&&e(o).password.$errors[0].$message,label:l.$tc("settings.account_settings.password")},{default:d(()=>[r(B,{modelValue:e(t).password,"onUpdate:modelValue":a[5]||(a[5]=n=>e(t).password=n),type:"password",onInput:a[6]||(a[6]=n=>e(o).password.$touch())},null,8,["modelValue"])]),_:1},8,["error","label"]),r(g,{label:l.$tc("settings.account_settings.confirm_password"),error:e(o).confirm_password.$error&&e(o).confirm_password.$errors[0].$message},{default:d(()=>[r(B,{modelValue:e(t).confirm_password,"onUpdate:modelValue":a[7]||(a[7]=n=>e(t).confirm_password=n),type:"password",onInput:a[8]||(a[8]=n=>e(o).confirm_password.$touch())},null,8,["modelValue"])]),_:1},8,["label","error"]),r(g,{label:l.$tc("settings.language")},{default:d(()=>[r(G,{modelValue:e(t).language,"onUpdate:modelValue":a[9]||(a[9]=n=>e(t).language=n),options:e(i).config.languages,label:"name","value-prop":"code","track-by":"name","open-direction":"top"},null,8,["modelValue","options"])]),_:1},8,["label"])]),_:1}),r(h,{loading:e(p),disabled:e(p),class:"mt-6"},{left:d(n=>[e(p)?ee("",!0):(M(),Z(R,{key:0,name:"SaveIcon",class:x(n.class)},null,8,["class"]))]),default:d(()=>[ae(" "+se(l.$tc("settings.company_info.save")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["title","description"])],40,ie)}}};export{ce as default};
 | 
				
			||||||
@ -1 +0,0 @@
 | 
				
			|||||||
var L=Object.defineProperty,R=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var V=(u,s,i)=>s in u?L(u,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[s]=i,U=(u,s)=>{for(var i in s||(s={}))T.call(s,i)&&V(u,i,s[i]);if(b)for(var i of b(s))z.call(s,i)&&V(u,i,s[i]);return u},S=(u,s)=>R(u,P(s));import{J as E,B,k as I,L as v,M as y,Q as J,N as Q,P as H,a0 as K,T as O,r as m,o as C,e as W,f as r,w as d,u as e,x as X,l as Y,m as Z,j as x,i as ee,t as ae,U as se,h as te}from"./vendor.01d0adc5.js";import{e as ne,d as oe,b as re}from"./main.c43fbacd.js";const le=["onSubmit"],ie=te("span",null,null,-1),pe={setup(u){const s=ne(),i=oe(),M=re(),{t:g}=E();let p=B(!1),w=B(null),f=B([]);s.currentUser.avatar&&f.value.push({image:s.currentUser.avatar});const F=I(()=>({name:{required:v.withMessage(g("validation.required"),y)},email:{required:v.withMessage(g("validation.required"),y),email:v.withMessage(g("validation.email_incorrect"),J)},password:{minLength:v.withMessage(g("validation.password_length",{count:8}),Q(8))},confirm_password:{sameAsPassword:v.withMessage(g("validation.password_incorrect"),H(t.password))}})),t=K({name:s.currentUser.name,email:s.currentUser.email,language:s.currentUserSettings.language||M.selectedCompanySettings.language,password:"",confirm_password:""}),o=O(F,I(()=>t));function q(l,a){w.value=a}function k(){w.value=null}async function N(){if(o.value.$touch(),o.value.$invalid)return!0;p.value=!0;let l={name:t.name,email:t.email};try{if(t.password!=null&&t.password!==void 0&&t.password!==""&&(l=S(U({},l),{password:t.password})),s.currentUserSettings.language!==t.language&&await s.updateUserSettings({settings:{language:t.language}}),(await s.updateCurrentUser(l)).data.data){if(p.value=!1,w.value){let $=new FormData;$.append("admin_avatar",w.value),await s.uploadAvatar($)}t.password="",t.confirm_password=""}}catch{return p.value=!1,!0}}return(l,a)=>{const $=m("BaseFileUploader"),c=m("BaseInputGroup"),_=m("BaseInput"),G=m("BaseMultiselect"),D=m("BaseInputGrid"),h=m("BaseIcon"),j=m("BaseButton"),A=m("BaseSettingCard");return C(),W("form",{class:"relative",onSubmit:se(N,["prevent"])},[r(A,{title:l.$t("settings.account_settings.account_settings"),description:l.$t("settings.account_settings.section_description")},{default:d(()=>[r(D,null,{default:d(()=>[r(c,{label:l.$tc("settings.account_settings.profile_picture")},{default:d(()=>[r($,{modelValue:e(f),"onUpdate:modelValue":a[0]||(a[0]=n=>X(f)?f.value=n:f=n),avatar:!0,accept:"image/*",onChange:q,onRemove:k},null,8,["modelValue"])]),_:1},8,["label"]),ie,r(c,{label:l.$tc("settings.account_settings.name"),error:e(o).name.$error&&e(o).name.$errors[0].$message,required:""},{default:d(()=>[r(_,{modelValue:e(t).name,"onUpdate:modelValue":a[1]||(a[1]=n=>e(t).name=n),invalid:e(o).name.$error,onInput:a[2]||(a[2]=n=>e(o).name.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),r(c,{label:l.$tc("settings.account_settings.email"),error:e(o).email.$error&&e(o).email.$errors[0].$message,required:""},{default:d(()=>[r(_,{modelValue:e(t).email,"onUpdate:modelValue":a[3]||(a[3]=n=>e(t).email=n),invalid:e(o).email.$error,onInput:a[4]||(a[4]=n=>e(o).email.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),r(c,{error:e(o).password.$error&&e(o).password.$errors[0].$message,label:l.$tc("settings.account_settings.password")},{default:d(()=>[r(_,{modelValue:e(t).password,"onUpdate:modelValue":a[5]||(a[5]=n=>e(t).password=n),type:"password",onInput:a[6]||(a[6]=n=>e(o).password.$touch())},null,8,["modelValue"])]),_:1},8,["error","label"]),r(c,{label:l.$tc("settings.account_settings.confirm_password"),error:e(o).confirm_password.$error&&e(o).confirm_password.$errors[0].$message},{default:d(()=>[r(_,{modelValue:e(t).confirm_password,"onUpdate:modelValue":a[7]||(a[7]=n=>e(t).confirm_password=n),type:"password",onInput:a[8]||(a[8]=n=>e(o).confirm_password.$touch())},null,8,["modelValue"])]),_:1},8,["label","error"]),r(c,{label:l.$tc("settings.language")},{default:d(()=>[r(G,{modelValue:e(t).language,"onUpdate:modelValue":a[9]||(a[9]=n=>e(t).language=n),options:e(i).config.languages,label:"name","value-prop":"code","track-by":"code","open-direction":"top"},null,8,["modelValue","options"])]),_:1},8,["label"])]),_:1}),r(j,{loading:e(p),disabled:e(p),class:"mt-6"},{left:d(n=>[e(p)?x("",!0):(C(),Y(h,{key:0,name:"SaveIcon",class:Z(n.class)},null,8,["class"]))]),default:d(()=>[ee(" "+ae(l.$tc("settings.company_info.save")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["title","description"])],40,le)}}};export{pe as default};
 | 
					 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								public/build/assets/BackupSetting.135768cd.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/BackupSetting.135768cd.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								public/build/assets/BaseListItem.3b6ffe7a.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/BaseListItem.3b6ffe7a.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					import{_ as o}from"./main.465728e1.js";import{o as n,e as i,g as l,k as c,r as d,l as m,w as _,j as f,h as $,t as h,s as B}from"./vendor.d12b5734.js";const k={name:"List"},v={class:"list-none"};function x(e,r,t,s,a,p){return n(),i("div",v,[l(e.$slots,"default")])}var L=o(k,[["render",x]]);const y={name:"ListItem",props:{title:{type:String,required:!1,default:""},active:{type:Boolean,required:!0},index:{type:Number,default:null}},setup(e,{slots:r}){const t="cursor-pointer pb-2 pr-0 text-sm font-medium leading-5  flex items-center";let s=c(()=>!!r.icon),a=c(()=>e.active?`${t} text-primary-500`:`${t} text-gray-500`);return{hasIconSlot:s,containerClass:a}}},g={key:0,class:"mr-3"};function C(e,r,t,s,a,p){const u=d("router-link");return n(),m(u,B(e.$attrs,{class:s.containerClass}),{default:_(()=>[s.hasIconSlot?(n(),i("span",g,[l(e.$slots,"icon")])):f("",!0),$("span",null,h(t.title),1)]),_:3},16,["class"])}var b=o(y,[["render",C]]);export{b as B,L as a};
 | 
				
			||||||
@ -1 +0,0 @@
 | 
				
			|||||||
import{_ as o}from"./main.c43fbacd.js";import{o as n,e as c,g as i,k as l,r as u,l as m,w as _,j as f,h as $,t as h,s as B}from"./vendor.01d0adc5.js";const k={name:"List"},v={class:"list-none"};function x(e,r,t,s,a,d){return n(),c("div",v,[i(e.$slots,"default")])}var L=o(k,[["render",x]]);const y={name:"ListItem",props:{title:{type:String,required:!1,default:""},active:{type:Boolean,required:!0},index:{type:Number,default:null}},setup(e,{slots:r}){const t="cursor-pointer pb-2 pr-0 text-sm font-medium leading-5  flex items-center";let s=l(()=>!!r.icon),a=l(()=>e.active?`${t} text-primary-500`:`${t} text-gray-500`);return{hasIconSlot:s,containerClass:a}}},g={key:0,class:"mr-3"};function C(e,r,t,s,a,d){const p=u("router-link");return n(),m(p,B(e.$attrs,{class:s.containerClass}),{default:_(()=>[s.hasIconSlot?(n(),c("span",g,[i(e.$slots,"icon")])):f("",!0),$("span",null,h(t.title),1)]),_:3},16,["class"])}var b=o(y,[["render",C]]);export{b as B,L as a};
 | 
					 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -1 +1 @@
 | 
				
			|||||||
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.01d0adc5.js";import{u as z}from"./category.2f95eba8.js";import{c as E}from"./main.c43fbacd.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))}}})),a=q(h,g(()=>t)),w=g(()=>u.active&&u.componentName==="CategoryModal");async function I(){if(a.value.currentCategory.$touch(),a.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(),a.value.$reset()},300)}return(s,o)=>{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(a).currentCategory.name.$error&&e(a).currentCategory.name.$errors[0].$message,required:""},{default:r(()=>[n(x,{modelValue:e(t).currentCategory.name,"onUpdate:modelValue":o[0]||(o[0]=l=>e(t).currentCategory.name=l),invalid:e(a).currentCategory.name.$error,type:"text",onInput:o[1]||(o[1]=l=>e(a).currentCategory.name.$touch())},null,8,["modelValue","invalid"])]),_:1},8,["label","error"]),n(_,{label:s.$t("expenses.description"),error:e(a).currentCategory.description.$error&&e(a).currentCategory.description.$errors[0].$message},{default:r(()=>[n(M,{modelValue:e(t).currentCategory.description,"onUpdate:modelValue":o[2]||(o[2]=l=>e(t).currentCategory.description=l),rows:"4",cols:"50",onInput:o[3]||(o[3]=l=>e(a).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 _};
 | 
					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 _};
 | 
				
			||||||
							
								
								
									
										1
									
								
								public/build/assets/CompanyInfoSettings.23b88ef4.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/CompanyInfoSettings.23b88ef4.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								public/build/assets/Create.1d6bd807.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/Create.1d6bd807.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								public/build/assets/Create.68c99c93.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/Create.68c99c93.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -1 +1 @@
 | 
				
			|||||||
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.01d0adc5.js";import{o as i,m as Y}from"./main.c43fbacd.js";function $(e){switch(e){case"./types/DateTimeType.vue":return i(()=>import("./DateTimeType.164ef007.js"),["assets/DateTimeType.164ef007.js","assets/vendor.01d0adc5.js"]);case"./types/DateType.vue":return i(()=>import("./DateType.757171f6.js"),["assets/DateType.757171f6.js","assets/vendor.01d0adc5.js"]);case"./types/DropdownType.vue":return i(()=>import("./DropdownType.631322dc.js"),["assets/DropdownType.631322dc.js","assets/vendor.01d0adc5.js"]);case"./types/InputType.vue":return i(()=>import("./InputType.4e1e4da6.js"),["assets/InputType.4e1e4da6.js","assets/vendor.01d0adc5.js"]);case"./types/NumberType.vue":return i(()=>import("./NumberType.137b13f5.js"),["assets/NumberType.137b13f5.js","assets/vendor.01d0adc5.js"]);case"./types/PhoneType.vue":return i(()=>import("./PhoneType.57e436b9.js"),["assets/PhoneType.57e436b9.js","assets/vendor.01d0adc5.js"]);case"./types/SwitchType.vue":return i(()=>import("./SwitchType.59d9fde0.js"),["assets/SwitchType.59d9fde0.js","assets/vendor.01d0adc5.js"]);case"./types/TextAreaType.vue":return i(()=>import("./TextAreaType.ebc60805.js"),["assets/TextAreaType.ebc60805.js","assets/vendor.01d0adc5.js"]);case"./types/TimeType.vue":return i(()=>import("./TimeType.a6077fcb.js"),["assets/TimeType.a6077fcb.js","assets/vendor.01d0adc5.js"]);case"./types/UrlType.vue":return i(()=>import("./UrlType.4a23df64.js"),["assets/UrlType.4a23df64.js","assets/vendor.01d0adc5.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 _};
 | 
					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 _};
 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -1 +1 @@
 | 
				
			|||||||
import{l as S,u as b,j as C,e as x,g}from"./main.c43fbacd.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 f,t as p,j as y}from"./vendor.01d0adc5.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(),d=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"),m=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(d).hasAbilities(e(g).EDIT_CUSTOMER)?(a(),s(D,{key:0,to:`/admin/customers/${i.row.id}/edit`},{default:t(()=>[n(m,null,{default:t(()=>[n(o,{name:"PencilIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),f(" "+p(r.$t("general.edit")),1)]),_:1})]),_:1},8,["to"])):y("",!0),e(h).name!=="customers.view"&&e(d).hasAbilities(e(g).VIEW_CUSTOMER)?(a(),s(D,{key:1,to:`customers/${i.row.id}/view`},{default:t(()=>[n(m,null,{default:t(()=>[n(o,{name:"EyeIcon",class:"w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"}),f(" "+p(r.$t("general.view")),1)]),_:1})]),_:1},8,["to"])):y("",!0),e(d).hasAbilities(e(g).DELETE_CUSTOMER)?(a(),s(m,{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"}),f(" "+p(r.$t("general.delete")),1)]),_:1})):y("",!0)]),_:1},8,["content-loading"])}}};export{V as _};
 | 
					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 _};
 | 
				
			||||||
							
								
								
									
										1
									
								
								public/build/assets/CustomerSettings.295ae76d.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/CustomerSettings.295ae76d.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								public/build/assets/Dashboard.f55bd37e.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/build/assets/Dashboard.f55bd37e.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -1 +1 @@
 | 
				
			|||||||
import{I as r,k as d,r as m,o as p,l as c,u as i,x as f}from"./vendor.01d0adc5.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};
 | 
					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};
 | 
				
			||||||
@ -1 +1 @@
 | 
				
			|||||||
import{I as r,k as d,r as m,o as p,l as c,u as f,x as i}from"./vendor.01d0adc5.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};
 | 
					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};
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user