Compare commits

..

25 Commits

Author SHA1 Message Date
dea73bcdf8 Refactor mail-sender 2023-03-17 18:54:58 +05:30
aececb8575 refactor mail sender 2023-03-16 11:48:15 +05:30
2bea727d19 fix migration and api changes 2023-03-14 17:45:58 +05:30
aede1f76d0 connect mail sender with api 2023-03-14 12:59:58 +05:30
959aa257b4 add mail sender in setting 2023-03-11 18:58:59 +05:30
b4aa254b68 add mail-sender abilities 2023-03-11 15:31:05 +05:30
c1f2af5174 add mail sender crud 2023-03-11 12:39:48 +05:30
05d5ce26fd Adds Zip to the required PHP Extension check (#1146)
* Ignore .DS_Store

* Checks for required ZIP extension
2023-02-19 11:42:34 +05:30
393fe20010 Fix incorrect invoice creation message (#1109)
Creation message now includes the views disk in its path.
2022-12-17 18:20:51 +05:30
57bdbd2897 feat: front-end files bulding (#1098)
Co-authored-by: Aramayis <>
2022-12-17 18:19:49 +05:30
7447cc24f9 feat: uffizzi integration (#1091)
Co-authored-by: Aramayis <>
2022-11-21 18:35:59 +05:30
889d22d92c Update php version (#1083)
Version 7.4 no longer works when running docker-compose/setup.sh. Updated to 8.1 in Dockerfile. Issue is now resolved and Crater sets up as expected without version conflicts.
2022-11-03 19:29:16 +05:30
bc8f2cd484 fix tax issue (#953)
* fix tax issue

* remove console log

* update cs fixer package
2022-10-26 19:51:36 +05:30
4e47f58bad fixed - No query results for model [Crater\Models\Currency] (#1070)
* fixed report pdf issue

* Removed telescope service provider file
2022-10-26 19:33:25 +05:30
d8c429912e fix composer issue with pest 2022-10-17 13:04:27 +05:30
0aaf0e7e75 Adding object-fit rules so thumbnail image does not appear stretched. (#1065) 2022-10-13 23:44:39 +05:30
3d0b89bb4d bug: fix missing hyphen in setup.sh (#1067)
Co-authored-by: Aramayis <>
2022-10-13 23:40:07 +05:30
38c4b9ebce Patch setup.sh script to deploy without plugins error. (#1034) 2022-09-13 14:52:51 +05:30
7be59e78e0 Formatting + Netherlands rename (#973)
* Formatting + Netherlands rename

* Revert change
2022-07-09 20:03:08 +05:30
204483836a 🌐Update: support Thai language (#768)
* add thai language config

* update thai translation

* update thai translation

* add THSarabunNew fonts to using in pdf

* update: pdf file to support thai language by checking isLocale('th') and include thai font-family

* update: thai translation

* remove the index.php file (not used)

* move THSarabunNew fonts to resoureces/static/fonts

* Add .gitkeep to storage/fonts to pre-build the fonts directory

Co-authored-by: Ritthikrai (Champ) Wiengchai <ritthikrai.w@aware.co.th>
2022-06-15 18:17:36 +05:30
33bc9ded65 Bump guzzlehttp/guzzle from 7.4.1 to 7.4.3 (#936)
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.1 to 7.4.3.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.4.1...7.4.3)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-05 14:10:27 +05:30
4271ef451e Php 8 compliant (#914) 2022-06-05 14:09:42 +05:30
6eb44fba93 Update cron.dockerfile (#949) 2022-06-05 14:09:11 +05:30
96e7300583 Make unit clearable (#918) 2022-05-28 11:55:09 +05:30
a479d966d1 Update en.json (#925)
Corrected sentence case from "Expiry date" to "Expiry Date"
2022-05-28 11:54:32 +05:30
131 changed files with 8670 additions and 8889 deletions

161
.github/workflows/uffizzi-build.yml vendored Normal file
View 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
View 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

2
.gitignore vendored
View File

@ -16,3 +16,5 @@ Homestead.yaml
.gitkeep .gitkeep
/public/docs /public/docs
/.scribe /.scribe
!storage/fonts/.gitkeep
.DS_Store

View File

@ -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

View File

@ -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);

View File

@ -0,0 +1,24 @@
<?php
namespace Crater\Http\Controllers\V1\Admin\MailSender;
use Crater\Http\Controllers\Controller;
use Crater\Http\Resources\MailSenderResource;
use Crater\Models\MailSender;
use Illuminate\Http\Request;
class GetAllMailSendersController extends Controller
{
/**
* Handle the incoming request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function __invoke(Request $request)
{
$mailSenders = MailSender::whereCompany()->get();
return MailSenderResource::collection($mailSenders);
}
}

View File

@ -0,0 +1,98 @@
<?php
namespace Crater\Http\Controllers\V1\Admin\MailSender;
use Crater\Http\Controllers\Controller;
use Crater\Http\Requests\MailSenderRequest;
use Crater\Http\Resources\MailSenderResource;
use Crater\Models\MailSender;
use Illuminate\Http\Request;
class MailSenderController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
$this->authorize('viewAny', MailSender::class);
$limit = $request->has('limit') ? $request->limit : 10;
$mailSenders = MailSender::whereCompany()
->applyFilters($request->all())
->paginateData($limit);
return (MailSenderResource::collection($mailSenders))
->additional(['meta' => [
'mail_sender_total_count' => MailSender::whereCompany()->count(),
]]);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(MailSenderRequest $request)
{
$this->authorize('create', MailSender::class);
$mailSender = MailSender::createFromRequest($request);
return new MailSenderResource($mailSender);
}
/**
* Display the specified resource.
*
* @param \Crater\Models\SenderMail $senderMail
* @return \Illuminate\Http\Response
*/
public function show(MailSender $mailSender)
{
$this->authorize('view', $mailSender);
return new MailSenderResource($mailSender);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \Crater\Models\SenderMail $senderMail
* @return \Illuminate\Http\Response
*/
public function update(MailSenderRequest $request, MailSender $mailSender)
{
$this->authorize('update', $mailSender);
$mailSender->updateFromRequest($request);
return new MailSenderResource($mailSender);
}
/**
* Remove the specified resource from storage.
*
* @param \Crater\Models\SenderMail $senderMail
* @return \Illuminate\Http\Response
*/
public function destroy(MailSender $mailSender)
{
$this->authorize('delete', $mailSender);
if ($mailSender->is_default) {
return respondJson('You can\'t remove default mail sender.', 'You can\'t remove default mail sender.');
}
$mailSender->delete();
return response()->json([
'success' => true,
]);
}
}

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -3,80 +3,29 @@
namespace Crater\Http\Controllers\V1\Admin\Settings; namespace Crater\Http\Controllers\V1\Admin\Settings;
use Crater\Http\Controllers\Controller; use Crater\Http\Controllers\Controller;
use Crater\Http\Requests\MailEnvironmentRequest; use Crater\Http\Requests\TestMailDriverRequest;
use Crater\Mail\TestMail; use Crater\Mail\TestMail;
use Crater\Models\Setting; use Crater\Models\MailSender;
use Crater\Space\EnvironmentManager;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Mail; use Mail;
class MailConfigurationController extends Controller class MailConfigurationController extends Controller
{ {
/** public function TestMailDriver(TestMailDriverRequest $request)
* @var EnvironmentManager
*/
protected $environmentManager;
/**
* @param EnvironmentManager $environmentManager
*/
public function __construct(EnvironmentManager $environmentManager)
{
$this->environmentManager = $environmentManager;
}
/**
*
* @param MailEnvironmentRequest $request
* @return JsonResponse
*/
public function saveMailEnvironment(MailEnvironmentRequest $request)
{ {
$this->authorize('manage email config'); $this->authorize('manage email config');
$setting = Setting::getSetting('profile_complete'); MailSender::setMailConfiguration($request->mail_sender_id);
$results = $this->environmentManager->saveMailVariables($request);
if ($setting !== 'COMPLETED') { Mail::to($request->to)->send(new TestMail($request->subject, $request->message));
Setting::setSetting('profile_complete', 4);
}
return response()->json($results); return response()->json([
'success' => true,
]);
} }
public function getMailEnvironment() public function getMailDrivers(Request $request)
{ {
$this->authorize('manage email config');
$MailData = [
'mail_driver' => config('mail.driver'),
'mail_host' => config('mail.host'),
'mail_port' => config('mail.port'),
'mail_username' => config('mail.username'),
'mail_password' => config('mail.password'),
'mail_encryption' => config('mail.encryption'),
'from_name' => config('mail.from.name'),
'from_mail' => config('mail.from.address'),
'mail_mailgun_endpoint' => config('services.mailgun.endpoint'),
'mail_mailgun_domain' => config('services.mailgun.domain'),
'mail_mailgun_secret' => config('services.mailgun.secret'),
'mail_ses_key' => config('services.ses.key'),
'mail_ses_secret' => config('services.ses.secret'),
];
return response()->json($MailData);
}
/**
*
* @return JsonResponse
*/
public function getMailDrivers()
{
$this->authorize('manage email config');
$drivers = [ $drivers = [
'smtp', 'smtp',
'mail', 'mail',
@ -87,21 +36,4 @@ class MailConfigurationController extends Controller
return response()->json($drivers); return response()->json($drivers);
} }
public function testEmailConfig(Request $request)
{
$this->authorize('manage email config');
$this->validate($request, [
'to' => 'required|email',
'subject' => 'required',
'message' => 'required',
]);
Mail::to($request->to)->send(new TestMail($request->subject, $request->message));
return response()->json([
'success' => true,
]);
}
} }

View File

@ -9,6 +9,7 @@ use Crater\Models\CompanySetting;
use Crater\Models\Customer; use Crater\Models\Customer;
use Crater\Models\EmailLog; use Crater\Models\EmailLog;
use Crater\Models\Estimate; use Crater\Models\Estimate;
use Crater\Models\MailSender;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class EstimatePdfController extends Controller class EstimatePdfController extends Controller
@ -27,14 +28,16 @@ class EstimatePdfController extends Controller
); );
if ($notifyEstimateViewed == 'YES') { if ($notifyEstimateViewed == 'YES') {
$data['estimate'] = Estimate::findOrFail($estimate->id)->toArray(); $notificationEmail = CompanySetting::getSetting('notification_email', $estimate->company_id);
$data['user'] = Customer::find($estimate->customer_id)->toArray(); $mailSender = MailSender::where('company_id', $estimate->company_id)->where('is_default', true)->first();
$notificationEmail = CompanySetting::getSetting( MailSender::setMailConfiguration($mailSender->id);
'notification_email',
$estimate->company_id
);
\Mail::to($notificationEmail)->send(new EstimateViewedMail($data)); $data['from_address'] = $mailSender->from_address;
$data['from_name'] = $mailSender->from_name;
$data['user'] = Customer::find($estimate->customer_id)->toArray();
$data['estimate'] = Estimate::findOrFail($estimate->id)->toArray();
send_mail(new EstimateViewedMail($data), $mailSender, $notificationEmail);
} }
} }

View File

@ -9,6 +9,7 @@ use Crater\Models\CompanySetting;
use Crater\Models\Customer; use Crater\Models\Customer;
use Crater\Models\EmailLog; use Crater\Models\EmailLog;
use Crater\Models\Invoice; use Crater\Models\Invoice;
use Crater\Models\MailSender;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class InvoicePdfController extends Controller class InvoicePdfController extends Controller
@ -28,14 +29,16 @@ class InvoicePdfController extends Controller
); );
if ($notifyInvoiceViewed == 'YES') { if ($notifyInvoiceViewed == 'YES') {
$notificationEmail = CompanySetting::getSetting('notification_email', $invoice->company_id);
$mailSender = MailSender::where('company_id', $invoice->company_id)->where('is_default', true)->first();
MailSender::setMailConfiguration($mailSender->id);
$data['from_address'] = $mailSender->from_address;
$data['from_name'] = $mailSender->from_name;
$data['invoice'] = Invoice::findOrFail($invoice->id)->toArray(); $data['invoice'] = Invoice::findOrFail($invoice->id)->toArray();
$data['user'] = Customer::find($invoice->customer_id)->toArray(); $data['user'] = Customer::find($invoice->customer_id)->toArray();
$notificationEmail = CompanySetting::getSetting(
'notification_email',
$invoice->company_id
);
\Mail::to($notificationEmail)->send(new InvoiceViewedMail($data)); send_mail(new InvoiceViewedMail($data), $mailSender, $notificationEmail);
} }
} }

View File

@ -4,6 +4,7 @@ namespace Crater\Http\Middleware;
use Closure; use Closure;
use Crater\Models\FileDisk; use Crater\Models\FileDisk;
use Crater\Models\MailSender;
class ConfigMiddleware class ConfigMiddleware
{ {
@ -28,6 +29,12 @@ class ConfigMiddleware
} }
} }
$default_mail_sender = MailSender::where('company_id', $request->header('company'))->where('is_default', true)->first();
if ($default_mail_sender) {
$default_mail_sender->setMailConfiguration($default_mail_sender->id);
}
return $next($request); return $next($request);
} }
} }

View File

@ -0,0 +1,85 @@
<?php
namespace Crater\Http\Requests;
use Illuminate\Validation\Rule;
use Illuminate\Foundation\Http\FormRequest;
class MailSenderRequest 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()
{
$rules = [
'name' => [
'required',
Rule::unique('mail_senders')
->where('company_id', $this->header('company'))
],
'driver' => [
'required',
],
'is_default' => [
'nullable'
],
'bcc' => [
'nullable'
],
'cc' => [
'nullable'
],
'from_address' => [
'nullable'
],
'from_name' => [
'nullable'
],
'settings' => [
'nullable'
],
'settings.*' => [
'nullable'
]
];
if ($this->isMethod('PUT')) {
$rules['name'] = [
'nullable',
Rule::unique('mail_senders')
->ignore($this->route('mail_sender')->id)
->where('company_id', $this->header('company'))
];
}
return $rules;
}
public function getMailSenderPayload()
{
$data = $this->validated();
if ($data['settings'] && $data['settings']['encryption'] == 'none') {
$data['settings']['encryption'] = '';
}
return collect($data)
->merge([
'company_id' => $this->header('company'),
])
->toArray();
}
}

View File

@ -30,7 +30,7 @@ class SendEstimatesRequest extends FormRequest
'body' => [ 'body' => [
'required', 'required',
], ],
'from' => [ 'mail_sender_id' => [
'required', 'required',
], ],
'to' => [ 'to' => [

View File

@ -30,7 +30,7 @@ class SendInvoiceRequest extends FormRequest
'subject' => [ 'subject' => [
'required', 'required',
], ],
'from' => [ 'mail_sender_id' => [
'required', 'required',
], ],
'to' => [ 'to' => [

View File

@ -30,7 +30,7 @@ class SendPaymentRequest extends FormRequest
'body' => [ 'body' => [
'required', 'required',
], ],
'from' => [ 'mail_sender_id' => [
'required', 'required',
], ],
'to' => [ 'to' => [

View File

@ -0,0 +1,39 @@
<?php
namespace Crater\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class TestMailDriverRequest 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 [
'to' => [
'required',
'email'
],
'subject' => [
'required'
],
'message' => [
'required'
],
];
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace Crater\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class MailSenderResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
return [
'id' => $this->id,
'name' => $this->name,
'driver' => $this->driver,
'is_default' => $this->is_default,
'bcc' => $this->bcc,
'cc' => $this->cc,
'from_address' => $this->from_address,
'from_name' => $this->from_name,
'company_id' => $this->company_id,
'settings' => $this->settings
];
}
}

View File

@ -30,7 +30,7 @@ class EstimateViewedMail extends Mailable
*/ */
public function build() public function build()
{ {
return $this->from(config('mail.from.address'), config('mail.from.name')) return $this->from($this->data['from_address'], $this->data['from_name'])
->markdown('emails.viewed.estimate', ['data', $this->data]); ->markdown('emails.viewed.estimate', ['data', $this->data]);
} }
} }

View File

@ -30,7 +30,7 @@ class InvoiceViewedMail extends Mailable
*/ */
public function build() public function build()
{ {
return $this->from(config('mail.from.address'), config('mail.from.name')) return $this->from($this->data['from_address'], $this->data['from_name'])
->markdown('emails.viewed.invoice', ['data', $this->data]); ->markdown('emails.viewed.invoice', ['data', $this->data]);
} }
} }

View File

@ -34,7 +34,7 @@ class SendEstimateMail extends Mailable
public function build() public function build()
{ {
$log = EmailLog::create([ $log = EmailLog::create([
'from' => $this->data['from'], 'from' => $this->data['from_address'],
'to' => $this->data['to'], 'to' => $this->data['to'],
'subject' => $this->data['subject'], 'subject' => $this->data['subject'],
'body' => $this->data['body'], 'body' => $this->data['body'],
@ -47,9 +47,10 @@ class SendEstimateMail extends Mailable
$this->data['url'] = route('estimate', ['email_log' => $log->token]); $this->data['url'] = route('estimate', ['email_log' => $log->token]);
$mailContent = $this->from($this->data['from'], config('mail.from.name')) $mailContent = $this->from($this->data['from_address'], $this->data['from_name'])
->subject($this->data['subject']) ->subject($this->data['subject'])
->markdown('emails.send.estimate', ['data', $this->data]); ->markdown("emails.send.estimate", ['data', $this->data]);
if ($this->data['attach']['data']) { if ($this->data['attach']['data']) {
$mailContent->attachData( $mailContent->attachData(

View File

@ -34,7 +34,7 @@ class SendInvoiceMail extends Mailable
public function build() public function build()
{ {
$log = EmailLog::create([ $log = EmailLog::create([
'from' => $this->data['from'], 'from' => $this->data['from_address'],
'to' => $this->data['to'], 'to' => $this->data['to'],
'subject' => $this->data['subject'], 'subject' => $this->data['subject'],
'body' => $this->data['body'], 'body' => $this->data['body'],
@ -47,9 +47,9 @@ class SendInvoiceMail extends Mailable
$this->data['url'] = route('invoice', ['email_log' => $log->token]); $this->data['url'] = route('invoice', ['email_log' => $log->token]);
$mailContent = $this->from($this->data['from'], config('mail.from.name')) $mailContent = $this->from($this->data['from_address'], $this->data['from_name'])
->subject($this->data['subject']) ->subject($this->data['subject'])
->markdown('emails.send.invoice', ['data', $this->data]); ->markdown("emails.send.invoice", ['data', $this->data]);
if ($this->data['attach']['data']) { if ($this->data['attach']['data']) {
$mailContent->attachData( $mailContent->attachData(

View File

@ -34,7 +34,7 @@ class SendPaymentMail extends Mailable
public function build() public function build()
{ {
$log = EmailLog::create([ $log = EmailLog::create([
'from' => $this->data['from'], 'from' => $this->data['from_address'],
'to' => $this->data['to'], 'to' => $this->data['to'],
'subject' => $this->data['subject'], 'subject' => $this->data['subject'],
'body' => $this->data['body'], 'body' => $this->data['body'],
@ -47,9 +47,9 @@ class SendPaymentMail extends Mailable
$this->data['url'] = route('payment', ['email_log' => $log->token]); $this->data['url'] = route('payment', ['email_log' => $log->token]);
$mailContent = $this->from($this->data['from'], config('mail.from.name')) $mailContent = $this->from($this->data['from_address'], $this->data['from_name'])
->subject($this->data['subject']) ->subject($this->data['subject'])
->markdown('emails.send.payment', ['data', $this->data]); ->markdown("emails.send.payment", ['data', $this->data]);
if ($this->data['attach']['data']) { if ($this->data['attach']['data']) {
$mailContent->attachData( $mailContent->attachData(

View File

@ -5,10 +5,10 @@ namespace Crater\Models;
use App; use App;
use Barryvdh\DomPDF\Facade as PDF; use Barryvdh\DomPDF\Facade as PDF;
use Carbon\Carbon; use Carbon\Carbon;
use Crater\Mail\SendEstimateMail;
use Crater\Services\SerialNumberFormatter; use Crater\Services\SerialNumberFormatter;
use Crater\Traits\GeneratesPdfTrait; use Crater\Traits\GeneratesPdfTrait;
use Crater\Traits\HasCustomFieldsTrait; use Crater\Traits\HasCustomFieldsTrait;
use Crater\Traits\MailTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
@ -20,6 +20,7 @@ use Vinkla\Hashids\Facades\Hashids;
class Estimate extends Model implements HasMedia class Estimate extends Model implements HasMedia
{ {
use HasFactory; use HasFactory;
use MailTrait;
use InteractsWithMedia; use InteractsWithMedia;
use GeneratesPdfTrait; use GeneratesPdfTrait;
use HasCustomFieldsTrait; use HasCustomFieldsTrait;
@ -363,7 +364,7 @@ class Estimate extends Model implements HasMedia
$this->save(); $this->save();
} }
\Mail::to($data['to'])->send(new SendEstimateMail($data)); $this->setMail('estimate', $data);
return [ return [
'success' => true, 'success' => true,

View File

@ -9,6 +9,7 @@ use Crater\Mail\SendInvoiceMail;
use Crater\Services\SerialNumberFormatter; use Crater\Services\SerialNumberFormatter;
use Crater\Traits\GeneratesPdfTrait; use Crater\Traits\GeneratesPdfTrait;
use Crater\Traits\HasCustomFieldsTrait; use Crater\Traits\HasCustomFieldsTrait;
use Crater\Traits\MailTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
@ -21,6 +22,7 @@ use Vinkla\Hashids\Facades\Hashids;
class Invoice extends Model implements HasMedia class Invoice extends Model implements HasMedia
{ {
use HasFactory; use HasFactory;
use MailTrait;
use InteractsWithMedia; use InteractsWithMedia;
use GeneratesPdfTrait; use GeneratesPdfTrait;
use HasCustomFieldsTrait; use HasCustomFieldsTrait;
@ -464,7 +466,7 @@ class Invoice extends Model implements HasMedia
{ {
$data = $this->sendInvoiceData($data); $data = $this->sendInvoiceData($data);
\Mail::to($data['to'])->send(new SendInvoiceMail($data)); $this->setMail('invoice', $data);
if ($this->status == Invoice::STATUS_DRAFT) { if ($this->status == Invoice::STATUS_DRAFT) {
$this->status = Invoice::STATUS_SENT; $this->status = Invoice::STATUS_SENT;

111
app/Models/MailSender.php Normal file
View File

@ -0,0 +1,111 @@
<?php
namespace Crater\Models;
use Crater\Http\Requests\MailSenderRequest;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Config;
class MailSender extends Model
{
use HasFactory;
protected $guarded = [
'id'
];
protected $casts = [
'settings' => 'array',
'is_default' => 'boolean'
];
public function company()
{
return $this->belongsTo(Company::class);
}
public function scopeWhereOrder($query, $orderByField, $orderBy)
{
$query->orderBy($orderByField, $orderBy);
}
public function scopeApplyFilters($query, array $filters)
{
$filters = collect($filters);
if ($filters->get('orderByField') || $filters->get('orderBy')) {
$field = $filters->get('orderByField') ? $filters->get('orderByField') : 'name';
$orderBy = $filters->get('orderBy') ? $filters->get('orderBy') : 'desc';
$query->whereOrder($field, $orderBy);
}
}
public function scopePaginateData($query, $limit)
{
if ($limit == 'all') {
return $query->get();
}
return $query->paginate($limit);
}
public function scopeWhereCompany($query)
{
$query->where('mail_senders.company_id', request()->header('company'));
}
public static function createFromRequest(MailSenderRequest $request)
{
$senderMail = self::create($request->getMailSenderPayload());
if ($request->is_default) {
$senderMail->removeOtherDefaultMailSenders($request);
}
return $senderMail;
}
public function updateFromRequest(MailSenderRequest $request)
{
$data = $request->getMailSenderPayload();
$this->update($data);
if ($request->is_default) {
$this->removeOtherDefaultMailSenders($request);
}
return $this;
}
public static function setMailConfiguration($id, $check = null)
{
$mailSender = MailSender::find($id);
$settings = $mailSender->settings;
$settings['driver'] = $mailSender->driver;
$settings['from'] = [
'address' => $mailSender->from_address,
'name' => $mailSender->from_name
];
$settings['sendmail'] = config('mail.sendmail');
$settings['markdown'] = config('mail.markdown');
$settings['log_channel'] = config('mail.log_channel');
Config::set('mail', $settings);
if ($check) {
return $mailSender;
}
return true;
}
public function removeOtherDefaultMailSenders($request) {
MailSender::where('company_id', $request->header('company'))
->where('is_default', true)
->where('id', '<>', $this->id)
->update(['is_default' => false]);
}
}

View File

@ -5,10 +5,10 @@ namespace Crater\Models;
use Barryvdh\DomPDF\Facade as PDF; use Barryvdh\DomPDF\Facade as PDF;
use Carbon\Carbon; use Carbon\Carbon;
use Crater\Jobs\GeneratePaymentPdfJob; use Crater\Jobs\GeneratePaymentPdfJob;
use Crater\Mail\SendPaymentMail;
use Crater\Services\SerialNumberFormatter; use Crater\Services\SerialNumberFormatter;
use Crater\Traits\GeneratesPdfTrait; use Crater\Traits\GeneratesPdfTrait;
use Crater\Traits\HasCustomFieldsTrait; use Crater\Traits\HasCustomFieldsTrait;
use Crater\Traits\MailTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\HasMedia;
@ -18,6 +18,7 @@ use Vinkla\Hashids\Facades\Hashids;
class Payment extends Model implements HasMedia class Payment extends Model implements HasMedia
{ {
use HasFactory; use HasFactory;
use MailTrait;
use InteractsWithMedia; use InteractsWithMedia;
use GeneratesPdfTrait; use GeneratesPdfTrait;
use HasCustomFieldsTrait; use HasCustomFieldsTrait;
@ -135,7 +136,7 @@ class Payment extends Model implements HasMedia
{ {
$data = $this->sendPaymentData($data); $data = $this->sendPaymentData($data);
\Mail::to($data['to'])->send(new SendPaymentMail($data)); $this->setMail('payment', $data);
return [ return [
'success' => true, 'success' => true,

View File

@ -0,0 +1,123 @@
<?php
namespace Crater\Policies;
use Crater\Models\MailSender;
use Crater\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Silber\Bouncer\BouncerFacade;
class MailSenderPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @param \Crater\Models\User $user
* @return \Illuminate\Auth\Access\Response|bool
*/
public function viewAny(User $user)
{
if (BouncerFacade::can('view-mail-sender', MailSender::class)) {
return true;
}
return false;
}
/**
* Determine whether the user can view the model.
*
* @param \Crater\Models\User $user
* @param \Crater\Models\MailSender $mailSender
* @return \Illuminate\Auth\Access\Response|bool
*/
public function view(User $user, MailSender $mailSender)
{
if (BouncerFacade::can('view-mail-sender', $mailSender) && $user->hasCompany($mailSender->company_id)) {
return true;
}
return false;
}
/**
* Determine whether the user can create models.
*
* @param \Crater\Models\User $user
* @return \Illuminate\Auth\Access\Response|bool
*/
public function create(User $user)
{
if (BouncerFacade::can('create-mail-sender', MailSender::class)) {
return true;
}
return false;
}
/**
* Determine whether the user can update the model.
*
* @param \Crater\Models\User $user
* @param \Crater\Models\MailSender $mailSender
* @return \Illuminate\Auth\Access\Response|bool
*/
public function update(User $user, MailSender $mailSender)
{
if (BouncerFacade::can('edit-mail-sender', $mailSender) && $user->hasCompany($mailSender->company_id)) {
return true;
}
return false;
}
/**
* Determine whether the user can delete the model.
*
* @param \Crater\Models\User $user
* @param \Crater\Models\MailSender $mailSender
* @return \Illuminate\Auth\Access\Response|bool
*/
public function delete(User $user, MailSender $mailSender)
{
if (BouncerFacade::can('delete-mail-sender', $mailSender) && $user->hasCompany($mailSender->company_id)) {
return true;
}
return false;
}
/**
* Determine whether the user can restore the model.
*
* @param \Crater\Models\User $user
* @param \Crater\Models\MailSender $mailSender
* @return \Illuminate\Auth\Access\Response|bool
*/
public function restore(User $user, MailSender $mailSender)
{
if (BouncerFacade::can('delete-mail-sender', $mailSender) && $user->hasCompany($mailSender->company_id)) {
return true;
}
return false;
}
/**
* Determine whether the user can permanently delete the model.
*
* @param \Crater\Models\User $user
* @param \Crater\Models\MailSender $mailSender
* @return \Illuminate\Auth\Access\Response|bool
*/
public function forceDelete(User $user, MailSender $mailSender)
{
if (BouncerFacade::can('delete-mail-sender', $mailSender) && $user->hasCompany($mailSender->company_id)) {
return true;
}
return false;
}
}

View File

@ -39,6 +39,7 @@ class AuthServiceProvider extends ServiceProvider
\Crater\Models\CustomField::class => \Crater\Policies\CustomFieldPolicy::class, \Crater\Models\CustomField::class => \Crater\Policies\CustomFieldPolicy::class,
\Crater\Models\User::class => \Crater\Policies\UserPolicy::class, \Crater\Models\User::class => \Crater\Policies\UserPolicy::class,
\Crater\Models\Item::class => \Crater\Policies\ItemPolicy::class, \Crater\Models\Item::class => \Crater\Policies\ItemPolicy::class,
\Crater\Models\MailSender::class => \Crater\Policies\MailSenderPolicy::class,
\Silber\Bouncer\Database\Role::class => \Crater\Policies\RolePolicy::class, \Silber\Bouncer\Database\Role::class => \Crater\Policies\RolePolicy::class,
\Crater\Models\Unit::class => \Crater\Policies\UnitPolicy::class, \Crater\Models\Unit::class => \Crater\Policies\UnitPolicy::class,
\Crater\Models\RecurringInvoice::class => \Crater\Policies\RecurringInvoicePolicy::class, \Crater\Models\RecurringInvoice::class => \Crater\Policies\RecurringInvoicePolicy::class,

View File

@ -223,204 +223,6 @@ class EnvironmentManager
return false; return false;
} }
/**
* Save the mail content to the .env file.
*
* @param Request $request
* @return array
*/
public function saveMailVariables(MailEnvironmentRequest $request)
{
$mailData = $this->getMailData($request);
try {
file_put_contents($this->envPath, str_replace(
$mailData['old_mail_data'],
$mailData['new_mail_data'],
file_get_contents($this->envPath)
));
if ($mailData['extra_old_mail_data']) {
file_put_contents($this->envPath, str_replace(
$mailData['extra_old_mail_data'],
$mailData['extra_mail_data'],
file_get_contents($this->envPath)
));
} else {
file_put_contents(
$this->envPath,
"\n".$mailData['extra_mail_data'],
FILE_APPEND
);
}
} catch (Exception $e) {
return [
'error' => 'mail_variables_save_error',
];
}
return [
'success' => 'mail_variables_save_successfully',
];
}
private function getMailData($request)
{
$mailFromCredential = "";
$extraMailData = "";
$extraOldMailData = "";
$oldMailData = "";
$newMailData = "";
if (env('MAIL_FROM_ADDRESS') !== null && env('MAIL_FROM_NAME') !== null) {
$mailFromCredential =
'MAIL_FROM_ADDRESS='.config('mail.from.address')."\n".
'MAIL_FROM_NAME="'.config('mail.from.name')."\"\n\n";
}
switch ($request->mail_driver) {
case 'smtp':
$oldMailData =
'MAIL_DRIVER='.config('mail.driver')."\n".
'MAIL_HOST='.config('mail.host')."\n".
'MAIL_PORT='.config('mail.port')."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.config('mail.encryption')."\n\n".
$mailFromCredential;
$newMailData =
'MAIL_DRIVER='.$request->mail_driver."\n".
'MAIL_HOST='.$request->mail_host."\n".
'MAIL_PORT='.$request->mail_port."\n".
'MAIL_USERNAME='.$request->mail_username."\n".
'MAIL_PASSWORD='.$request->mail_password."\n".
'MAIL_ENCRYPTION='.$request->mail_encryption."\n\n".
'MAIL_FROM_ADDRESS='.$request->from_mail."\n".
'MAIL_FROM_NAME="'.$request->from_name."\"\n\n";
break;
case 'mailgun':
$oldMailData =
'MAIL_DRIVER='.config('mail.driver')."\n".
'MAIL_HOST='.config('mail.host')."\n".
'MAIL_PORT='.config('mail.port')."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.config('mail.encryption')."\n\n".
$mailFromCredential;
$newMailData =
'MAIL_DRIVER='.$request->mail_driver."\n".
'MAIL_HOST='.$request->mail_host."\n".
'MAIL_PORT='.$request->mail_port."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.$request->mail_encryption."\n\n".
'MAIL_FROM_ADDRESS='.$request->from_mail."\n".
'MAIL_FROM_NAME="'.$request->from_name."\"\n\n";
$extraMailData =
'MAILGUN_DOMAIN='.$request->mail_mailgun_domain."\n".
'MAILGUN_SECRET='.$request->mail_mailgun_secret."\n".
'MAILGUN_ENDPOINT='.$request->mail_mailgun_endpoint."\n";
if (env('MAILGUN_DOMAIN') !== null && env('MAILGUN_SECRET') !== null && env('MAILGUN_ENDPOINT') !== null) {
$extraOldMailData =
'MAILGUN_DOMAIN='.config('services.mailgun.domain')."\n".
'MAILGUN_SECRET='.config('services.mailgun.secret')."\n".
'MAILGUN_ENDPOINT='.config('services.mailgun.endpoint')."\n";
}
break;
case 'ses':
$oldMailData =
'MAIL_DRIVER='.config('mail.driver')."\n".
'MAIL_HOST='.config('mail.host')."\n".
'MAIL_PORT='.config('mail.port')."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.config('mail.encryption')."\n\n".
$mailFromCredential;
$newMailData =
'MAIL_DRIVER='.$request->mail_driver."\n".
'MAIL_HOST='.$request->mail_host."\n".
'MAIL_PORT='.$request->mail_port."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.$request->mail_encryption."\n\n".
'MAIL_FROM_ADDRESS='.$request->from_mail."\n".
'MAIL_FROM_NAME="'.$request->from_name."\"\n\n";
$extraMailData =
'SES_KEY='.$request->mail_ses_key."\n".
'SES_SECRET='.$request->mail_ses_secret."\n";
if (env('SES_KEY') !== null && env('SES_SECRET') !== null) {
$extraOldMailData =
'SES_KEY='.config('services.ses.key')."\n".
'SES_SECRET='.config('services.ses.secret')."\n";
}
break;
case 'mail':
$oldMailData =
'MAIL_DRIVER='.config('mail.driver')."\n".
'MAIL_HOST='.config('mail.host')."\n".
'MAIL_PORT='.config('mail.port')."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.config('mail.encryption')."\n\n".
$mailFromCredential;
$newMailData =
'MAIL_DRIVER='.$request->mail_driver."\n".
'MAIL_HOST='.config('mail.host')."\n".
'MAIL_PORT='.config('mail.port')."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.config('mail.encryption')."\n\n".
'MAIL_FROM_ADDRESS='.$request->from_mail."\n".
'MAIL_FROM_NAME="'.$request->from_name."\"\n\n";
break;
case 'sendmail':
$oldMailData =
'MAIL_DRIVER='.config('mail.driver')."\n".
'MAIL_HOST='.config('mail.host')."\n".
'MAIL_PORT='.config('mail.port')."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.config('mail.encryption')."\n\n".
$mailFromCredential;
$newMailData =
'MAIL_DRIVER='.$request->mail_driver."\n".
'MAIL_HOST='.config('mail.host')."\n".
'MAIL_PORT='.config('mail.port')."\n".
'MAIL_USERNAME='.config('mail.username')."\n".
'MAIL_PASSWORD='.config('mail.password')."\n".
'MAIL_ENCRYPTION='.config('mail.encryption')."\n\n".
'MAIL_FROM_ADDRESS='.$request->from_mail."\n".
'MAIL_FROM_NAME="'.$request->from_name."\"\n\n";
break;
}
return [
'old_mail_data' => $oldMailData,
'new_mail_data' => $newMailData,
'extra_mail_data' => $extraMailData,
'extra_old_mail_data' => $extraOldMailData,
];
}
/** /**
* Save the disk content to the .env file. * Save the disk content to the .env file.
* *

View File

@ -5,6 +5,7 @@ use Crater\Models\Currency;
use Crater\Models\CustomField; use Crater\Models\CustomField;
use Crater\Models\Setting; use Crater\Models\Setting;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Illuminate\Mail\Mailable;
/** /**
* Get company setting * Get company setting
@ -70,6 +71,42 @@ function set_active($path, $active = 'active')
return call_user_func_array('Request::is', (array)$path) ? $active : ''; return call_user_func_array('Request::is', (array)$path) ? $active : '';
} }
/**
* Send Mail
*
* @param Mailable $mailable
* @param object $mailSender
* @return string $to
*/
function send_mail(Mailable $mailable, object $mailSender = null, string $to)
{
if ($mailSender->bcc && $mailSender->cc) {
\Mail::to($to)
->bcc(explode(',', $mailSender->bcc))
->cc(explode(',', $mailSender->cc))
->send($mailable);
}
if ($mailSender->bcc && $mailSender->cc == null) {
\Mail::to($to)
->bcc(explode(',', $mailSender->bcc))
->send($mailable);
}
if ($mailSender->bcc == null && $mailSender->cc) {
\Mail::to($to)
->cc(explode(',', $mailSender->cc))
->send($mailable);
}
if ($mailSender->bcc == null && $mailSender->cc == null) {
\Mail::to($to)
->send($mailable);
}
return true;
}
/** /**
* @param $path * @param $path
* @return mixed * @return mixed

40
app/Traits/MailTrait.php Normal file
View File

@ -0,0 +1,40 @@
<?php
namespace Crater\Traits;
use Crater\Mail\EstimateViewedMail;
use Crater\Mail\InvoiceViewedMail;
use Crater\Mail\SendEstimateMail;
use Crater\Mail\SendInvoiceMail;
use Crater\Mail\SendPaymentMail;
use Crater\Models\MailSender;
trait MailTrait
{
public function setMail($model, $data)
{
$mailSender = MailSender::setMailConfiguration($data['mail_sender_id'], true);
$data['from_address'] = $mailSender->from_address;
$data['from_name'] = $mailSender->from_name;
switch ($model) {
case 'invoice':
send_mail(new SendInvoiceMail($data), $mailSender, $data['to']);
break;
case 'estimate':
send_mail(new SendEstimateMail($data), $mailSender, $data['to']);
break;
case 'payment':
send_mail(new SendPaymentMail($data), $mailSender, $data['to']);
break;
}
return true;
}
}

View File

@ -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,11 +81,14 @@
"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": {
"dont-discover": [] "dont-discover": []
} }
} }
} }

2347
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@ use Crater\Models\ExchangeRateProvider;
use Crater\Models\Expense; use Crater\Models\Expense;
use Crater\Models\Invoice; use Crater\Models\Invoice;
use Crater\Models\Item; use Crater\Models\Item;
use Crater\Models\MailSender;
use Crater\Models\Note; use Crater\Models\Note;
use Crater\Models\Payment; use Crater\Models\Payment;
use Crater\Models\RecurringInvoice; use Crater\Models\RecurringInvoice;
@ -397,6 +398,41 @@ return [
] ]
], ],
// Mail Sender
[
"name" => "view mail sender",
"ability" => "view-mail-sender",
"model" => MailSender::class,
'owner_only' => false,
],
[
"name" => "create mail sender",
"ability" => "create-mail-sender",
"model" => MailSender::class,
'owner_only' => false,
"depends_on" => [
'view-mail-sender',
]
],
[
"name" => "edit mail sender",
"ability" => "edit-mail-sender",
"model" => MailSender::class,
'owner_only' => false,
"depends_on" => [
'view-mail-sender',
]
],
[
"name" => "delete mail sender",
"ability" => "delete-mail-sender",
"model" => MailSender::class,
'owner_only' => false,
"depends_on" => [
'view-mail-sender',
]
],
// Settings // Settings
[ [
"name" => "view company dashboard", "name" => "view company dashboard",

View File

@ -7,6 +7,7 @@ use Crater\Models\ExchangeRateProvider;
use Crater\Models\Expense; use Crater\Models\Expense;
use Crater\Models\Invoice; use Crater\Models\Invoice;
use Crater\Models\Item; use Crater\Models\Item;
use Crater\Models\MailSender;
use Crater\Models\Note; use Crater\Models\Note;
use Crater\Models\Payment; use Crater\Models\Payment;
use Crater\Models\RecurringInvoice; use Crater\Models\RecurringInvoice;
@ -71,6 +72,7 @@ return [
["code" => "cs", "name" => "Czech"], ["code" => "cs", "name" => "Czech"],
["code" => "el", "name" => "Greek"], ["code" => "el", "name" => "Greek"],
["code" => "hr", "name" => "Crotian"], ["code" => "hr", "name" => "Crotian"],
["code" => "th", "name" => "ไทย"],
], ],
/* /*
@ -224,6 +226,17 @@ return [
'ability' => 'view-all-notes', 'ability' => 'view-all-notes',
'model' => Note::class 'model' => Note::class
], ],
[
'title' => 'settings.menu_title.mail_sender',
'group' => '',
'name' => 'Mail Sender',
'link' => '/admin/settings/mail-sender',
'icon' => 'MailIcon',
'owner_only' => false,
'ability' => 'view-mail-sender',
'model' => MailSender::class
],
[ [
'title' => 'settings.menu_title.expense_category', 'title' => 'settings.menu_title.expense_category',
'group' => '', 'group' => '',
@ -234,16 +247,6 @@ return [
'ability' => 'view-expense', 'ability' => 'view-expense',
'model' => Expense::class 'model' => Expense::class
], ],
[
'title' => 'settings.mail.mail_config',
'group' => '',
'name' => 'Mail Configuration',
'link' => '/admin/settings/mail-configuration',
'icon' => 'MailIcon',
'owner_only' => true,
'ability' => '',
'model' => ''
],
[ [
'title' => 'settings.menu_title.file_disk', 'title' => 'settings.menu_title.file_disk',
'group' => '', 'group' => '',
@ -274,6 +277,7 @@ return [
'ability' => '', 'ability' => '',
'model' => '' 'model' => ''
], ],
], ],
/* /*

View File

@ -27,6 +27,7 @@ return [
'tokenizer', 'tokenizer',
'JSON', 'JSON',
'cURL', 'cURL',
'zip',
], ],
'apache' => [ 'apache' => [
'mod_rewrite', 'mod_rewrite',

View File

@ -0,0 +1,106 @@
<?php
use Crater\Models\Company;
use Crater\Models\MailSender;
use Crater\Models\User;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Silber\Bouncer\BouncerFacade;
class CreateMailSendersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mail_senders', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('driver');
$table->boolean('is_default')->default(false);
$table->string('bcc')->nullable();
$table->string('cc')->nullable();
$table->string('from_address')->nullable();
$table->string('from_name')->nullable();
$table->json('settings')->nullable();
$table->integer('company_id')->unsigned()->nullable();
$table->foreign('company_id')->references('id')->on('companies');
$table->timestamps();
});
$users = User::where('role', 'super admin')->get();
foreach ($users as $user) {
BouncerFacade::allow($user)->toManage(MailSender::class);
}
$companies = Company::all();
$companies->map(function ($company) {
if (env('MAIL_DRIVER') == 'smtp') {
$settings = [
'MAIL_HOST' => env('MAIL_HOST'),
'MAIL_PORT' => env('MAIL_PORT'),
'MAIL_USERNAME' => env('MAIL_USERNAME'),
'MAIL_PASSWORD' => env('MAIL_PASSWORD'),
'MAIL_ENCRYPTION' => env('MAIL_ENCRYPTION')
];
$this->createSender($settings, $company->id);
}
if (env('MAIL_DRIVER') == 'mail' || env('MAIL_DRIVER') == 'sendmail') {
$this->createSender(null, $company->id);
}
if (env('MAIL_DRIVER') == 'mailgun') {
$settings = [
'MAILGUN_DOMAIN' => env('MAILGUN_DOMAIN'),
'MAILGUN_SECRET' => env('MAILGUN_SECRET'),
'MAILGUN_ENDPOINT' => env('MAILGUN_ENDPOINT'),
];
$this->createSender($settings, $company->id);
}
if (env('MAIL_DRIVER') == 'ses') {
$settings = [
'MAIL_HOST' => env('MAIL_HOST'),
'MAIL_PORT' => env('MAIL_PORT'),
'MAIL_ENCRYPTION' => env('MAIL_ENCRYPTION'),
'MAILGUN_DOMAIN' => env('MAILGUN_DOMAIN'),
'SES_KEY' => env('SES_KEY'),
'SES_SECRET' => env('SES_SECRET'),
];
$this->createSender($settings, $company->id);
}
});
}
public function createSender($settings, $company_id)
{
$data = [
'name' => env('MAIL_DRIVER'),
'driver' => env('MAIL_DRIVER'),
'is_default' => true,
'from_address' => env('MAIL_FROM_ADDRESS'),
'from_name' => env('MAIL_FROM_NAME'),
'settings' => $settings ?? null,
'company_id' => $company_id
];
MailSender::create($data);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('mail_senders');
}
}

View File

@ -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],

View File

@ -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

View File

@ -47,8 +47,6 @@ const ExpenseCategory = () =>
import('@/scripts/admin/views/settings/ExpenseCategorySetting.vue') import('@/scripts/admin/views/settings/ExpenseCategorySetting.vue')
const ExchangeRateSetting = () => const ExchangeRateSetting = () =>
import('@/scripts/admin/views/settings/ExchangeRateProviderSetting.vue') import('@/scripts/admin/views/settings/ExchangeRateProviderSetting.vue')
const MailConfig = () =>
import('@/scripts/admin/views/settings/MailConfigSetting.vue')
const FileDisk = () => const FileDisk = () =>
import('@/scripts/admin/views/settings/FileDiskSetting.vue') import('@/scripts/admin/views/settings/FileDiskSetting.vue')
const Backup = () => import('@/scripts/admin/views/settings/BackupSetting.vue') const Backup = () => import('@/scripts/admin/views/settings/BackupSetting.vue')
@ -56,6 +54,8 @@ const UpdateApp = () =>
import('@/scripts/admin/views/settings/UpdateAppSetting.vue') import('@/scripts/admin/views/settings/UpdateAppSetting.vue')
const RolesSettings = () => const RolesSettings = () =>
import('@/scripts/admin/views/settings/RolesSettings.vue') import('@/scripts/admin/views/settings/RolesSettings.vue')
const MailSender = () =>
import('@/scripts/admin/views/settings/mail-sender/Index.vue')
// Items // Items
const ItemsIndex = () => import('@/scripts/admin/views/items/Index.vue') const ItemsIndex = () => import('@/scripts/admin/views/items/Index.vue')
@ -302,13 +302,6 @@ export default [
meta: { ability: abilities.VIEW_EXPENSE }, meta: { ability: abilities.VIEW_EXPENSE },
component: ExpenseCategory, component: ExpenseCategory,
}, },
{
path: 'mail-configuration',
name: 'mailconfig',
meta: { isOwner: true },
component: MailConfig,
},
{ {
path: 'file-disk', path: 'file-disk',
name: 'file-disk', name: 'file-disk',
@ -327,6 +320,13 @@ export default [
meta: { isOwner: true }, meta: { isOwner: true },
component: UpdateApp, component: UpdateApp,
}, },
{
path: 'mail-sender',
name: 'mailsender',
meta: { ability: abilities.VIEW_MAIL_SENDER },
component: MailSender,
},
], ],
}, },

View File

@ -0,0 +1,123 @@
<template>
<!-- warning alert -->
<div
v-if="type == 'warning'"
class="rounded-md p-4 m-5"
:class="{
'bg-yellow-50': type == 'warning',
'bg-blue-50': type == 'info',
'bg-red-50': type == 'error',
'bg-green-50': type == 'success',
}"
>
<div class="flex">
<div class="flex-shrink-0">
<!-- Heroicon name: solid/exclamation -->
<svg
v-if="type == 'warning'"
class="h-5 w-5 text-yellow-400"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z"
clip-rule="evenodd"
/>
</svg>
<!-- Heroicon name: solid/information-circle -->
<svg
v-else-if="type == 'info'"
class="h-5 w-5 text-blue-400"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
clip-rule="evenodd"
/>
</svg>
<!-- Heroicon name: solid/x-circle -->
<svg
v-else-if="type == 'error'"
class="h-5 w-5 text-red-400"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
<!-- Heroicon name: solid/check-circle -->
<svg
v-else
class="h-5 w-5 text-green-400"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3
class="text-sm font-medium"
:class="{
'text-yellow-800': type == 'warning',
'text-blue-800': type == 'info',
'text-red-800': type == 'error',
'text-green-800': type == 'success',
}"
>
{{ title }}
</h3>
<div
class="text-sm"
:class="{
'text-yellow-700': type == 'warning',
'text-blue-700': type == 'info',
'text-red-700': type == 'error',
'text-green-700': type == 'success',
}"
>
<p>{{ description }}</p>
</div>
<slot name="action"></slot>
</div>
</div>
</div>
</template>
<script setup>
const props = defineProps({
title: {
type: String,
default: null,
required: false,
},
description: {
type: String,
default: null,
required: false,
},
type: {
type: String,
default: 'success',
required: true,
},
})
</script>

View File

@ -0,0 +1,111 @@
<template>
<BaseDropdown>
<template #activator>
<BaseButton v-if="route.name === 'mailsender.view'" variant="primary">
<BaseIcon name="DotsHorizontalIcon" class="h-5 text-white" />
</BaseButton>
<BaseIcon v-else name="DotsHorizontalIcon" class="h-5 text-gray-500" />
</template>
<!-- edit mail-sender -->
<BaseDropdownItem @click="editMailSender(row.id)">
<BaseIcon
name="PencilIcon"
class="w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"
/>
{{ $t('general.edit') }}
</BaseDropdownItem>
<!-- send test mail-sender -->
<BaseDropdownItem @click="openMailSenderTestModal(row.id)">
<BaseIcon
name="PaperAirplaneIcon"
class="w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"
/>
{{ $t('general.send_test_mail') }}
</BaseDropdownItem>
<!-- delete mail-sender -->
<BaseDropdownItem v-if="!row.is_default" @click="removeMailSender(row.id)">
<BaseIcon
name="TrashIcon"
class="w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"
/>
{{ $t('general.delete') }}
</BaseDropdownItem>
</BaseDropdown>
</template>
<script setup>
import { useDialogStore } from '@/scripts/stores/dialog'
import { useI18n } from 'vue-i18n'
import { useMailSenderStore } from '@/scripts/admin/stores/mail-sender'
import { useRoute, useRouter } from 'vue-router'
import { inject } from 'vue'
import { useModalStore } from '@/scripts/stores/modal'
const props = defineProps({
row: {
type: Object,
default: null,
},
table: {
type: Object,
default: null,
},
loadData: {
type: Function,
default: null,
},
})
const pre_t = 'settings.mail_sender'
const dialogStore = useDialogStore()
const { t } = useI18n()
const mailSenderStore = useMailSenderStore()
const route = useRoute()
const modalStore = useModalStore()
async function editMailSender(id) {
await mailSenderStore.fetchMailSender(id)
modalStore.openModal({
title: t(`${pre_t}.edit_mail_sender`),
componentName: 'MailSenderModal',
size: 'md',
refreshData: props.loadData && props.loadData,
})
}
function removeMailSender(id) {
dialogStore
.openDialog({
title: t('general.are_you_sure'),
message: t(`${pre_t}.confirm_delete`),
yesLabel: t('general.ok'),
noLabel: t('general.cancel'),
variant: 'danger',
hideNoButton: false,
size: 'lg',
})
.then(async (res) => {
if (res) {
let response = await mailSenderStore.deleteMailSender(id)
if (response.data.success) {
props.loadData && props.loadData()
return true
}
props.loadData && props.loadData()
}
})
}
async function openMailSenderTestModal(id) {
modalStore.openModal({
title: t(`general.send_test_mail`),
componentName: 'MailSenderTestModal',
size: 'md',
id: id,
refreshData: props.loadData && props.loadData,
})
}
</script>

View File

@ -17,18 +17,7 @@
<td class="px-5 py-4 text-left align-top"> <td class="px-5 py-4 text-left align-top">
<div class="flex justify-start"> <div class="flex justify-start">
<div <div
class=" class="flex items-center justify-center w-5 h-5 mt-2 mr-2 text-gray-300 cursor-move handle"
flex
items-center
justify-center
w-5
h-5
mt-2
text-gray-300
cursor-move
handle
mr-2
"
> >
<DragIcon /> <DragIcon />
</div> </div>
@ -108,7 +97,7 @@
<BaseIcon <BaseIcon
name="ChevronDownIcon" name="ChevronDownIcon"
class="w-4 h-4 text-gray-500 ml-1" class="w-4 h-4 ml-1 text-gray-500"
/> />
</span> </span>
</BaseButton> </BaseButton>
@ -155,7 +144,7 @@
<BaseContentPlaceholders v-if="loading"> <BaseContentPlaceholders v-if="loading">
<BaseContentPlaceholdersText <BaseContentPlaceholdersText
:lines="1" :lines="1"
class="w-24 h-8 rounded-md border" class="w-24 h-8 border rounded-md"
/> />
</BaseContentPlaceholders> </BaseContentPlaceholders>
@ -175,6 +164,7 @@
:ability="abilities.CREATE_INVOICE" :ability="abilities.CREATE_INVOICE"
:store="store" :store="store"
:store-prop="storeProp" :store-prop="storeProp"
:discount="discount"
@update="updateTax" @update="updateTax"
/> />
</td> </td>

View File

@ -30,24 +30,13 @@
<template v-if="userStore.hasAbilities(ability)" #action> <template v-if="userStore.hasAbilities(ability)" #action>
<button <button
type="button" type="button"
class=" class="flex items-center justify-center w-full px-2 py-2 bg-gray-200 border-none outline-none cursor-pointer "
flex
items-center
justify-center
w-full
px-2
cursor-pointer
py-2
bg-gray-200
border-none
outline-none
"
@click="openTaxModal" @click="openTaxModal"
> >
<BaseIcon name="CheckCircleIcon" class="h-5 text-primary-400" /> <BaseIcon name="CheckCircleIcon" class="h-5 text-primary-400" />
<label <label
class="ml-2 text-sm leading-none text-primary-400 cursor-pointer" class="ml-2 text-sm leading-none cursor-pointer text-primary-400"
>{{ $t('invoices.add_new_tax') }}</label >{{ $t('invoices.add_new_tax') }}</label
> >
</button> </button>
@ -115,6 +104,10 @@ const props = defineProps({
type: Number, type: Number,
default: 0, default: 0,
}, },
discountedTotal: {
type: Number,
default: 0,
},
currency: { currency: {
type: [Object, String], type: [Object, String],
required: true, required: true,
@ -153,19 +146,19 @@ const filteredTypes = computed(() => {
}) })
const taxAmount = computed(() => { const taxAmount = computed(() => {
if (localTax.compound_tax && props.total) { if (localTax.compound_tax && props.discountedTotal) {
return ((props.total + props.totalTax) * localTax.percent) / 100 return ((props.discountedTotal + props.totalTax) * localTax.percent) / 100
} }
if (props.total && localTax.percent) { if (props.discountedTotal && localTax.percent) {
return (props.total * localTax.percent) / 100 return (props.discountedTotal * localTax.percent) / 100
} }
return 0 return 0
}) })
watch( watch(
() => props.total, () => props.discountedTotal,
() => { () => {
updateRowTax() updateRowTax()
} }

View File

@ -29,14 +29,7 @@
<label <label
v-else v-else
class=" class="flex items-center justify-center m-0 text-lg text-black uppercase "
flex
items-center
justify-center
m-0
text-lg text-black
uppercase
"
> >
<BaseFormatMoney <BaseFormatMoney
:amount="store.getSubTotal" :amount="store.getSubTotal"
@ -66,14 +59,7 @@
<label <label
v-else-if="store[storeProp].tax_per_item === 'YES'" v-else-if="store[storeProp].tax_per_item === 'YES'"
class=" class="flex items-center justify-center m-0 text-lg text-black uppercase "
flex
items-center
justify-center
m-0
text-lg text-black
uppercase
"
> >
<BaseFormatMoney :amount="tax.amount" :currency="defaultCurrency" /> <BaseFormatMoney :amount="tax.amount" :currency="defaultCurrency" />
</label> </label>
@ -98,7 +84,7 @@
<BaseContentPlaceholders v-if="isLoading"> <BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText <BaseContentPlaceholdersText
:lines="1" :lines="1"
class="w-24 h-8 rounded-md border" class="w-24 h-8 border rounded-md"
/> />
</BaseContentPlaceholders> </BaseContentPlaceholders>
<div v-else class="flex" style="width: 140px" role="group"> <div v-else class="flex" style="width: 140px" role="group">
@ -114,7 +100,7 @@
<BaseDropdown position="bottom-end"> <BaseDropdown position="bottom-end">
<template #activator> <template #activator>
<BaseButton <BaseButton
class="rounded-tr-md rounded-br-md p-2 rounded-none" class="p-2 rounded-none rounded-tr-md rounded-br-md"
type="button" type="button"
variant="white" variant="white"
> >
@ -127,7 +113,7 @@
<BaseIcon <BaseIcon
name="ChevronDownIcon" name="ChevronDownIcon"
class="w-4 h-4 text-gray-500 ml-1" class="w-4 h-4 ml-1 text-gray-500"
/> />
</span> </span>
</BaseButton> </BaseButton>
@ -180,15 +166,7 @@
</div> </div>
<div <div
class=" class="flex items-center justify-between w-full pt-2 mt-5 border-t border-gray-200 border-solid "
flex
items-center
justify-between
w-full
pt-2
mt-5
border-t border-gray-200 border-solid
"
> >
<BaseContentPlaceholders v-if="isLoading"> <BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" /> <BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
@ -204,14 +182,7 @@
</BaseContentPlaceholders> </BaseContentPlaceholders>
<label <label
v-else v-else
class=" class="flex items-center justify-center text-lg uppercase text-primary-400"
flex
items-center
justify-center
text-lg
uppercase
text-primary-400
"
> >
<BaseFormatMoney :amount="store.getTotal" :currency="defaultCurrency" /> <BaseFormatMoney :amount="store.getTotal" :currency="defaultCurrency" />
</label> </label>
@ -334,6 +305,7 @@ function selectPercentage() {
function onSelectTax(selectedTax) { function onSelectTax(selectedTax) {
let amount = 0 let amount = 0
if (selectedTax.compound_tax && props.store.getSubtotalWithDiscount) { if (selectedTax.compound_tax && props.store.getSubtotalWithDiscount) {
amount = Math.round( amount = Math.round(
((props.store.getSubtotalWithDiscount + props.store.getTotalSimpleTax) * ((props.store.getSubtotalWithDiscount + props.store.getTotalSimpleTax) *

View File

@ -453,7 +453,7 @@
</template> </template>
<script setup> <script setup>
import { computed, onMounted, ref } from 'vue' import { computed, ref } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
@ -549,7 +549,6 @@ const rules = computed(() => {
website: { website: {
url: helpers.withMessage(t('validation.invalid_url'), url), url: helpers.withMessage(t('validation.invalid_url'), url),
}, },
billing: { billing: {
address_street_1: { address_street_1: {
maxLength: helpers.withMessage( maxLength: helpers.withMessage(

View File

@ -0,0 +1,287 @@
<template>
<BaseModal
:show="modalStore.active && modalStore.componentName === 'MailSenderModal'"
>
<template #header>
<div class="flex justify-between w-full">
{{ modalStore.title }}
<BaseIcon
name="XIcon"
class="h-6 w-6 text-gray-500 cursor-pointer"
@click="closeMailSenderModal"
/>
</div>
</template>
<form action="" @submit.prevent="submitMailSenderData">
<div class="p-4 sm:p-6 my-2">
<!-- Name -->
<BaseInputGrid>
<BaseInputGroup
:label="$t(`${pre_t}.name`)"
:error="v$.name.$error && v$.name.$errors[0].$message"
:help-text="$t(`${pre_t}.name_help`)"
required
>
<BaseInput
v-model.trim="mailSenderStore.currentMailSender.name"
:invalid="v$.name.$error"
type="text"
@input="v$.name.$touch()"
/>
</BaseInputGroup>
<!-- From Name -->
<BaseInputGroup
:label="$t(`${pre_t}.from_name`)"
:error="v$.from_name.$error && v$.from_name.$errors[0].$message"
required
>
<BaseInput
v-model="mailSenderStore.currentMailSender.from_name"
:invalid="v$.from_name.$error"
type="text"
@input="v$.from_name.$touch()"
/>
</BaseInputGroup>
<!-- From Address -->
<BaseInputGroup
:label="$t(`${pre_t}.from_address`)"
:error="
v$.from_address.$error && v$.from_address.$errors[0].$message
"
required
>
<BaseInput
v-model="mailSenderStore.currentMailSender.from_address"
:invalid="v$.from_address.$error"
type="text"
@input="v$.from_address.$touch()"
/>
</BaseInputGroup>
<!-- CC -->
<BaseInputGroup
:label="$t(`${pre_t}.cc`)"
:error="v$.cc.$error && v$.cc.$errors[0].$message"
:help-text="$t(`${pre_t}.email_list`)"
>
<BaseInput
v-model="mailSenderStore.currentMailSender.cc"
:invalid="v$.cc.$error"
type="text"
@input="v$.cc.$touch()"
/>
</BaseInputGroup>
<!-- BCC -->
<BaseInputGroup
:label="$t(`${pre_t}.bcc`)"
:error="v$.bcc.$error && v$.bcc.$errors[0].$message"
:help-text="$t(`${pre_t}.email_list`)"
>
<BaseInput
v-model="mailSenderStore.currentMailSender.bcc"
:invalid="v$.bcc.$error"
type="text"
@input="v$.bcc.$touch()"
/>
</BaseInputGroup>
<!-- Mail Driver -->
<BaseInputGroup
:label="$t(`${pre_t}.driver`)"
:error="v$.driver.$error && v$.driver.$errors[0].$message"
required
>
<BaseMultiselect
v-model="mailSenderStore.currentMailSender.driver"
:options="mailSenderStore.mail_drivers"
:can-deselect="false"
:invalid="v$.driver.$error"
/>
</BaseInputGroup>
<component
:is="loadMailDriver"
:mail-sender-store="mailSenderStore"
/>
</BaseInputGrid>
<BaseDivider class="mt-4 mb-0" />
<!-- Is Default? -->
<BaseSwitchSection
v-if="!mailSenderStore.isDisable"
v-model="mailSenderStore.currentMailSender.is_default"
:title="$t(`${pre_t}.is_default`)"
:description="$t(`${pre_t}.is_default_description`)"
/>
</div>
<div
class="z-0 flex justify-end p-4 border-t border-solid border--200 border-modal-bg"
>
<BaseButton
class="mr-3 text-sm"
variant="primary-outline"
type="button"
@click="closeMailSenderModal"
>
{{ $t('general.cancel') }}
</BaseButton>
<BaseButton
:loading="isSaving"
:disabled="isSaving"
variant="primary"
type="submit"
>
<template #left="slotProps">
<BaseIcon
v-if="!isSaving"
name="SaveIcon"
:class="slotProps.class"
/>
</template>
{{
mailSenderStore.isEdit ? $t('general.update') : $t('general.save')
}}
</BaseButton>
</div>
</form>
</BaseModal>
</template>
<script setup>
import { computed, onMounted, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { required, email, minLength, helpers } from '@vuelidate/validators'
import { useVuelidate } from '@vuelidate/core'
import { useModalStore } from '@/scripts/stores/modal'
import { useMailSenderStore } from '@/scripts/admin/stores/mail-sender'
import SmtpDriver from '@/scripts/admin/views/settings/mail-sender/SmtpDriver.vue'
import MailgunDriver from '@/scripts/admin/views/settings/mail-sender/MailgunDriver.vue'
import SesDriver from '@/scripts/admin/views/settings/mail-sender/SesDriver.vue'
const pre_t = 'settings.mail_sender'
const modalStore = useModalStore()
const mailSenderStore = useMailSenderStore()
const { t } = useI18n()
let isSaving = ref(false)
const loadMailDriver = computed(() => {
switch (mailSenderStore.currentMailSender.driver) {
case 'smtp':
return SmtpDriver
case 'mail':
return false
case 'sendmail':
return false
case 'mailgun':
return MailgunDriver
case 'ses':
return SesDriver
default:
return false
}
})
// This is multiple email custom validation
const multiEmail = (value) => {
if (value == '' || value === null) return true
const emailRegex =
/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i
const emailArr = value.split(',')
let isValid = emailArr.every((v) => {
return emailRegex.test(v)
})
return isValid
}
const rules = computed(() => {
return {
name: {
required: helpers.withMessage(t('validation.required'), required),
minLength: helpers.withMessage(
t('validation.name_min_length', { count: 3 }),
minLength(3)
),
},
from_name: {
required: helpers.withMessage(t('validation.required'), required),
},
from_address: {
required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
},
cc: {
multiEmail: helpers.withMessage(
t('validation.email_incorrect'),
multiEmail
),
},
bcc: {
multiEmail: helpers.withMessage(
t('validation.email_incorrect'),
multiEmail
),
},
driver: {
required: helpers.withMessage(t('validation.required'), required),
},
}
})
const v$ = useVuelidate(
rules,
computed(() => mailSenderStore.currentMailSender)
)
async function submitMailSenderData() {
v$.value.$touch()
if (v$.value.$invalid) {
return true
}
try {
const action = mailSenderStore.isEdit
? mailSenderStore.updateMailSender
: mailSenderStore.addMailSender
isSaving.value = true
var mailDriverConfig = null
switch (mailSenderStore.currentMailSender.driver) {
case 'smtp':
mailDriverConfig = mailSenderStore.smtpConfig
break
case 'mailgun':
mailDriverConfig = mailSenderStore.mailgunConfig
break
case 'ses':
mailDriverConfig = mailSenderStore.sesConfig
break
}
mailSenderStore.currentMailSender.settings = mailDriverConfig
let res = await action(mailSenderStore.currentMailSender)
isSaving.value = false
modalStore.refreshData ? modalStore.refreshData(res.data.data) : ''
closeMailSenderModal()
} catch (err) {
isSaving.value = false
return true
}
}
function closeMailSenderModal() {
modalStore.closeModal()
setTimeout(() => {
mailSenderStore.resetCurrentMailSender()
v$.value.$reset()
}, 300)
}
onMounted(async () => {
await mailSenderStore.fetchMailDrivers()
})
</script>

View File

@ -0,0 +1,208 @@
<template>
<BaseModal :show="modalActive" @open="setInitialData">
<template #header>
<div class="flex justify-between w-full">
{{ modalStore.title }}
<BaseIcon
name="XIcon"
class="w-6 h-6 text-gray-500 cursor-pointer"
@click="closeTestModal"
/>
</div>
</template>
<form action="" @submit.prevent="onTestMailSend">
<div class="p-4 md:p-8">
<BaseInputGrid layout="one-column">
<BaseInputGroup
:label="$t(`${pre_t}.title`)"
variant="horizontal"
:content-loading="isFetchingInitialData"
:error="
v$.mail_sender_id.$error && v$.mail_sender_id.$errors[0].$message
"
>
<BaseMultiselect
v-model="formData.mail_sender_id"
:invalid="v$.mail_sender_id.$error"
label="name"
:options="mailSenderStore.mailSenders"
value-prop="id"
:can-deselect="false"
:can-clear="false"
:placeholder="$t(`${pre_t}.select_mail_sender`)"
searchable
track-by="name"
:content-loading="isFetchingInitialData"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('general.to')"
:error="v$.to.$error && v$.to.$errors[0].$message"
variant="horizontal"
required
:content-loading="isFetchingInitialData"
>
<BaseInput
v-model="formData.to"
type="text"
:invalid="v$.to.$error"
:content-loading="isFetchingInitialData"
@input="v$.to.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('general.subject')"
:error="v$.subject.$error && v$.subject.$errors[0].$message"
variant="horizontal"
required
:content-loading="isFetchingInitialData"
>
<BaseInput
v-model="formData.subject"
type="text"
:invalid="v$.subject.$error"
:content-loading="isFetchingInitialData"
@input="v$.subject.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('general.message')"
:error="v$.message.$error && v$.message.$errors[0].$message"
variant="horizontal"
required
:content-loading="isFetchingInitialData"
>
<BaseTextarea
v-model="formData.message"
rows="4"
cols="50"
:invalid="v$.message.$error"
:content-loading="isFetchingInitialData"
@input="v$.message.$touch()"
/>
</BaseInputGroup>
</BaseInputGrid>
</div>
<div
class="z-0 flex justify-end p-4 border-t border-gray-200 border-solid"
>
<BaseButton
variant="primary-outline"
type="button"
class="mr-3"
:content-loading="isFetchingInitialData"
@click="closeTestModal()"
>
{{ $t('general.cancel') }}
</BaseButton>
<BaseButton
:loading="isSaving"
variant="primary"
type="submit"
:content-loading="isFetchingInitialData"
>
<template #left="slotProps">
<BaseIcon
v-if="!isSaving"
name="PaperAirplaneIcon"
:class="slotProps.class"
/>
</template>
{{ $t('general.send') }}
</BaseButton>
</div>
</form>
</BaseModal>
</template>
<script setup>
import { reactive, ref, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { required, email, maxLength, helpers } from '@vuelidate/validators'
import useVuelidate from '@vuelidate/core'
import { useModalStore } from '@/scripts/stores/modal'
import { useMailSenderStore } from '@/scripts/admin/stores/mail-sender'
const pre_t = 'settings.mail_sender'
const modalStore = useModalStore()
const mailSenderStore = useMailSenderStore()
const { t } = useI18n()
let isSaving = ref(false)
let formData = reactive({
mail_sender_id: '',
to: '',
subject: '',
message: '',
})
const isFetchingInitialData = ref(false)
const modalActive = computed(() => {
return modalStore.active && modalStore.componentName === 'MailSenderTestModal'
})
function setInitialData() {
isFetchingInitialData.value = true
formData.mail_sender_id = modalStore.id
setTimeout(() => {
isFetchingInitialData.value = false
}, 100)
}
const rules = {
mail_sender_id: {
required: helpers.withMessage(t('validation.required'), required),
},
to: {
required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
},
subject: {
required: helpers.withMessage(t('validation.required'), required),
maxLength: helpers.withMessage(
t('validation.subject_maxlength'),
maxLength(100)
),
},
message: {
required: helpers.withMessage(t('validation.required'), required),
maxLength: helpers.withMessage(
t('validation.message_maxlength'),
maxLength(255)
),
},
}
const v$ = useVuelidate(rules, formData)
function resetFormData() {
formData.mail_sender_id = ''
formData.to = ''
formData.subject = ''
formData.message = ''
v$.value.$reset()
}
async function onTestMailSend() {
v$.value.$touch()
if (v$.value.$invalid) {
return true
}
isSaving.value = true
let response = await mailSenderStore.sendTestMail(formData)
if (response.data) {
closeTestModal()
}
}
function closeTestModal() {
modalStore.closeModal()
setTimeout(() => {
isSaving.value = false
modalStore.resetModalData()
resetFormData()
}, 300)
}
</script>

View File

@ -16,18 +16,28 @@
</template> </template>
<form v-if="!isPreview" action=""> <form v-if="!isPreview" action="">
<div class="px-8 py-8 sm:p-6"> <!-- v-if -->
<div v-if="isMailSenderExist" class="px-8 py-8 sm:p-6">
<BaseInputGrid layout="one-column"> <BaseInputGrid layout="one-column">
<BaseInputGroup <BaseInputGroup
:label="$t('general.from')" :label="$tc('settings.mail_sender.title', 1)"
required required
:error="v$.from.$error && v$.from.$errors[0].$message" :error="
v$.mail_sender_id.$error && v$.mail_sender_id.$errors[0].$message
"
> >
<BaseInput <BaseMultiselect
v-model="estimateMailForm.from" v-model="estimateMailForm.mail_sender_id"
type="text" :invalid="v$.mail_sender_id.$error"
:invalid="v$.from.$error" label="name"
@input="v$.from.$touch()" :options="mailSenders"
value-prop="id"
:can-deselect="false"
:can-clear="false"
:placeholder="$t(`settings.mail_sender.select_mail_sender`)"
searchable
track-by="name"
:content-loading="isFetchingInitialData"
/> />
</BaseInputGroup> </BaseInputGroup>
<BaseInputGroup <BaseInputGroup
@ -62,6 +72,45 @@
</BaseInputGroup> </BaseInputGroup>
</BaseInputGrid> </BaseInputGrid>
</div> </div>
<!-- v-else -->
<div v-else-if="!isMailSenderExist && !isFetchingInitialData">
<FeedbackAlert
:title="$t('settings.mail_sender.no_mail_sender_found')"
:description="
$t('settings.mail_sender.no_mail_sender_found_description')
"
type="warning"
>
<template #action>
<div class="mt-4">
<div class="-mx-2 -my-1.5 flex">
<button
type="button"
class="
bg-yellow-50
px-2
py-1.5
rounded-md
text-sm
font-medium
text-yellow-800
hover:bg-yellow-100
focus:outline-none
focus:ring-2
focus:ring-offset-2
focus:ring-offset-yellow-50
focus:ring-yellow-600
"
@click="gotoMailSender"
>
{{ $t('settings.mail_sender.manage_mail_sender') }}
</button>
</div>
</div>
</template>
</FeedbackAlert>
</div>
<!-- end v-if-else -->
<div <div
class="z-0 flex justify-end p-4 border-t border-gray-200 border-solid" class="z-0 flex justify-end p-4 border-t border-gray-200 border-solid"
> >
@ -75,6 +124,7 @@
</BaseButton> </BaseButton>
<BaseButton <BaseButton
v-if="isMailSenderExist"
:loading="isLoading" :loading="isLoading"
:disabled="isLoading" :disabled="isLoading"
variant="primary" variant="primary"
@ -141,18 +191,24 @@ import { useModalStore } from '@/scripts/stores/modal'
import { useEstimateStore } from '@/scripts/admin/stores/estimate' import { useEstimateStore } from '@/scripts/admin/stores/estimate'
import { useNotificationStore } from '@/scripts/stores/notification' import { useNotificationStore } from '@/scripts/stores/notification'
import { useCompanyStore } from '@/scripts/admin/stores/company' import { useCompanyStore } from '@/scripts/admin/stores/company'
import { useMailDriverStore } from '@/scripts/admin/stores/mail-driver' import { useMailSenderStore } from '@/scripts/admin/stores/mail-sender'
import FeedbackAlert from '@/scripts/admin/components/FeedbackAlert.vue'
import { useRouter } from 'vue-router'
const modalStore = useModalStore() const modalStore = useModalStore()
const estimateStore = useEstimateStore() const estimateStore = useEstimateStore()
const notificationStore = useNotificationStore() const notificationStore = useNotificationStore()
const companyStore = useCompanyStore() const companyStore = useCompanyStore()
const mailDriverStore = useMailDriverStore() const mailSenderStore = useMailSenderStore()
const router = useRouter()
const { t } = useI18n() const { t } = useI18n()
const isLoading = ref(false) const isLoading = ref(false)
const templateUrl = ref('') const templateUrl = ref('')
const isPreview = ref(false) const isPreview = ref(false)
const mailSenders = ref(null)
const isFetchingInitialData = ref(false)
const emailTemplates = ref(null)
const estimateMailFields = ref([ const estimateMailFields = ref([
'customer', 'customer',
@ -164,7 +220,7 @@ const estimateMailFields = ref([
let estimateMailForm = reactive({ let estimateMailForm = reactive({
id: null, id: null,
from: null, mail_sender_id: null,
to: null, to: null,
subject: 'New Estimate', subject: 'New Estimate',
body: null, body: null,
@ -181,9 +237,8 @@ const modalData = computed(() => {
}) })
const rules = { const rules = {
from: { mail_sender_id: {
required: helpers.withMessage(t('validation.required'), required), required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
}, },
to: { to: {
required: helpers.withMessage(t('validation.required'), required), required: helpers.withMessage(t('validation.required'), required),
@ -207,20 +262,26 @@ function cancelPreview() {
} }
async function setInitialData() { async function setInitialData() {
let admin = await companyStore.fetchBasicMailConfig()
estimateMailForm.id = modalStore.id estimateMailForm.id = modalStore.id
if (admin.data) {
estimateMailForm.from = admin.data.from_mail
}
if (modalData.value) { if (modalData.value) {
estimateMailForm.to = modalData.value.customer.email estimateMailForm.to = modalData.value.customer.email
} }
estimateMailForm.body = estimateMailForm.body =
companyStore.selectedCompanySettings.estimate_mail_body companyStore.selectedCompanySettings.estimate_mail_body
isFetchingInitialData.value = true
let mailSenderData = await mailSenderStore.fetchMailSenders({ limit: 'all' })
if (mailSenderData.data) {
mailSenders.value = mailSenderData.data.data
let defaultMailSender = mailSenderData.data.data.find(
(mailSender) => mailSender.is_default == true
)
estimateMailForm.mail_sender_id = defaultMailSender
? defaultMailSender.id
: null
isFetchingInitialData.value = false
}
} }
async function submitForm() { async function submitForm() {
@ -274,4 +335,18 @@ function closeSendEstimateModal() {
templateUrl.value = null templateUrl.value = null
}, 300) }, 300)
} }
function getTickImage() {
const imgUrl = new URL('/img/tick.png', import.meta.url)
return imgUrl
}
const isMailSenderExist = computed(() => {
return mailSenders.value && mailSenders.value.length
})
function gotoMailSender() {
closeSendEstimateModal()
router.push('/admin/settings/mail-sender')
}
</script> </script>

View File

@ -15,18 +15,28 @@
</div> </div>
</template> </template>
<form v-if="!isPreview" action=""> <form v-if="!isPreview" action="">
<div class="px-8 py-8 sm:p-6"> <!-- v-if -->
<div v-if="isMailSenderExist" class="px-8 py-8 sm:p-6">
<BaseInputGrid layout="one-column" class="col-span-7"> <BaseInputGrid layout="one-column" class="col-span-7">
<BaseInputGroup <BaseInputGroup
:label="$t('general.from')" :label="$tc('settings.mail_sender.title', 1)"
required required
:error="v$.from.$error && v$.from.$errors[0].$message" :error="
v$.mail_sender_id.$error && v$.mail_sender_id.$errors[0].$message
"
> >
<BaseInput <BaseMultiselect
v-model="invoiceMailForm.from" v-model="invoiceMailForm.mail_sender_id"
type="text" :invalid="v$.mail_sender_id.$error"
:invalid="v$.from.$error" label="name"
@input="v$.from.$touch()" :options="mailSenders"
value-prop="id"
:can-deselect="false"
:can-clear="false"
:placeholder="$t(`settings.mail_sender.select_mail_sender`)"
searchable
track-by="name"
:content-loading="isFetchingInitialData"
/> />
</BaseInputGroup> </BaseInputGroup>
<BaseInputGroup <BaseInputGroup
@ -65,6 +75,45 @@
</BaseInputGroup> </BaseInputGroup>
</BaseInputGrid> </BaseInputGrid>
</div> </div>
<!-- v-else -->
<div v-else-if="!isMailSenderExist && !isFetchingInitialData">
<FeedbackAlert
:title="$t('settings.mail_sender.no_mail_sender_found')"
:description="
$t('settings.mail_sender.no_mail_sender_found_description')
"
type="warning"
>
<template #action>
<div class="mt-4">
<div class="-mx-2 -my-1.5 flex">
<button
type="button"
class="
bg-yellow-50
px-2
py-1.5
rounded-md
text-sm
font-medium
text-yellow-800
hover:bg-yellow-100
focus:outline-none
focus:ring-2
focus:ring-offset-2
focus:ring-offset-yellow-50
focus:ring-yellow-600
"
@click="gotoMailSender"
>
{{ $t('settings.mail_sender.manage_mail_sender') }}
</button>
</div>
</div>
</template>
</FeedbackAlert>
</div>
<!-- end v-if-else -->
<div <div
class="z-0 flex justify-end p-4 border-t border-gray-200 border-solid" class="z-0 flex justify-end p-4 border-t border-gray-200 border-solid"
> >
@ -77,6 +126,7 @@
{{ $t('general.cancel') }} {{ $t('general.cancel') }}
</BaseButton> </BaseButton>
<BaseButton <BaseButton
v-if="isMailSenderExist"
:loading="isLoading" :loading="isLoading"
:disabled="isLoading" :disabled="isLoading"
variant="primary" variant="primary"
@ -154,18 +204,24 @@ import { useI18n } from 'vue-i18n'
import { useInvoiceStore } from '@/scripts/admin/stores/invoice' import { useInvoiceStore } from '@/scripts/admin/stores/invoice'
import { useVuelidate } from '@vuelidate/core' import { useVuelidate } from '@vuelidate/core'
import { required, email, helpers } from '@vuelidate/validators' import { required, email, helpers } from '@vuelidate/validators'
import { useMailDriverStore } from '@/scripts/admin/stores/mail-driver' import { useMailSenderStore } from '@/scripts/admin/stores/mail-sender'
import FeedbackAlert from '@/scripts/admin/components/FeedbackAlert.vue'
import { useRouter } from 'vue-router'
const modalStore = useModalStore() const modalStore = useModalStore()
const companyStore = useCompanyStore() const companyStore = useCompanyStore()
const notificationStore = useNotificationStore() const notificationStore = useNotificationStore()
const invoiceStore = useInvoiceStore() const invoiceStore = useInvoiceStore()
const mailDriverStore = useMailDriverStore() const mailSenderStore = useMailSenderStore()
const router = useRouter()
const { t } = useI18n() const { t } = useI18n()
let isLoading = ref(false) let isLoading = ref(false)
const templateUrl = ref('') const templateUrl = ref('')
const isPreview = ref(false) const isPreview = ref(false)
const mailSenders = ref(null)
const isFetchingInitialData = ref(false)
const emailTemplates = ref(null)
const emit = defineEmits(['update']) const emit = defineEmits(['update'])
@ -179,7 +235,7 @@ const invoiceMailFields = ref([
const invoiceMailForm = reactive({ const invoiceMailForm = reactive({
id: null, id: null,
from: null, mail_sender_id: null,
to: null, to: null,
subject: 'New Invoice', subject: 'New Invoice',
body: null, body: null,
@ -198,9 +254,8 @@ const modalData = computed(() => {
}) })
const rules = { const rules = {
from: { mail_sender_id: {
required: helpers.withMessage(t('validation.required'), required), required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
}, },
to: { to: {
required: helpers.withMessage(t('validation.required'), required), required: helpers.withMessage(t('validation.required'), required),
@ -224,19 +279,25 @@ function cancelPreview() {
} }
async function setInitialData() { async function setInitialData() {
let admin = await companyStore.fetchBasicMailConfig()
invoiceMailForm.id = modalStore.id invoiceMailForm.id = modalStore.id
if (admin.data) {
invoiceMailForm.from = admin.data.from_mail
}
if (modalData.value) { if (modalData.value) {
invoiceMailForm.to = modalData.value.customer.email invoiceMailForm.to = modalData.value.customer.email
} }
invoiceMailForm.body = companyStore.selectedCompanySettings.invoice_mail_body invoiceMailForm.body = companyStore.selectedCompanySettings.invoice_mail_body
isFetchingInitialData.value = true
let mailSenderData = await mailSenderStore.fetchMailSenders({ limit: 'all' })
if (mailSenderData.data) {
mailSenders.value = mailSenderData.data.data
let defaultMailSender = mailSenderData.data.data.find(
(mailSender) => mailSender.is_default == true
)
invoiceMailForm.mail_sender_id = defaultMailSender
? defaultMailSender.id
: null
isFetchingInitialData.value = false
}
} }
async function submitForm() { async function submitForm() {
@ -287,4 +348,18 @@ function closeSendInvoiceModal() {
templateUrl.value = null templateUrl.value = null
}, 300) }, 300)
} }
function getTickImage() {
const imgUrl = new URL('/img/tick.png', import.meta.url)
return imgUrl
}
const isMailSenderExist = computed(() => {
return mailSenders.value && mailSenders.value.length
})
function gotoMailSender() {
closeSendInvoiceModal()
router.push('/admin/settings/mail-sender')
}
</script> </script>

View File

@ -15,18 +15,28 @@
</div> </div>
</template> </template>
<form v-if="!isPreview" action=""> <form v-if="!isPreview" action="">
<div class="px-8 py-8 sm:p-6"> <!-- v-if -->
<div v-if="isMailSenderExist" class="px-8 py-8 sm:p-6">
<BaseInputGrid layout="one-column" class="col-span-7"> <BaseInputGrid layout="one-column" class="col-span-7">
<BaseInputGroup <BaseInputGroup
:label="$t('general.from')" :label="$tc('settings.mail_sender.title', 1)"
required required
:error="v$.from.$error && v$.from.$errors[0].$message" :error="
v$.mail_sender_id.$error && v$.mail_sender_id.$errors[0].$message
"
> >
<BaseInput <BaseMultiselect
v-model="paymentMailForm.from" v-model="paymentMailForm.mail_sender_id"
type="text" :invalid="v$.mail_sender_id.$error"
:invalid="v$.from.$error" label="name"
@input="v$.from.$touch()" :options="mailSenders"
value-prop="id"
:can-deselect="false"
:can-clear="false"
:placeholder="$t(`settings.mail_sender.select_mail_sender`)"
searchable
track-by="name"
:content-loading="isFetchingInitialData"
/> />
</BaseInputGroup> </BaseInputGroup>
<BaseInputGroup <BaseInputGroup
@ -65,6 +75,45 @@
</BaseInputGroup> </BaseInputGroup>
</BaseInputGrid> </BaseInputGrid>
</div> </div>
<!-- v-else -->
<div v-else-if="!isMailSenderExist && !isFetchingInitialData">
<FeedbackAlert
:title="$t('settings.mail_sender.no_mail_sender_found')"
:description="
$t('settings.mail_sender.no_mail_sender_found_description')
"
type="warning"
>
<template #action>
<div class="mt-4">
<div class="-mx-2 -my-1.5 flex">
<button
type="button"
class="
bg-yellow-50
px-2
py-1.5
rounded-md
text-sm
font-medium
text-yellow-800
hover:bg-yellow-100
focus:outline-none
focus:ring-2
focus:ring-offset-2
focus:ring-offset-yellow-50
focus:ring-yellow-600
"
@click="gotoMailSender"
>
{{ $t('settings.mail_sender.manage_mail_sender') }}
</button>
</div>
</div>
</template>
</FeedbackAlert>
</div>
<!-- end v-if-else -->
<div <div
class="z-0 flex justify-end p-4 border-t border-gray-200 border-solid" class="z-0 flex justify-end p-4 border-t border-gray-200 border-solid"
> >
@ -77,6 +126,7 @@
{{ $t('general.cancel') }} {{ $t('general.cancel') }}
</BaseButton> </BaseButton>
<BaseButton <BaseButton
v-if="isMailSenderExist"
:loading="isLoading" :loading="isLoading"
:disabled="isLoading" :disabled="isLoading"
variant="primary" variant="primary"
@ -154,20 +204,26 @@ import { usePaymentStore } from '@/scripts/admin/stores/payment'
import { useCompanyStore } from '@/scripts/admin/stores/company' import { useCompanyStore } from '@/scripts/admin/stores/company'
import { useNotificationStore } from '@/scripts/stores/notification' import { useNotificationStore } from '@/scripts/stores/notification'
import { useModalStore } from '@/scripts/stores/modal' import { useModalStore } from '@/scripts/stores/modal'
import { useMailDriverStore } from '@/scripts/admin/stores/mail-driver'
import { useDialogStore } from '@/scripts/stores/dialog' import { useDialogStore } from '@/scripts/stores/dialog'
import { useMailSenderStore } from '@/scripts/admin/stores/mail-sender'
import FeedbackAlert from '@/scripts/admin/components/FeedbackAlert.vue'
import { useRouter } from 'vue-router'
const paymentStore = usePaymentStore() const paymentStore = usePaymentStore()
const companyStore = useCompanyStore() const companyStore = useCompanyStore()
const modalStore = useModalStore() const modalStore = useModalStore()
const notificationStore = useNotificationStore() const notificationStore = useNotificationStore()
const mailDriversStore = useMailDriverStore()
const dialogStore = useDialogStore() const dialogStore = useDialogStore()
const mailSenderStore = useMailSenderStore()
const router = useRouter()
const { t } = useI18n() const { t } = useI18n()
let isLoading = ref(false) let isLoading = ref(false)
const templateUrl = ref('') const templateUrl = ref('')
const isPreview = ref(false) const isPreview = ref(false)
const mailSenders = ref(null)
const isFetchingInitialData = ref(false)
const emailTemplates = ref(null)
const paymentMailFields = ref([ const paymentMailFields = ref([
'customer', 'customer',
@ -179,7 +235,7 @@ const paymentMailFields = ref([
const paymentMailForm = reactive({ const paymentMailForm = reactive({
id: null, id: null,
from: null, mail_sender_id: null,
to: null, to: null,
subject: 'New Payment', subject: 'New Payment',
body: null, body: null,
@ -198,9 +254,8 @@ const modalData = computed(() => {
}) })
const rules = { const rules = {
from: { mail_sender_id: {
required: helpers.withMessage(t('validation.required'), required), required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
}, },
to: { to: {
required: helpers.withMessage(t('validation.required'), required), required: helpers.withMessage(t('validation.required'), required),
@ -221,18 +276,25 @@ function cancelPreview() {
} }
async function setInitialData() { async function setInitialData() {
let admin = await companyStore.fetchBasicMailConfig()
paymentMailForm.id = modalStore.id paymentMailForm.id = modalStore.id
if (admin.data) {
paymentMailForm.from = admin.data.from_mail
}
if (modalData.value) { if (modalData.value) {
paymentMailForm.to = modalData.value.customer.email paymentMailForm.to = modalData.value.customer.email
} }
paymentMailForm.body = companyStore.selectedCompanySettings.payment_mail_body paymentMailForm.body = companyStore.selectedCompanySettings.payment_mail_body
isFetchingInitialData.value = true
let mailSenderData = await mailSenderStore.fetchMailSenders({ limit: 'all' })
if (mailSenderData.data) {
mailSenders.value = mailSenderData.data.data
let defaultMailSender = mailSenderData.data.data.find(
(mailSender) => mailSender.is_default == true
)
paymentMailForm.mail_sender_id = defaultMailSender
? defaultMailSender.id
: null
isFetchingInitialData.value = false
}
} }
async function sendPaymentData() { async function sendPaymentData() {
@ -280,4 +342,18 @@ function closeSendPaymentModal() {
modalStore.resetModalData() modalStore.resetModalData()
}, 300) }, 300)
} }
function getTickImage() {
const imgUrl = new URL('/img/tick.png', import.meta.url)
return imgUrl
}
const isMailSenderExist = computed(() => {
return mailSenders.value && mailSenders.value.length
})
function gotoMailSender() {
closeSendPaymentModal()
router.push('/admin/settings/mail-sender')
}
</script> </script>

View File

@ -143,7 +143,7 @@
<template #activator> <template #activator>
<img <img
:src="previewAvatar" :src="previewAvatar"
class="block w-8 h-8 rounded md:h-9 md:w-9" class="block w-8 h-8 rounded md:h-9 md:w-9 object-cover"
/> />
</template> </template>

View File

@ -1,146 +0,0 @@
import axios from 'axios'
import { defineStore } from 'pinia'
import { useNotificationStore } from '@/scripts/stores/notification'
import { handleError } from '@/scripts/helpers/error-handling'
export const useMailDriverStore = (useWindow = false) => {
const defineStoreFunc = useWindow ? window.pinia.defineStore : defineStore
const { global } = window.i18n
return defineStoreFunc({
id: 'mail-driver',
state: () => ({
mailConfigData: null,
mail_driver: 'smtp',
mail_drivers: [],
basicMailConfig: {
mail_driver: '',
mail_host: '',
from_mail: '',
from_name: '',
},
mailgunConfig: {
mail_driver: '',
mail_mailgun_domain: '',
mail_mailgun_secret: '',
mail_mailgun_endpoint: '',
from_mail: '',
from_name: '',
},
sesConfig: {
mail_driver: '',
mail_host: '',
mail_port: null,
mail_ses_key: '',
mail_ses_secret: '',
mail_encryption: 'tls',
from_mail: '',
from_name: '',
},
smtpConfig: {
mail_driver: '',
mail_host: '',
mail_port: null,
mail_username: '',
mail_password: '',
mail_encryption: 'tls',
from_mail: '',
from_name: '',
},
}),
actions: {
fetchMailDrivers() {
return new Promise((resolve, reject) => {
axios
.get('/api/v1/mail/drivers')
.then((response) => {
if (response.data) {
this.mail_drivers = response.data
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
fetchMailConfig() {
return new Promise((resolve, reject) => {
axios
.get('/api/v1/mail/config')
.then((response) => {
if (response.data) {
this.mailConfigData = response.data
this.mail_driver = response.data.mail_driver
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
updateMailConfig(data) {
return new Promise((resolve, reject) => {
axios
.post('/api/v1/mail/config', data)
.then((response) => {
const notificationStore = useNotificationStore()
if (response.data.success) {
notificationStore.showNotification({
type: 'success',
message: global.t('wizard.success.' + response.data.success),
})
} else {
notificationStore.showNotification({
type: 'error',
message: global.t('wizard.errors.' + response.data.error),
})
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
sendTestMail(data) {
return new Promise((resolve, reject) => {
axios
.post('/api/v1/mail/test', data)
.then((response) => {
const notificationStore = useNotificationStore()
if (response.data.success) {
notificationStore.showNotification({
type: 'success',
message: global.t('general.send_mail_successfully'),
})
} else {
notificationStore.showNotification({
type: 'error',
message: global.t('validation.something_went_wrong'),
})
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
},
})()
}

View File

@ -0,0 +1,202 @@
import axios from 'axios'
import { defineStore } from 'pinia'
import { useNotificationStore } from '@/scripts/stores/notification'
import { handleError } from '@/scripts/helpers/error-handling'
import mailSenderStub from '@/scripts/admin/stub/mail-sender.js'
export const useMailSenderStore = (useWindow = false) => {
const pre_t = 'settings.mail_sender'
const defineStoreFunc = useWindow ? window.pinia.defineStore : defineStore
const { global } = window.i18n
return defineStoreFunc({
id: 'mailSender',
state: () => ({
mailSenders: [],
mail_drivers: [], // list of mail drivers
currentMailSender: { ...mailSenderStub.basicConfig },
smtpConfig: { ...mailSenderStub.smtpConfig },
mailgunConfig: { ...mailSenderStub.mailgunConfig },
sesConfig: { ...mailSenderStub.sesConfig },
mail_encryptions: ['none', 'tls', 'ssl', 'starttls'],
isDisable: false
}),
getters: {
isEdit: (state) => (state.currentMailSender.id ? true : false),
},
actions: {
resetCurrentMailSender() {
this.currentMailSender = { ...mailSenderStub.basicConfig }
this.smtpConfig = { ...mailSenderStub.smtpConfig }
this.mailgunConfig = { ...mailSenderStub.mailgunConfig }
this.sesConfig = { ...mailSenderStub.sesConfig }
this.isDisable = false
},
fetchMailDrivers() {
return new Promise((resolve, reject) => {
axios
.get('/api/v1/mail-drivers')
.then((response) => {
if (response.data) {
this.mail_drivers = response.data
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
fetchMailSenders(params) {
return new Promise((resolve, reject) => {
axios
.get(`/api/v1/mail-senders`, { params })
.then((response) => {
this.mailSenders = response.data.data
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
fetchMailSender(id) {
return new Promise((resolve, reject) => {
axios
.get(`/api/v1/mail-senders/${id}`)
.then((response) => {
this.currentMailSender = response.data.data
this.isDisable = response.data.data.is_default
if (response.data.data.settings) {
var settings = response.data.data.settings
const encryptionNone = settings.encryption == '' || settings.encryption == undefined
switch (response.data.data.driver) {
case 'smtp':
this.smtpConfig = settings
encryptionNone ? this.smtpConfig.encryption = 'none' : ''
break
case 'mailgun':
this.mailgunConfig = settings
break
case 'ses':
this.sesConfig = settings
encryptionNone ? this.sesConfig.encryption = 'none' : ''
break
}
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
addMailSender(data) {
const notificationStore = useNotificationStore()
return new Promise((resolve, reject) => {
axios
.post('/api/v1/mail-senders', data)
.then((response) => {
this.mailSenders.push(response.data.data)
notificationStore.showNotification({
type: 'success',
message: global.t(`${pre_t}.created_message`),
})
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
updateMailSender(data) {
const notificationStore = useNotificationStore()
return new Promise((resolve, reject) => {
axios
.put(`/api/v1/mail-senders/${data.id}`, data)
.then((response) => {
if (response.data) {
let pos = this.mailSenders.findIndex(
(mailSender) => mailSender.id === response.data.data.id
)
this.mailSenders[pos] = data
notificationStore.showNotification({
type: 'success',
message: global.t(`${pre_t}.updated_message`),
})
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
deleteMailSender(id) {
return new Promise((resolve, reject) => {
axios
.delete(`/api/v1/mail-senders/${id}`)
.then((response) => {
if (response.data.success) {
let index = this.mailSenders.findIndex(
(mailSender) => mailSender.id === id
)
this.mailSenders.splice(index, 1)
const notificationStore = useNotificationStore()
notificationStore.showNotification({
type: 'success',
message: global.t(`${pre_t}.deleted_message`),
})
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
sendTestMail(data) {
return new Promise((resolve, reject) => {
axios
.post('/api/v1/mail-test', data)
.then((response) => {
const notificationStore = useNotificationStore()
if (response.data.success) {
notificationStore.showNotification({
type: 'success',
message: global.t('general.send_mail_successfully'),
})
} else {
notificationStore.showNotification({
type: 'error',
message: global.t('validation.something_went_wrong'),
})
}
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
},
})()
}

View File

@ -25,6 +25,7 @@ export const useUsersStore = (useWindow = false) => {
password: null, password: null,
phone: null, phone: null,
companies: [], companies: [],
sender_id: null,
}, },
}), }),

View File

@ -64,6 +64,13 @@ export default {
EDIT_ROLE: 'edit-role', EDIT_ROLE: 'edit-role',
VIEW_ROLE: 'view-role', VIEW_ROLE: 'view-role',
// Mail Sender
CREATE_MAIL_SENDER: 'view-mail-sender',
DELETE_MAIL_SENDER: 'delete-mail-sender',
EDIT_MAIL_SENDER: 'edit-mail-sender',
VIEW_MAIL_SENDER: 'view-mail-sender',
// exchange rates // exchange rates
VIEW_EXCHANGE_RATE: 'view-exchange-rate-provider', VIEW_EXCHANGE_RATE: 'view-exchange-rate-provider',
CREATE_EXCHANGE_RATE: 'create-exchange-rate-provider', CREATE_EXCHANGE_RATE: 'create-exchange-rate-provider',

View File

@ -15,5 +15,6 @@ export default function () {
customFields: [], customFields: [],
fields: [], fields: [],
enable_portal: false, enable_portal: false,
mail_sender_id: null,
} }
} }

View File

@ -0,0 +1,31 @@
export default {
basicConfig: {
name: '',
from_name: '',
from_address: '',
cc: '',
bcc: '',
is_default: false,
driver: 'smtp', // 'smtp', 'mail', 'sendmail', 'mailgun', 'ses'
settings: '',
},
smtpConfig: {
host: '',
port: null,
username: '',
password: '',
encryption: 'tls', // 'tls', 'ssl', 'starttls'
},
mailgunConfig: {
domain: '',
secret: '',
endpoint: '',
},
sesConfig: {
host: '',
port: null,
encryption: 'tls', // 'tls', 'ssl', 'starttls'
ses_key: '',
ses_secret: '',
},
}

View File

@ -256,6 +256,7 @@
/> </template /> </template
></BaseInput> ></BaseInput>
</BaseInputGroup> </BaseInputGroup>
<!-- && setPasswordMethod !== 'manual' -->
</BaseInputGrid> </BaseInputGrid>
</div> </div>
@ -650,10 +651,7 @@ const rules = computed(() => {
}, },
email: { email: {
required: helpers.withMessage( required: helpers.withMessage(t('validation.required'), required),
t('validation.required'),
requiredIf(customerStore.currentCustomer.enable_portal == true)
),
email: helpers.withMessage(t('validation.email_incorrect'), email), email: helpers.withMessage(t('validation.email_incorrect'), email),
}, },
password: { password: {

View File

@ -3,75 +3,238 @@
:title="$t('wizard.mail.mail_config')" :title="$t('wizard.mail.mail_config')"
:description="$t('wizard.mail.mail_config_desc')" :description="$t('wizard.mail.mail_config_desc')"
> >
<form action="" @submit.prevent="next"> <form action="" @submit.prevent="submitMailSenderData">
<component <div class="p-4 sm:p-6 my-2">
:is="mailDriverStore.mail_driver" <!-- Name -->
:config-data="mailDriverStore.mailConfigData" <BaseInputGrid>
:is-saving="isSaving" <BaseInputGroup
:is-fetching-initial-data="isFetchingInitialData" :label="$t(`${pre_t}.name`)"
@on-change-driver="(val) => changeDriver(val)" :error="v$.name.$error && v$.name.$errors[0].$message"
@submit-data="next" :help-text="$t(`${pre_t}.name_help`)"
/> required
>
<BaseInput
v-model.trim="mailSenderStore.currentMailSender.name"
:invalid="v$.name.$error"
type="text"
@input="v$.name.$touch()"
/>
</BaseInputGroup>
<!-- From Name -->
<BaseInputGroup
:label="$t(`${pre_t}.from_name`)"
:error="v$.from_name.$error && v$.from_name.$errors[0].$message"
required
>
<BaseInput
v-model="mailSenderStore.currentMailSender.from_name"
:invalid="v$.from_name.$error"
type="text"
@input="v$.from_name.$touch()"
/>
</BaseInputGroup>
<!-- From Address -->
<BaseInputGroup
:label="$t(`${pre_t}.from_address`)"
:error="
v$.from_address.$error && v$.from_address.$errors[0].$message
"
required
>
<BaseInput
v-model="mailSenderStore.currentMailSender.from_address"
:invalid="v$.from_address.$error"
type="text"
@input="v$.from_address.$touch()"
/>
</BaseInputGroup>
<!-- CC -->
<BaseInputGroup
:label="$t(`${pre_t}.cc`)"
:error="v$.cc.$error && v$.cc.$errors[0].$message"
:help-text="$t(`${pre_t}.email_list`)"
>
<BaseInput
v-model="mailSenderStore.currentMailSender.cc"
:invalid="v$.cc.$error"
type="text"
@input="v$.cc.$touch()"
/>
</BaseInputGroup>
<!-- BCC -->
<BaseInputGroup
:label="$t(`${pre_t}.bcc`)"
:error="v$.bcc.$error && v$.bcc.$errors[0].$message"
:help-text="$t(`${pre_t}.email_list`)"
>
<BaseInput
v-model="mailSenderStore.currentMailSender.bcc"
:invalid="v$.bcc.$error"
type="text"
@input="v$.bcc.$touch()"
/>
</BaseInputGroup>
<!-- Mail Driver -->
<BaseInputGroup
:label="$t(`${pre_t}.driver`)"
:error="v$.driver.$error && v$.driver.$errors[0].$message"
required
>
<BaseMultiselect
v-model="mailSenderStore.currentMailSender.driver"
:options="mailSenderStore.mail_drivers"
:can-deselect="false"
:invalid="v$.driver.$error"
/>
</BaseInputGroup>
<component
:is="loadMailDriver"
:mail-sender-store="mailSenderStore"
/>
</BaseInputGrid>
<BaseDivider class="my-4" />
<BaseButton
:loading="isSaving"
:disabled="isSaving"
variant="primary"
type="submit"
>
<template #left="slotProps">
<BaseIcon
v-if="!isSaving"
name="SaveIcon"
:class="slotProps.class"
/>
</template>
{{ $t('wizard.save_cont') }}
</BaseButton>
</div>
</form> </form>
</BaseWizardStep> </BaseWizardStep>
</template> </template>
<script> <script setup>
import Smtp from './mail-driver/SmtpMailDriver.vue' import { computed, ref, inject, onMounted } from 'vue'
import Mailgun from './mail-driver/MailgunMailDriver.vue' import { useI18n } from 'vue-i18n'
import Ses from './mail-driver/SesMailDriver.vue' import { useMailSenderStore } from '@/scripts/admin/stores/mail-sender'
import Basic from './mail-driver/BasicMailDriver.vue' import { useVuelidate } from '@vuelidate/core'
import { useMailDriverStore } from '@/scripts/admin/stores/mail-driver' import { required, email, minLength, helpers } from '@vuelidate/validators'
import { ref } from 'vue' import MailSenderDropdown from '@/scripts/admin/components/dropdowns/MailSenderIndexDropdown.vue'
import MailSenderTestModal from '@/scripts/admin/components/modal-components/MailSenderTestModal.vue'
import SmtpDriver from '@/scripts/admin/views/settings/mail-sender/SmtpDriver.vue'
import MailgunDriver from '@/scripts/admin/views/settings/mail-sender/MailgunDriver.vue'
import SesDriver from '@/scripts/admin/views/settings/mail-sender/SesDriver.vue'
export default { const pre_t = 'settings.mail_sender'
components: { const mailSenderStore = useMailSenderStore()
Smtp, const { t } = useI18n()
Mailgun, const table = ref(null)
Ses, const utils = inject('utils')
sendmail: Basic, let isSaving = ref(false)
Mail: Basic, const emit = defineEmits(['next'])
},
emits: ['next'], const loadMailDriver = computed(() => {
switch (mailSenderStore.currentMailSender.driver) {
case 'smtp':
return SmtpDriver
break
case 'mail':
return false
break
case 'sendmail':
return false
break
case 'mailgun':
return MailgunDriver
break
case 'ses':
return SesDriver
break
default:
return false
}
})
setup(props, { emit }) { // This is multiple email custom validation
const isSaving = ref(false) const multiEmail = (value) => {
const isFetchingInitialData = ref(false) if (value == '' || value === null) return true
const emailRegex =
/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i
const mailDriverStore = useMailDriverStore() const emailArr = value.split(',')
let isValid = emailArr.every((v) => {
mailDriverStore.mail_driver = 'mail' return emailRegex.test(v)
})
loadData() return isValid
function changeDriver(value) {
mailDriverStore.mail_driver = value
}
async function loadData() {
isFetchingInitialData.value = true
await mailDriverStore.fetchMailDrivers()
isFetchingInitialData.value = false
}
async function next(mailConfigData) {
isSaving.value = true
let res = await mailDriverStore.updateMailConfig(mailConfigData)
isSaving.value = false
if (res.data.success) {
await emit('next', 5)
}
}
return {
mailDriverStore,
isSaving,
isFetchingInitialData,
changeDriver,
next,
}
},
} }
const rules = computed(() => {
return {
name: {
required: helpers.withMessage(t('validation.required'), required),
minLength: helpers.withMessage(
t('validation.name_min_length', { count: 3 }),
minLength(3)
),
},
from_name: {
required: helpers.withMessage(t('validation.required'), required),
},
from_address: {
required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
},
cc: {
multiEmail: helpers.withMessage(
t('validation.email_incorrect'),
multiEmail
),
},
bcc: {
multiEmail: helpers.withMessage(
t('validation.email_incorrect'),
multiEmail
),
},
driver: {
required: helpers.withMessage(t('validation.required'), required),
},
}
})
const v$ = useVuelidate(
rules,
computed(() => mailSenderStore.currentMailSender)
)
async function submitMailSenderData() {
v$.value.$touch()
if (v$.value.$invalid) {
return true
}
try {
let data = {
...mailSenderStore.currentMailSender,
is_default: true,
}
await mailSenderStore.addMailSender(data)
isSaving.value = true
emit('next')
isSaving.value = false
} catch (err) {
isSaving.value = false
return true
}
}
onMounted(async () => {
await mailSenderStore.fetchMailDrivers()
})
</script> </script>

View File

@ -54,8 +54,6 @@
label="name" label="name"
:options="itemStore.itemUnits" :options="itemStore.itemUnits"
value-prop="id" value-prop="id"
:can-deselect="false"
:can-clear="false"
:placeholder="$t('items.select_a_unit')" :placeholder="$t('items.select_a_unit')"
searchable searchable
track-by="name" track-by="name"

View File

@ -1,158 +0,0 @@
<template>
<form @submit.prevent="saveEmailConfig">
<BaseInputGrid>
<BaseInputGroup
:label="$t('settings.mail.driver')"
:content-loading="isFetchingInitialData"
:error="
v$.basicMailConfig.mail_driver.$error &&
v$.basicMailConfig.mail_driver.$errors[0].$message
"
required
>
<BaseMultiselect
v-model="mailDriverStore.basicMailConfig.mail_driver"
:content-loading="isFetchingInitialData"
:options="mailDrivers"
:can-deselect="false"
:invalid="v$.basicMailConfig.mail_driver.$error"
@update:modelValue="onChangeDriver"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.from_mail')"
:content-loading="isFetchingInitialData"
:error="
v$.basicMailConfig.from_mail.$error &&
v$.basicMailConfig.from_mail.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.basicMailConfig.from_mail"
:content-loading="isFetchingInitialData"
type="text"
name="from_mail"
:invalid="v$.basicMailConfig.from_mail.$error"
@input="v$.basicMailConfig.from_mail.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.from_name')"
:content-loading="isFetchingInitialData"
:error="
v$.basicMailConfig.from_name.$error &&
v$.basicMailConfig.from_name.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.basicMailConfig.from_name"
:content-loading="isFetchingInitialData"
type="text"
name="name"
:invalid="v$.basicMailConfig.from_name.$error"
@input="v$.basicMailConfig.from_name.$touch()"
/>
</BaseInputGroup>
</BaseInputGrid>
<div class="flex mt-8">
<BaseButton
:content-loading="isFetchingInitialData"
:disabled="isSaving"
:loading="isSaving"
variant="primary"
type="submit"
>
<template #left="slotProps">
<BaseIcon v-if="!isSaving" :class="slotProps.class" name="SaveIcon" />
</template>
{{ $t('general.save') }}
</BaseButton>
<slot />
</div>
</form>
</template>
<script setup>
import { onMounted, computed } from 'vue'
import { required, email, helpers } from '@vuelidate/validators'
import useVuelidate from '@vuelidate/core'
import { useI18n } from 'vue-i18n'
import { useMailDriverStore } from '@/scripts/admin/stores/mail-driver'
const props = defineProps({
configData: {
type: Object,
require: true,
default: Object,
},
isSaving: {
type: Boolean,
require: true,
default: false,
},
isFetchingInitialData: {
type: Boolean,
require: true,
default: false,
},
mailDrivers: {
type: Array,
require: true,
default: Array,
},
})
const emit = defineEmits(['submit-data', 'on-change-driver'])
const mailDriverStore = useMailDriverStore()
const { t } = useI18n()
const rules = computed(() => {
return {
basicMailConfig: {
mail_driver: {
required: helpers.withMessage(t('validation.required'), required),
},
from_mail: {
required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
},
from_name: {
required: helpers.withMessage(t('validation.required'), required),
},
},
}
})
const v$ = useVuelidate(
rules,
computed(() => mailDriverStore)
)
onMounted(() => {
for (const key in mailDriverStore.basicMailConfig) {
if (props.configData.hasOwnProperty(key)) {
mailDriverStore.$patch((state) => {
state.basicMailConfig[key] = props.configData[key]
})
}
}
})
async function saveEmailConfig() {
v$.value.basicMailConfig.$touch()
if (!v$.value.basicMailConfig.$invalid) {
emit('submit-data', mailDriverStore.basicMailConfig)
}
return false
}
function onChangeDriver() {
v$.value.basicMailConfig.mail_driver.$touch()
emit('on-change-driver', mailDriverStore.basicMailConfig.mail_driver)
}
</script>

View File

@ -1,247 +0,0 @@
<template>
<form @submit.prevent="saveEmailConfig">
<BaseInputGrid>
<BaseInputGroup
:label="$t('settings.mail.driver')"
:content-loading="isFetchingInitialData"
:error="
v$.mailgunConfig.mail_driver.$error &&
v$.mailgunConfig.mail_driver.$errors[0].$message
"
required
>
<BaseMultiselect
v-model="mailDriverStore.mailgunConfig.mail_driver"
:content-loading="isFetchingInitialData"
:options="mailDrivers"
:can-deselect="false"
:invalid="v$.mailgunConfig.mail_driver.$error"
@update:modelValue="onChangeDriver"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.mailgun_domain')"
:content-loading="isFetchingInitialData"
:error="
v$.mailgunConfig.mail_mailgun_domain.$error &&
v$.mailgunConfig.mail_mailgun_domain.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.mailgunConfig.mail_mailgun_domain"
:content-loading="isFetchingInitialData"
type="text"
name="mailgun_domain"
:invalid="v$.mailgunConfig.mail_mailgun_domain.$error"
@input="v$.mailgunConfig.mail_mailgun_domain.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.mailgun_secret')"
:content-loading="isFetchingInitialData"
:error="
v$.mailgunConfig.mail_mailgun_secret.$error &&
v$.mailgunConfig.mail_mailgun_secret.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.mailgunConfig.mail_mailgun_secret"
:content-loading="isFetchingInitialData"
:type="getInputType"
name="mailgun_secret"
autocomplete="off"
:invalid="v$.mailgunConfig.mail_mailgun_secret.$error"
@input="v$.mailgunConfig.mail_mailgun_secret.$touch()"
>
<template #right>
<BaseIcon
v-if="isShowPassword"
class="mr-1 text-gray-500 cursor-pointer"
name="EyeOffIcon"
@click="isShowPassword = !isShowPassword"
/>
<BaseIcon
v-else
class="mr-1 text-gray-500 cursor-pointer"
name="EyeIcon"
@click="isShowPassword = !isShowPassword"
/>
</template>
</BaseInput>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.mailgun_endpoint')"
:content-loading="isFetchingInitialData"
:error="
v$.mailgunConfig.mail_mailgun_endpoint.$error &&
v$.mailgunConfig.mail_mailgun_endpoint.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.mailgunConfig.mail_mailgun_endpoint"
:content-loading="isFetchingInitialData"
type="text"
name="mailgun_endpoint"
:invalid="v$.mailgunConfig.mail_mailgun_endpoint.$error"
@input="v$.mailgunConfig.mail_mailgun_endpoint.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.from_mail')"
:content-loading="isFetchingInitialData"
:error="
v$.mailgunConfig.from_mail.$error &&
v$.mailgunConfig.from_mail.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.mailgunConfig.from_mail"
:content-loading="isFetchingInitialData"
type="text"
name="from_mail"
:invalid="v$.mailgunConfig.from_mail.$error"
@input="v$.mailgunConfig.from_mail.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.from_name')"
:content-loading="isFetchingInitialData"
:error="
v$.mailgunConfig.from_name.$error &&
v$.mailgunConfig.from_name.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.mailgunConfig.from_name"
:content-loading="isFetchingInitialData"
type="text"
name="from_name"
:invalid="v$.mailgunConfig.from_name.$error"
@input="v$.mailgunConfig.from_name.$touch()"
/>
</BaseInputGroup>
</BaseInputGrid>
<div class="flex my-10">
<BaseButton
:disabled="isSaving"
:content-loading="isFetchingInitialData"
:loading="isSaving"
variant="primary"
type="submit"
>
<template #left="slotProps">
<BaseIcon v-if="!isSaving" name="SaveIcon" :class="slotProps.class" />
</template>
{{ $t('general.save') }}
</BaseButton>
<slot />
</div>
</form>
</template>
<script setup>
import { onMounted, ref, computed } from 'vue'
import { required, email, helpers } from '@vuelidate/validators'
import useVuelidate from '@vuelidate/core'
import { useI18n } from 'vue-i18n'
import { useMailDriverStore } from '@/scripts/admin/stores/mail-driver'
const props = defineProps({
configData: {
type: Object,
require: true,
default: Object,
},
isSaving: {
type: Boolean,
require: true,
default: false,
},
isFetchingInitialData: {
type: Boolean,
require: true,
default: false,
},
mailDrivers: {
type: Array,
require: true,
default: Array,
},
})
const emit = defineEmits(['submit-data', 'on-change-driver'])
const mailDriverStore = useMailDriverStore()
const { t } = useI18n()
let isShowPassword = ref(false)
const getInputType = computed(() => {
if (isShowPassword.value) {
return 'text'
}
return 'password'
})
const rules = computed(() => {
return {
mailgunConfig: {
mail_driver: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_mailgun_domain: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_mailgun_endpoint: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_mailgun_secret: {
required: helpers.withMessage(t('validation.required'), required),
},
from_mail: {
required: helpers.withMessage(t('validation.required'), required),
email,
},
from_name: {
required: helpers.withMessage(t('validation.required'), required),
},
},
}
})
const v$ = useVuelidate(
rules,
computed(() => mailDriverStore)
)
onMounted(() => {
for (const key in mailDriverStore.mailgunConfig) {
if (props.configData.hasOwnProperty(key)) {
mailDriverStore.mailgunConfig[key] = props.configData[key]
}
}
})
async function saveEmailConfig() {
v$.value.mailgunConfig.$touch()
if (!v$.value.mailgunConfig.$invalid) {
emit('submit-data', mailDriverStore.mailgunConfig)
}
return false
}
function onChangeDriver() {
v$.value.mailgunConfig.mail_driver.$touch()
emit('on-change-driver', mailDriverStore.mailgunConfig.mail_driver)
}
</script>

View File

@ -1,294 +0,0 @@
<template>
<form @submit.prevent="saveEmailConfig">
<BaseInputGrid>
<BaseInputGroup
:label="$t('settings.mail.driver')"
:content-loading="isFetchingInitialData"
:error="
v$.sesConfig.mail_driver.$error &&
v$.sesConfig.mail_driver.$errors[0].$message
"
required
>
<BaseMultiselect
v-model="mailDriverStore.sesConfig.mail_driver"
:content-loading="isFetchingInitialData"
:options="mailDrivers"
:can-deselect="false"
:invalid="v$.sesConfig.mail_driver.$error"
@update:modelValue="onChangeDriver"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.host')"
:content-loading="isFetchingInitialData"
:error="
v$.sesConfig.mail_host.$error &&
v$.sesConfig.mail_host.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.sesConfig.mail_host"
:content-loading="isFetchingInitialData"
type="text"
name="mail_host"
:invalid="v$.sesConfig.mail_host.$error"
@input="v$.sesConfig.mail_host.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.port')"
:content-loading="isFetchingInitialData"
:error="
v$.sesConfig.mail_port.$error &&
v$.sesConfig.mail_port.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.sesConfig.mail_port"
:content-loading="isFetchingInitialData"
type="text"
name="mail_port"
:invalid="v$.sesConfig.mail_port.$error"
@input="v$.sesConfig.mail_port.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.encryption')"
:content-loading="isFetchingInitialData"
:error="
v$.sesConfig.mail_encryption.$error &&
v$.sesConfig.mail_encryption.$errors[0].$message
"
required
>
<BaseMultiselect
v-model.trim="mailDriverStore.sesConfig.mail_encryption"
:content-loading="isFetchingInitialData"
:options="encryptions"
:invalid="v$.sesConfig.mail_encryption.$error"
placeholder="Select option"
@input="v$.sesConfig.mail_encryption.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.from_mail')"
:content-loading="isFetchingInitialData"
:error="
v$.sesConfig.from_mail.$error &&
v$.sesConfig.from_mail.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.sesConfig.from_mail"
:content-loading="isFetchingInitialData"
type="text"
name="from_mail"
:invalid="v$.sesConfig.from_mail.$error"
@input="v$.sesConfig.from_mail.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.from_name')"
:content-loading="isFetchingInitialData"
:error="
v$.sesConfig.from_name.$error &&
v$.sesConfig.from_name.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.sesConfig.from_name"
:content-loading="isFetchingInitialData"
type="text"
name="name"
:invalid="v$.sesConfig.from_name.$error"
@input="v$.sesConfig.from_name.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.ses_key')"
:content-loading="isFetchingInitialData"
:error="
v$.sesConfig.mail_ses_key.$error &&
v$.sesConfig.mail_ses_key.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.sesConfig.mail_ses_key"
:content-loading="isFetchingInitialData"
type="text"
name="mail_ses_key"
:invalid="v$.sesConfig.mail_ses_key.$error"
@input="v$.sesConfig.mail_ses_key.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.ses_secret')"
:content-loading="isFetchingInitialData"
:error="
v$.sesConfig.mail_ses_secret.$error &&
v$.mail_ses_secret.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.sesConfig.mail_ses_secret"
:content-loading="isFetchingInitialData"
:type="getInputType"
name="mail_ses_secret"
autocomplete="off"
:invalid="v$.sesConfig.mail_ses_secret.$error"
@input="v$.sesConfig.mail_ses_secret.$touch()"
>
<template #right>
<BaseIcon
v-if="isShowPassword"
class="mr-1 text-gray-500 cursor-pointer"
name="EyeOffIcon"
@click="isShowPassword = !isShowPassword"
/>
<BaseIcon
v-else
class="mr-1 text-gray-500 cursor-pointer"
name="EyeIcon"
@click="isShowPassword = !isShowPassword"
/>
</template>
</BaseInput>
</BaseInputGroup>
</BaseInputGrid>
<div class="flex my-10">
<BaseButton
:disabled="isSaving"
:content-loading="isFetchingInitialData"
:loading="isSaving"
variant="primary"
type="submit"
>
<template #left="slotProps">
<BaseIcon v-if="!isSaving" name="SaveIcon" :class="slotProps.class" />
</template>
{{ $t('general.save') }}
</BaseButton>
<slot />
</div>
</form>
</template>
<script setup>
import { computed, onMounted, reactive, ref } from 'vue'
import { required, email, numeric, helpers } from '@vuelidate/validators'
import useVuelidate from '@vuelidate/core'
import { useI18n } from 'vue-i18n'
import { useMailDriverStore } from '@/scripts/admin/stores/mail-driver'
const props = defineProps({
configData: {
type: Object,
require: true,
default: Object,
},
isSaving: {
type: Boolean,
require: true,
default: false,
},
isFetchingInitialData: {
type: Boolean,
require: true,
default: false,
},
mailDrivers: {
type: Array,
require: true,
default: Array,
},
})
const emit = defineEmits(['submit-data', 'on-change-driver'])
const mailDriverStore = useMailDriverStore()
const { t } = useI18n()
let isShowPassword = ref(false)
const encryptions = reactive(['tls', 'ssl', 'starttls'])
const rules = computed(() => {
return {
sesConfig: {
mail_driver: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_host: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_port: {
required: helpers.withMessage(t('validation.required'), required),
numeric,
},
mail_ses_key: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_ses_secret: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_encryption: {
required: helpers.withMessage(t('validation.required'), required),
},
from_mail: {
required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
},
from_name: {
required: helpers.withMessage(t('validation.required'), required),
},
},
}
})
const v$ = useVuelidate(
rules,
computed(() => mailDriverStore)
)
const getInputType = computed(() => {
if (isShowPassword.value) {
return 'text'
}
return 'password'
})
onMounted(() => {
for (const key in mailDriverStore.sesConfig) {
if (props.configData.hasOwnProperty(key)) {
mailDriverStore.sesConfig[key] = props.configData[key]
}
}
})
async function saveEmailConfig() {
v$.value.sesConfig.$touch()
if (!v$.value.sesConfig.$invalid) {
emit('submit-data', mailDriverStore.sesConfig)
}
return false
}
function onChangeDriver() {
v$.value.sesConfig.mail_driver.$touch()
emit('on-change-driver', mailDriverStore.sesConfig.mail_driver)
}
</script>

View File

@ -1,275 +0,0 @@
<template>
<form @submit.prevent="saveEmailConfig">
<BaseInputGrid>
<BaseInputGroup
:label="$t('settings.mail.driver')"
:content-loading="isFetchingInitialData"
:error="
v$.smtpConfig.mail_driver.$error &&
v$.smtpConfig.mail_driver.$errors[0].$message
"
required
>
<BaseMultiselect
v-model="mailDriverStore.smtpConfig.mail_driver"
:content-loading="isFetchingInitialData"
:options="mailDrivers"
:can-deselect="false"
:invalid="v$.smtpConfig.mail_driver.$error"
@update:modelValue="onChangeDriver"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.host')"
:content-loading="isFetchingInitialData"
:error="
v$.smtpConfig.mail_host.$error &&
v$.smtpConfig.mail_host.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.smtpConfig.mail_host"
:content-loading="isFetchingInitialData"
type="text"
name="mail_host"
:invalid="v$.smtpConfig.mail_host.$error"
@input="v$.smtpConfig.mail_host.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:content-loading="isFetchingInitialData"
:label="$t('settings.mail.username')"
>
<BaseInput
v-model.trim="mailDriverStore.smtpConfig.mail_username"
:content-loading="isFetchingInitialData"
type="text"
name="db_name"
/>
</BaseInputGroup>
<BaseInputGroup
:content-loading="isFetchingInitialData"
:label="$t('settings.mail.password')"
>
<BaseInput
v-model.trim="mailDriverStore.smtpConfig.mail_password"
:content-loading="isFetchingInitialData"
:type="getInputType"
name="password"
>
<template #right>
<BaseIcon
v-if="isShowPassword"
class="mr-1 text-gray-500 cursor-pointer"
name="EyeOffIcon"
@click="isShowPassword = !isShowPassword"
/>
<BaseIcon
v-else
class="mr-1 text-gray-500 cursor-pointer"
name="EyeIcon"
@click="isShowPassword = !isShowPassword"
/>
</template>
</BaseInput>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.port')"
:content-loading="isFetchingInitialData"
:error="
v$.smtpConfig.mail_port.$error &&
v$.smtpConfig.mail_port.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.smtpConfig.mail_port"
:content-loading="isFetchingInitialData"
type="text"
name="mail_port"
:invalid="v$.smtpConfig.mail_port.$error"
@input="v$.smtpConfig.mail_port.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.encryption')"
:content-loading="isFetchingInitialData"
:error="
v$.smtpConfig.mail_encryption.$error &&
v$.smtpConfig.mail_encryption.$errors[0].$message
"
required
>
<BaseMultiselect
v-model.trim="mailDriverStore.smtpConfig.mail_encryption"
:content-loading="isFetchingInitialData"
:options="encryptions"
:searchable="true"
:show-labels="false"
placeholder="Select option"
:invalid="v$.smtpConfig.mail_encryption.$error"
@input="v$.smtpConfig.mail_encryption.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.from_mail')"
:content-loading="isFetchingInitialData"
:error="
v$.smtpConfig.from_mail.$error &&
v$.smtpConfig.from_mail.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.smtpConfig.from_mail"
:content-loading="isFetchingInitialData"
type="text"
name="from_mail"
:invalid="v$.smtpConfig.from_mail.$error"
@input="v$.smtpConfig.from_mail.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('settings.mail.from_name')"
:content-loading="isFetchingInitialData"
:error="
v$.smtpConfig.from_name.$error &&
v$.smtpConfig.from_name.$errors[0].$message
"
required
>
<BaseInput
v-model.trim="mailDriverStore.smtpConfig.from_name"
:content-loading="isFetchingInitialData"
type="text"
name="from_name"
:invalid="v$.smtpConfig.from_name.$error"
@input="v$.smtpConfig.from_name.$touch()"
/>
</BaseInputGroup>
</BaseInputGrid>
<div class="flex my-10">
<BaseButton
:disabled="isSaving"
:content-loading="isFetchingInitialData"
:loading="isSaving"
type="submit"
variant="primary"
>
<template #left="slotProps">
<BaseIcon v-if="!isSaving" name="SaveIcon" :class="slotProps.class" />
</template>
{{ $t('general.save') }}
</BaseButton>
<slot />
</div>
</form>
</template>
<script setup>
import { reactive, onMounted, ref, computed } from 'vue'
import { required, email, numeric, helpers } from '@vuelidate/validators'
import useVuelidate from '@vuelidate/core'
import { useI18n } from 'vue-i18n'
import { useMailDriverStore } from '@/scripts/admin/stores/mail-driver'
const props = defineProps({
configData: {
type: Object,
require: true,
default: Object,
},
isSaving: {
type: Boolean,
require: true,
default: false,
},
isFetchingInitialData: {
type: Boolean,
require: true,
default: false,
},
mailDrivers: {
type: Array,
require: true,
default: Array,
},
})
const emit = defineEmits(['submit-data', 'on-change-driver'])
const mailDriverStore = useMailDriverStore()
const { t } = useI18n()
let isShowPassword = ref(false)
const encryptions = reactive(['tls', 'ssl', 'starttls'])
const getInputType = computed(() => {
if (isShowPassword.value) {
return 'text'
}
return 'password'
})
const rules = computed(() => {
return {
smtpConfig: {
mail_driver: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_host: {
required: helpers.withMessage(t('validation.required'), required),
},
mail_port: {
required: helpers.withMessage(t('validation.required'), required),
numeric: helpers.withMessage(t('validation.numbers_only'), numeric),
},
mail_encryption: {
required: helpers.withMessage(t('validation.required'), required),
},
from_mail: {
required: helpers.withMessage(t('validation.required'), required),
email: helpers.withMessage(t('validation.email_incorrect'), email),
},
from_name: {
required: helpers.withMessage(t('validation.required'), required),
},
},
}
})
const v$ = useVuelidate(
rules,
computed(() => mailDriverStore)
)
onMounted(() => {
for (const key in mailDriverStore.smtpConfig) {
if (props.configData.hasOwnProperty(key)) {
mailDriverStore.smtpConfig[key] = props.configData[key]
}
}
})
async function saveEmailConfig() {
v$.value.smtpConfig.$touch()
if (!v$.value.smtpConfig.$invalid) {
emit('submit-data', mailDriverStore.smtpConfig)
}
return false
}
function onChangeDriver() {
v$.value.smtpConfig.mail_driver.$touch()
emit('on-change-driver', mailDriverStore.smtpConfig.mail_driver)
}
</script>

View File

@ -0,0 +1,136 @@
<template>
<BaseSettingCard
:title="$tc(`${pre_t}.title`, 2)"
:description="$t(`${pre_t}.description`)"
>
<MailSenderModal />
<MailSenderTestModal />
<template #action>
<BaseButton
type="submit"
variant="primary-outline"
@click="openMailSenderModal"
>
<template #left="slotProps">
<BaseIcon :class="slotProps.class" name="PlusIcon" />
</template>
{{ $t(`${pre_t}.add_new_mail_sender`) }}
</BaseButton>
</template>
<BaseTable
ref="table"
class="mt-16"
:data="fetchData"
:columns="mailSenderColumns"
>
<template #cell-is_default="{ row }">
<BaseBadge
:bg-color="
utils.getBadgeStatusColor(row.data.is_default ? 'YES' : 'NO')
.bgColor
"
:color="
utils.getBadgeStatusColor(row.data.is_default ? 'YES' : 'NO').color
"
>
{{ row.data.is_default ? $t('general.yes') : $t('general.no') }}
</BaseBadge>
</template>
<template #cell-actions="{ row }">
<MailSenderDropdown
:row="row.data"
:table="table"
:load-data="refreshTable"
/>
</template>
</BaseTable>
</BaseSettingCard>
</template>
<script setup>
import { computed, ref, inject } from 'vue'
import { useI18n } from 'vue-i18n'
import { useModalStore } from '@/scripts/stores/modal'
import MailSenderModal from '@/scripts/admin/components/modal-components/MailSenderModal.vue'
import { useMailSenderStore } from '@/scripts/admin/stores/mail-sender'
import MailSenderDropdown from '@/scripts/admin/components/dropdowns/MailSenderIndexDropdown.vue'
import MailSenderTestModal from '@/scripts/admin/components/modal-components/MailSenderTestModal.vue'
const pre_t = 'settings.mail_sender'
const modalStore = useModalStore()
const mailSenderStore = useMailSenderStore()
const { t } = useI18n()
const table = ref(null)
const utils = inject('utils')
function openMailSenderModal() {
modalStore.openModal({
title: t(`${pre_t}.add_new_mail_sender`),
componentName: 'MailSenderModal',
size: 'md',
refreshData: refreshTable,
})
}
const mailSenderColumns = computed(() => {
return [
{
key: 'name',
label: t(`${pre_t}.name`),
thClass: 'extra',
tdClass: 'font-medium text-gray-900',
},
{
key: 'driver',
label: t(`${pre_t}.driver`),
thClass: 'extra',
tdClass: 'font-medium text-gray-900',
},
{
key: 'from_address',
label: t(`${pre_t}.from_address`),
thClass: 'extra',
tdClass: 'font-medium text-gray-900',
},
{
key: 'is_default',
label: t(`${pre_t}.is_default`),
thClass: 'extra',
tdClass: 'font-medium text-gray-900',
},
{
key: 'actions',
label: '',
tdClass: 'text-right text-sm font-medium',
sortable: false,
},
]
})
async function fetchData({ page, filter, sort }) {
let data = {
orderByField: sort.fieldName || 'created_at',
orderBy: sort.order || 'desc',
page,
}
let response = await mailSenderStore.fetchMailSenders(data)
return {
data: response.data.data,
pagination: {
totalPages: response.data.meta.last_page,
currentPage: page,
totalCount: response.data.meta.total,
limit: response.data.meta.per_page ? response.data.meta.per_page : 10,
},
}
}
async function refreshTable() {
table.value && table.value.refresh()
}
</script>

View File

@ -0,0 +1,104 @@
<template>
<!-- Domain -->
<BaseInputGroup
:label="$t(`${pre_t}.domain`)"
:error="v$.domain.$error && v$.domain.$errors[0].$message"
required
>
<BaseInput
v-model.trim="mailSenderStore.mailgunConfig.domain"
:invalid="v$.domain.$error"
type="text"
@input="v$.domain.$touch()"
/>
</BaseInputGroup>
<!-- Mailgun Secret -->
<BaseInputGroup
:label="$t(`${pre_t}.secret`)"
:error="v$.secret.$error && v$.secret.$errors[0].$message"
required
>
<BaseInput
v-model="mailSenderStore.mailgunConfig.secret"
:type="getInputType"
autocomplete="off"
:invalid="v$.secret.$error"
@input="v$.secret.$touch()"
>
<template #right>
<BaseIcon
v-if="isShowPassword"
class="mr-1 text-gray-500 cursor-pointer"
name="EyeOffIcon"
@click="isShowPassword = !isShowPassword"
/>
<BaseIcon
v-else
class="mr-1 text-gray-500 cursor-pointer"
name="EyeIcon"
@click="isShowPassword = !isShowPassword"
/>
</template>
</BaseInput>
</BaseInputGroup>
<!-- Mailgun Endpoint -->
<BaseInputGroup
:label="$t(`${pre_t}.endpoint`)"
:error="v$.endpoint.$error && v$.endpoint.$errors[0].$message"
required
>
<BaseInput
v-model.trim="mailSenderStore.mailgunConfig.endpoint"
type="text"
:invalid="v$.endpoint.$error"
@input="v$.endpoint.$touch()"
/>
</BaseInputGroup>
</template>
<script setup>
import { computed, ref } from "vue"
import { useI18n } from "vue-i18n"
import { required, email, numeric, helpers } from "@vuelidate/validators"
import { useVuelidate } from "@vuelidate/core"
const pre_t = "settings.mail_sender.mailgun_config"
const { t } = useI18n()
const props = defineProps({
mailSenderStore: {
type: Object,
require: true,
default: Object,
},
})
let isShowPassword = ref(false)
const getInputType = computed(() => {
if (isShowPassword.value) {
return "text"
}
return "password"
})
const rules = computed(() => {
return {
domain: {
required: helpers.withMessage(t("validation.required"), required),
},
endpoint: {
required: helpers.withMessage(t("validation.required"), required),
},
secret: {
required: helpers.withMessage(t("validation.required"), required),
},
}
})
const v$ = useVuelidate(
rules,
computed(() => props.mailSenderStore.mailgunConfig)
)
</script>

View File

@ -0,0 +1,143 @@
<template>
<!-- Host -->
<BaseInputGroup
:label="$t(`${pre_t}.host`)"
:error="v$.host.$error && v$.host.$errors[0].$message"
required
>
<BaseInput
v-model.trim="mailSenderStore.sesConfig.host"
:invalid="v$.host.$error"
type="text"
@input="v$.host.$touch()"
/>
</BaseInputGroup>
<!-- Port -->
<BaseInputGroup
:label="$t(`${pre_t}.port`)"
:error="v$.port.$error && v$.port.$errors[0].$message"
required
>
<BaseInput
v-model.trim="mailSenderStore.sesConfig.port"
type="text"
:invalid="v$.port.$error"
@input="v$.port.$touch()"
/>
</BaseInputGroup>
<!-- Encryption -->
<BaseInputGroup
:label="$t(`${pre_t}.encryption`)"
:error="v$.encryption.$error && v$.encryption.$errors[0].$message"
required
>
<BaseMultiselect
v-model.trim="mailSenderStore.sesConfig.encryption"
:options="encryptions"
:searchable="true"
:show-labels="false"
:placeholder="$t('general.select_option')"
:invalid="v$.encryption.$error"
@input="v$.encryption.$touch()"
/>
</BaseInputGroup>
<!-- SES Key -->
<BaseInputGroup
:label="$t(`${pre_t}.ses_key`)"
:error="v$.ses_key.$error && v$.ses_key.$errors[0].$message"
required
>
<BaseInput
v-model.trim="mailSenderStore.sesConfig.ses_key"
type="text"
:invalid="v$.ses_key.$error"
@input="v$.ses_key.$touch()"
/>
</BaseInputGroup>
<!-- SES Secret -->
<BaseInputGroup
:label="$t(`${pre_t}.ses_secret`)"
:error="v$.ses_secret.$error && v$.ses_secret.$errors[0].$message"
required
>
<BaseInput
v-model="mailSenderStore.sesConfig.ses_secret"
:type="getInputType"
autocomplete="off"
:invalid="v$.ses_secret.$error"
@input="v$.ses_secret.$touch()"
>
<template #right>
<BaseIcon
v-if="isShowPassword"
class="mr-1 text-gray-500 cursor-pointer"
name="EyeOffIcon"
@click="isShowPassword = !isShowPassword"
/>
<BaseIcon
v-else
class="mr-1 text-gray-500 cursor-pointer"
name="EyeIcon"
@click="isShowPassword = !isShowPassword"
/>
</template>
</BaseInput>
</BaseInputGroup>
</template>
<script setup>
import { computed, ref, reactive } from 'vue'
import { useI18n } from 'vue-i18n'
import { required, email, numeric, helpers } from '@vuelidate/validators'
import { useVuelidate } from '@vuelidate/core'
const pre_t = 'settings.mail_sender.ses_config'
const { t } = useI18n()
const props = defineProps({
mailSenderStore: {
type: Object,
require: true,
default: Object,
},
})
let isShowPassword = ref(false)
const getInputType = computed(() => {
if (isShowPassword.value) {
return 'text'
}
return 'password'
})
const encryptions = props.mailSenderStore.mail_encryptions
const rules = computed(() => {
return {
host: {
required: helpers.withMessage(t('validation.required'), required),
},
port: {
required: helpers.withMessage(t('validation.required'), required),
numeric,
},
encryption: {
required: helpers.withMessage(t('validation.required'), required),
},
ses_key: {
required: helpers.withMessage(t('validation.required'), required),
},
ses_secret: {
required: helpers.withMessage(t('validation.required'), required),
},
}
})
const v$ = useVuelidate(
rules,
computed(() => props.mailSenderStore.sesConfig)
)
</script>

View File

@ -0,0 +1,120 @@
<template>
<!-- Host -->
<BaseInputGroup
:label="$t(`${pre_t}.host`)"
:error="v$.host.$error && v$.host.$errors[0].$message"
required
>
<BaseInput
v-model.trim="mailSenderStore.smtpConfig.host"
:invalid="v$.host.$error"
type="text"
@input="v$.host.$touch()"
/>
</BaseInputGroup>
<!-- Port -->
<BaseInputGroup
:label="$t(`${pre_t}.port`)"
:error="v$.port.$error && v$.port.$errors[0].$message"
required
>
<BaseInput
v-model.trim="mailSenderStore.smtpConfig.port"
type="text"
:invalid="v$.port.$error"
@input="v$.port.$touch()"
/>
</BaseInputGroup>
<!-- Username -->
<BaseInputGroup :label="$t(`${pre_t}.username`)">
<BaseInput v-model.trim="mailSenderStore.smtpConfig.username" type="text" />
</BaseInputGroup>
<!-- Password -->
<BaseInputGroup :label="$t(`${pre_t}.password`)">
<BaseInput
v-model="mailSenderStore.smtpConfig.password"
:type="getInputType"
>
<template #right>
<BaseIcon
v-if="isShowPassword"
class="mr-1 text-gray-500 cursor-pointer"
name="EyeOffIcon"
@click="isShowPassword = !isShowPassword"
/>
<BaseIcon
v-else
class="mr-1 text-gray-500 cursor-pointer"
name="EyeIcon"
@click="isShowPassword = !isShowPassword"
/>
</template>
</BaseInput>
</BaseInputGroup>
<!-- Encryption -->
<BaseInputGroup
:label="$t(`${pre_t}.encryption`)"
:error="v$.encryption.$error && v$.encryption.$errors[0].$message"
required
>
<BaseMultiselect
v-model.trim="mailSenderStore.smtpConfig.encryption"
:options="encryptions"
:searchable="true"
:show-labels="false"
:placeholder="$t('general.select_option')"
:invalid="v$.encryption.$error"
@input="v$.encryption.$touch()"
/>
</BaseInputGroup>
</template>
<script setup>
import { computed, ref, reactive } from 'vue'
import { useI18n } from 'vue-i18n'
import { required, numeric, helpers } from '@vuelidate/validators'
import { useVuelidate } from '@vuelidate/core'
const pre_t = 'settings.mail_sender.smtp_config'
const { t } = useI18n()
const props = defineProps({
mailSenderStore: {
type: Object,
require: true,
default: Object,
},
})
let isShowPassword = ref(false)
const getInputType = computed(() => {
if (isShowPassword.value) {
return 'text'
}
return 'password'
})
const encryptions = props.mailSenderStore.mail_encryptions
const rules = computed(() => {
return {
host: {
required: helpers.withMessage(t('validation.required'), required),
},
port: {
required: helpers.withMessage(t('validation.required'), required),
numeric: helpers.withMessage(t('validation.numbers_only'), numeric),
},
encryption: {
required: helpers.withMessage(t('validation.required'), required),
},
}
})
const v$ = useVuelidate(
rules,
computed(() => props.mailSenderStore.smtpConfig)
)
</script>

View File

@ -162,7 +162,7 @@
</template> </template>
<script setup> <script setup>
import { ref, computed, reactive } from 'vue' import { ref, computed, reactive, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router' import { useRouter, useRoute } from 'vue-router'
import { useCompanyStore } from '@/scripts/admin/stores/company' import { useCompanyStore } from '@/scripts/admin/stores/company'
import { import {

View File

@ -54,7 +54,6 @@
bg-white bg-white
rounded-lg rounded-lg
text-left text-left
overflow-hidden
relative relative
shadow-xl shadow-xl
transition-all transition-all

View File

@ -4,7 +4,7 @@
"customers": "العملاء", "customers": "العملاء",
"items": "بضائع/خدمات", "items": "بضائع/خدمات",
"invoices": "الفواتير", "invoices": "الفواتير",
"recurring-invoices": "الفواتير المتكررة", "recurring-invoices": "Recurring Invoices",
"expenses": "النفقات", "expenses": "النفقات",
"estimates": "التقديرات", "estimates": "التقديرات",
"payments": "الدفوعات", "payments": "الدفوعات",
@ -12,7 +12,7 @@
"settings": "الإعدادات", "settings": "الإعدادات",
"logout": "تسجيل الخروج", "logout": "تسجيل الخروج",
"users": "المستخدمون", "users": "المستخدمون",
"modules": "الإضافات" "modules": "Modules"
}, },
"general": { "general": {
"add_company": "أضف شركة", "add_company": "أضف شركة",
@ -29,9 +29,9 @@
"to_date": "إلى تاريخ", "to_date": "إلى تاريخ",
"from": "من", "from": "من",
"to": "إلى", "to": "إلى",
"ok": "حسناً", "ok": "Ok",
"yes": "نعم", "yes": "Yes",
"no": "لا", "no": "No",
"sort_by": "ترتيب حسب", "sort_by": "ترتيب حسب",
"ascending": "تصاعدي", "ascending": "تصاعدي",
"descending": "تنازلي", "descending": "تنازلي",
@ -39,7 +39,7 @@
"body": "الجسم", "body": "الجسم",
"message": "رسالة", "message": "رسالة",
"send": "إرسال", "send": "إرسال",
"preview": "معاينة", "preview": "Preview",
"go_back": "إلى الخلف", "go_back": "إلى الخلف",
"back_to_login": "العودة إلى تسجيل الدخول؟", "back_to_login": "العودة إلى تسجيل الدخول؟",
"home": "الرئيسية", "home": "الرئيسية",
@ -65,7 +65,7 @@
"sent": "ارسلت", "sent": "ارسلت",
"all": "الكل", "all": "الكل",
"select_all": "تحديد الكل", "select_all": "تحديد الكل",
"select_template": "تحديد القالب", "select_template": "Select Template",
"choose_file": "اضغط هنا لاختيار ملف", "choose_file": "اضغط هنا لاختيار ملف",
"choose_template": "اختيار القالب", "choose_template": "اختيار القالب",
"choose": "اختر", "choose": "اختر",
@ -93,14 +93,14 @@
"no_note_found": "لم يتم العثور على الملاحظة", "no_note_found": "لم يتم العثور على الملاحظة",
"insert_note": "أدخل ملاحظة", "insert_note": "أدخل ملاحظة",
"copied_pdf_url_clipboard": "تم نسخ رابط PDF إلى الحافظة!", "copied_pdf_url_clipboard": "تم نسخ رابط PDF إلى الحافظة!",
"copied_url_clipboard": "تم نسخ الرابط إلى الحافظة!", "copied_url_clipboard": "Copied url to clipboard!",
"docs": "المستندات", "docs": "Docs",
"do_you_wish_to_continue": "هل ترغب في المتابعة؟", "do_you_wish_to_continue": "Do you wish to continue?",
"note": "ملاحظة", "note": "Note",
"pay_invoice": "سدد الفاتورة", "pay_invoice": "Pay Invoice",
"login_successfully": "تم تسجيل الدخول بنجاح!", "login_successfully": "Logged in successfully!",
"logged_out_successfully": "تم تسجيل الخروج", "logged_out_successfully": "Logged out successfully",
"mark_as_default": "تحديد كافتراضي" "mark_as_default": "Mark as default"
}, },
"dashboard": { "dashboard": {
"select_year": "اختر السنة", "select_year": "اختر السنة",
@ -109,7 +109,7 @@
"customers": "العملاء", "customers": "العملاء",
"invoices": "الفواتير", "invoices": "الفواتير",
"estimates": "التقديرات", "estimates": "التقديرات",
"payments": "المدفوعات" "payments": "Payments"
}, },
"chart_info": { "chart_info": {
"total_sales": "المبيعات", "total_sales": "المبيعات",
@ -151,27 +151,27 @@
"no_results_found": "لم يتم العثور على نتائج" "no_results_found": "لم يتم العثور على نتائج"
}, },
"company_switcher": { "company_switcher": {
"label": "تبديل الشركة", "label": "SWITCH COMPANY",
"no_results_found": "لا توجد نتائج", "no_results_found": "No Results Found",
"add_new_company": "إضافة شركة جديدة", "add_new_company": "Add new company",
"new_company": "شركة جديدة", "new_company": "New company",
"created_message": "تم إنشاء الشركة بنجاح" "created_message": "Company created successfully"
}, },
"dateRange": { "dateRange": {
"today": "اليوم", "today": "Today",
"this_week": "هذا الاسبوع", "this_week": "This Week",
"this_month": "هذا الشهر", "this_month": "This Month",
"this_quarter": "هذا الربع", "this_quarter": "This Quarter",
"this_year": "هذه السنة", "this_year": "This Year",
"previous_week": "الأسبوع السابق", "previous_week": "Previous Week",
"previous_month": "الشهر الماضي", "previous_month": "Previous Month",
"previous_quarter": "الربع السابق", "previous_quarter": "Previous Quarter",
"previous_year": "السنة الماضية", "previous_year": "Previous Year",
"custom": "مخصص" "custom": "Custom"
}, },
"customers": { "customers": {
"title": "العملاء", "title": "العملاء",
"prefix": "البادئة", "prefix": "Prefix",
"add_customer": "إضافة عميل", "add_customer": "إضافة عميل",
"contacts_list": "قائمة العملاء", "contacts_list": "قائمة العملاء",
"name": "الاسم", "name": "الاسم",
@ -186,9 +186,9 @@
"phone": "الهاتف", "phone": "الهاتف",
"website": "موقع الإنترنت", "website": "موقع الإنترنت",
"overview": "استعراض", "overview": "استعراض",
"invoice_prefix": "بادئة الفاتورة", "invoice_prefix": "Invoice Prefix",
"estimate_prefix": "بادئة رقم التقدير", "estimate_prefix": "Estimate Prefix",
"payment_prefix": "بادئة رقم الدفعة", "payment_prefix": "Payment Prefix",
"enable_portal": "تفعيل البوابة", "enable_portal": "تفعيل البوابة",
"country": "الدولة", "country": "الدولة",
"state": "الولاية/المنطقة", "state": "الولاية/المنطقة",
@ -197,7 +197,7 @@
"added_on": "أضيف في", "added_on": "أضيف في",
"action": "إجراء", "action": "إجراء",
"password": "كلمة المرور", "password": "كلمة المرور",
"confirm_password": "تأكيد كلمة المرور", "confirm_password": "Confirm Password",
"street_number": "رقم الشارع", "street_number": "رقم الشارع",
"primary_currency": "العملة الرئيسية", "primary_currency": "العملة الرئيسية",
"description": "الوصف", "description": "الوصف",
@ -208,10 +208,10 @@
"new_customer": "عميل جديد", "new_customer": "عميل جديد",
"edit_customer": "تعديل عميل", "edit_customer": "تعديل عميل",
"basic_info": "معلوات أساسية", "basic_info": "معلوات أساسية",
"portal_access": "الوصول إلى بوابة العملاء", "portal_access": "Portal Access",
"portal_access_text": "هل تريد السماح لهذا العميل بتسجيل الدخول إلى بوابة العملاء؟", "portal_access_text": "Would you like to allow this customer to login to the Customer Portal?",
"portal_access_url": "رابط بوابة العملاء", "portal_access_url": "Customer Portal Login URL",
"portal_access_url_help": "يرجى نسخ وإعادة إرسال عنوان URL أعلاه إلى الزبون لتوفير الوصول.", "portal_access_url_help": "Please copy & forward the above given URL to your customer for providing access.",
"billing_address": "عنوان الفوترة", "billing_address": "عنوان الفوترة",
"shipping_address": "عنوان الشحن", "shipping_address": "عنوان الشحن",
"copy_billing_address": "نسخ من عنوان الفوترة", "copy_billing_address": "نسخ من عنوان الفوترة",
@ -231,9 +231,9 @@
"confirm_delete": "لن تتمكن من استرداد هذا العميل وجميع الفواتير والتقديرات والمدفوعات ذات الصلة. | لن تتمكن من استرداد هؤلاء العملاء وجميع الفواتير والتقديرات والمدفوعات ذات الصلة.", "confirm_delete": "لن تتمكن من استرداد هذا العميل وجميع الفواتير والتقديرات والمدفوعات ذات الصلة. | لن تتمكن من استرداد هؤلاء العملاء وجميع الفواتير والتقديرات والمدفوعات ذات الصلة.",
"created_message": "تم إنشاء العملاء بنجاح", "created_message": "تم إنشاء العملاء بنجاح",
"updated_message": "تم تحديث العملاء بنجاح", "updated_message": "تم تحديث العملاء بنجاح",
"address_updated_message": "تم تحديث العنوان بنجاح", "address_updated_message": "Address Information Updated succesfully",
"deleted_message": "تم حذف العملاء بنجاح | تم حذف العميل بنجاح", "deleted_message": "تم حذف العملاء بنجاح | تم حذف العميل بنجاح",
"edit_currency_not_allowed": "لا يمكن تغيير العملة بمجرد إنشاء معاملة." "edit_currency_not_allowed": "Cannot change currency once transactions created."
}, },
"items": { "items": {
"title": "الأصناف", "title": "الأصناف",
@ -265,8 +265,8 @@
}, },
"estimates": { "estimates": {
"title": "التقديرات", "title": "التقديرات",
"accept_estimate": "قبول التقدير", "accept_estimate": "Accept Estimate",
"reject_estimate": "رفض التقدير", "reject_estimate": "Reject Estimate",
"estimate": "تقدير | تقديرات", "estimate": "تقدير | تقديرات",
"estimates_list": "قائمة التقديرات", "estimates_list": "قائمة التقديرات",
"days": "{days} أيام", "days": "{days} أيام",
@ -318,10 +318,10 @@
}, },
"accepted": "مقبول", "accepted": "مقبول",
"rejected": "مرفوض", "rejected": "مرفوض",
"expired": "انتهت مدة الصلاحية", "expired": "Expired",
"sent": "مرسل", "sent": "مرسل",
"draft": "مسودة", "draft": "مسودة",
"viewed": "تمت المشاهدة", "viewed": "Viewed",
"declined": "مرفوض", "declined": "مرفوض",
"new_estimate": "تقدير جديد", "new_estimate": "تقدير جديد",
"add_new_estimate": "إضافة تقدير جديد", "add_new_estimate": "إضافة تقدير جديد",
@ -355,14 +355,14 @@
"select_an_item": "اكتب أو اختر الصنف", "select_an_item": "اكتب أو اختر الصنف",
"type_item_description": "اكتب وصف الصنف (اختياري)" "type_item_description": "اكتب وصف الصنف (اختياري)"
}, },
"mark_as_default_estimate_template_description": "في حالة التعفيل، سيتم اختيار القالب المحدد تلقائياً للتقديرات الجديدة." "mark_as_default_estimate_template_description": "If enabled, the selected template will be automatically selected for new estimates."
}, },
"invoices": { "invoices": {
"title": "الفواتير", "title": "الفواتير",
"download": "تحميل", "download": "Download",
"pay_invoice": "سدد الفاتورة", "pay_invoice": "Pay Invoice",
"invoices_list": "قائمة الفواتير", "invoices_list": "قائمة الفواتير",
"invoice_information": "معلومات الفاتورة", "invoice_information": "Invoice Information",
"days": "{days} أيام", "days": "{days} أيام",
"months": "{months} أشهر", "months": "{months} أشهر",
"years": "{years} سنوات", "years": "{years} سنوات",
@ -397,13 +397,13 @@
"send_invoice": "إرسال الفاتورة", "send_invoice": "إرسال الفاتورة",
"resend_invoice": "إعادة إرسال الفاتورة", "resend_invoice": "إعادة إرسال الفاتورة",
"invoice_template": "قالب الفاتورة", "invoice_template": "قالب الفاتورة",
"conversion_message": "تم استنساخ الفاتورة بنجاح", "conversion_message": "Invoice cloned successful",
"template": "قالب", "template": "قالب",
"mark_as_sent": "تحديد كمرسل", "mark_as_sent": "تحديد كمرسل",
"confirm_send_invoice": "سيتم إرسال هذه الفاتورة بالبريد الألكتروني إلى العميل", "confirm_send_invoice": "سيتم إرسال هذه الفاتورة بالبريد الألكتروني إلى العميل",
"invoice_mark_as_sent": "سيتم تحديد هذه الفاتورة كمرسلة", "invoice_mark_as_sent": "سيتم تحديد هذه الفاتورة كمرسلة",
"confirm_mark_as_accepted": "سيتم تحديد هذه الفاتورة كمقبولة", "confirm_mark_as_accepted": "This invoice will be marked as Accepted",
"confirm_mark_as_rejected": "سيتم تحديد هذه الفاتورة كمرفوضة", "confirm_mark_as_rejected": "This invoice will be marked as Rejected",
"confirm_send": "سيتم إرسال هذه الفاتورة بالبريد الألكتروني إلى العميل", "confirm_send": "سيتم إرسال هذه الفاتورة بالبريد الألكتروني إلى العميل",
"invoice_date": "تاريخ الفاتورة", "invoice_date": "تاريخ الفاتورة",
"record_payment": "تسجيل مدفوعات", "record_payment": "تسجيل مدفوعات",
@ -415,13 +415,13 @@
"update_invoice": "تحديث الفاتورة", "update_invoice": "تحديث الفاتورة",
"add_new_tax": "إضافة ضريبة جديدة", "add_new_tax": "إضافة ضريبة جديدة",
"no_invoices": "لا يوجد فواتير حتى الآن!", "no_invoices": "لا يوجد فواتير حتى الآن!",
"mark_as_rejected": "تحديد كمرفوض", "mark_as_rejected": "Mark as rejected",
"mark_as_accepted": "تحديد كمقبول", "mark_as_accepted": "Mark as accepted",
"list_of_invoices": "قائمة الفواتير .", "list_of_invoices": "قائمة الفواتير .",
"select_invoice": "اختر الفاتورة", "select_invoice": "اختر الفاتورة",
"no_matching_invoices": "لا يوجد فواتير مطابقة!", "no_matching_invoices": "لا يوجد فواتير مطابقة!",
"mark_as_sent_successfully": "تم تحديد الفاتورة كمرسلة بنجاح", "mark_as_sent_successfully": "تم تحديد الفاتورة كمرسلة بنجاح",
"invoice_sent_successfully": "تم إرسال الفاتورة بنجاح", "invoice_sent_successfully": "Invoice sent successfully",
"cloned_successfully": "تم استنساخ الفاتورة بنجاح", "cloned_successfully": "تم استنساخ الفاتورة بنجاح",
"clone_invoice": "استنساخ الفاتورة", "clone_invoice": "استنساخ الفاتورة",
"confirm_clone": "سيتم استنساخ هذه الفاتورة في فاتورة جديدة", "confirm_clone": "سيتم استنساخ هذه الفاتورة في فاتورة جديدة",
@ -447,14 +447,14 @@
"marked_as_sent_message": "تم إرسال الفاتورة بنجاح", "marked_as_sent_message": "تم إرسال الفاتورة بنجاح",
"something_went_wrong": "خطأ غير معروف!", "something_went_wrong": "خطأ غير معروف!",
"invalid_due_amount_message": "المبلغ النهائي للفاتورة لا يمكن أن يكون أقل من المبلغ المطلوب لها. رجاءاً حدث الفاتورة أو قم بحذف المدفوعات المرتبطة بها للاستمرار.", "invalid_due_amount_message": "المبلغ النهائي للفاتورة لا يمكن أن يكون أقل من المبلغ المطلوب لها. رجاءاً حدث الفاتورة أو قم بحذف المدفوعات المرتبطة بها للاستمرار.",
"mark_as_default_invoice_template_description": "في حالة التفعيل، سيتم اختيار القالب المحدد تلقائياً للفواتير الجديدة." "mark_as_default_invoice_template_description": "If enabled, the selected template will be automatically selected for new invoices."
}, },
"recurring_invoices": { "recurring_invoices": {
"title": "الفواتير المتكررة", "title": "Recurring Invoices",
"invoices_list": "الفواتير المتكررة", "invoices_list": "Recurring Invoices List",
"days": "{days} أيام", "days": "{days} Days",
"months": "{months} أشهر", "months": "{months} Month",
"years": "{years} سنوات", "years": "{years} Year",
"all": "All", "all": "All",
"paid": "Paid", "paid": "Paid",
"unpaid": "Unpaid", "unpaid": "Unpaid",
@ -1485,7 +1485,7 @@
"pdf_estimate_label": "تقدير", "pdf_estimate_label": "تقدير",
"pdf_estimate_number": "رقم تقدير", "pdf_estimate_number": "رقم تقدير",
"pdf_estimate_date": "تاريخ التقدير", "pdf_estimate_date": "تاريخ التقدير",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "تاريخ انتهاء الصلاحية",
"pdf_invoice_label": "الفاتورة", "pdf_invoice_label": "الفاتورة",
"pdf_invoice_number": "رقم الفاتورة", "pdf_invoice_number": "رقم الفاتورة",
"pdf_invoice_date": "تاريخ الفاتورة", "pdf_invoice_date": "تاريخ الفاتورة",

View File

@ -112,7 +112,7 @@
"payments": "Platby" "payments": "Platby"
}, },
"chart_info": { "chart_info": {
"total_sales": "Prodeje", "total_sales": "Slevy",
"total_receipts": "Doklady", "total_receipts": "Doklady",
"total_expense": "Výdaje", "total_expense": "Výdaje",
"net_income": "Čistý příjem", "net_income": "Čistý příjem",
@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Odhad", "pdf_estimate_label": "Odhad",
"pdf_estimate_number": "Číslo odhadu", "pdf_estimate_number": "Číslo odhadu",
"pdf_estimate_date": "Datum odhadu", "pdf_estimate_date": "Datum odhadu",
"pdf_estimate_expire_date": "Datum expirace", "pdf_estimate_expire_date": "Doba platnosti",
"pdf_invoice_label": "Faktura", "pdf_invoice_label": "Faktura",
"pdf_invoice_number": "Číslo faktury", "pdf_invoice_number": "Číslo faktury",
"pdf_invoice_date": "Datum fakturace", "pdf_invoice_date": "Datum fakturace",
@ -1495,7 +1495,7 @@
"pdf_quantity_label": "Množství", "pdf_quantity_label": "Množství",
"pdf_price_label": "Cena", "pdf_price_label": "Cena",
"pdf_discount_label": "Sleva", "pdf_discount_label": "Sleva",
"pdf_amount_label": "Částka", "pdf_amount_label": "Množství",
"pdf_subtotal": "Mezisoučet", "pdf_subtotal": "Mezisoučet",
"pdf_total": "Celkem", "pdf_total": "Celkem",
"pdf_payment_label": "Platba", "pdf_payment_label": "Platba",

View File

@ -688,7 +688,7 @@
"other_modules": "Weitere Module", "other_modules": "Weitere Module",
"view_all": "Alle Anzeigen", "view_all": "Alle Anzeigen",
"no_reviews_found": "Für dieses Modul gibt es noch keine Bewertungen!", "no_reviews_found": "Für dieses Modul gibt es noch keine Bewertungen!",
"module_not_purchased": "Modul noch nicht erworben", "module_not_purchased": "Module Not Purchased",
"module_not_found": "Modul nicht gefunden", "module_not_found": "Modul nicht gefunden",
"version_not_supported": "This module version doesn't support the current version of Crater", "version_not_supported": "This module version doesn't support the current version of Crater",
"last_updated": "Zuletzt aktualisiert am", "last_updated": "Zuletzt aktualisiert am",
@ -1113,7 +1113,7 @@
"default_currency_error": "Diese Währung wird bereits in einem der aktiven Anbieter verwendet", "default_currency_error": "Diese Währung wird bereits in einem der aktiven Anbieter verwendet",
"exchange_help_text": "Wechselkurs eingeben um von {currency} nach {baseCurrency} zu konvertieren", "exchange_help_text": "Wechselkurs eingeben um von {currency} nach {baseCurrency} zu konvertieren",
"currency_freak": "CurrencyFreaks", "currency_freak": "CurrencyFreaks",
"currency_layer": "Währungsebene", "currency_layer": "Currency Layer",
"open_exchange_rate": "Open Exchange Rate", "open_exchange_rate": "Open Exchange Rate",
"currency_converter": "Währungsumrechner", "currency_converter": "Währungsumrechner",
"server": "Server", "server": "Server",
@ -1150,8 +1150,8 @@
"payment_mode_added": "Zahlungsart hinzugefügt", "payment_mode_added": "Zahlungsart hinzugefügt",
"payment_mode_updated": "Zahlungsart aktualisiert", "payment_mode_updated": "Zahlungsart aktualisiert",
"payment_mode_confirm_delete": "Sie werden diese Zahlungsart nicht wiederherstellen können", "payment_mode_confirm_delete": "Sie werden diese Zahlungsart nicht wiederherstellen können",
"payments_attached": "Diese Zahlungsmethode ist bereits mit Zahlungen verknüpft. Bitte löschen Sie die angehängten Zahlungen, um mit der Löschung fortzufahren.", "payments_attached": "This payment method is already attached to payments. Please delete the attached payments to proceed with deletion.",
"expenses_attached": "Diese Zahlungsmethode ist bereits mit Ausgaben verknüpft. Bitte löschen Sie die angehängten Ausgaben, um mit der Löschung fortzufahren.", "expenses_attached": "This payment method is already attached to expenses. Please delete the attached expenses to proceed with deletion.",
"deleted_message": "Zahlungsart erfolgreich gelöscht" "deleted_message": "Zahlungsart erfolgreich gelöscht"
}, },
"expense_category": { "expense_category": {
@ -1179,7 +1179,7 @@
"discount_per_item": "Rabatt pro Artikel ", "discount_per_item": "Rabatt pro Artikel ",
"discount_setting_description": "Aktivieren Sie diese Option, wenn Sie einzelnen Rechnungspositionen einen Rabatt hinzufügen möchten. Standardmäßig wird der Rabatt direkt zur Rechnung hinzugefügt.", "discount_setting_description": "Aktivieren Sie diese Option, wenn Sie einzelnen Rechnungspositionen einen Rabatt hinzufügen möchten. Standardmäßig wird der Rabatt direkt zur Rechnung hinzugefügt.",
"expire_public_links": "Öffentliche Links automatisch ablaufen lassen", "expire_public_links": "Öffentliche Links automatisch ablaufen lassen",
"expire_setting_description": "Geben Sie an, ob Sie alle von der Anwendung gesendeten Links zur Ansicht von Rechnungen, Kostenvoranschlägen und Zahlungen usw. nach einer bestimmten Zeit ablaufen lassen möchten.", "expire_setting_description": "Specify whether you would like to expire all the links sent by application to view invoices, estimates & payments, etc after a specified duration.",
"save": "Speichern", "save": "Speichern",
"preference": "Präferenz | Präferenzen", "preference": "Präferenz | Präferenzen",
"general_settings": "Standardeinstellungen für das System.", "general_settings": "Standardeinstellungen für das System.",
@ -1272,14 +1272,14 @@
"do_spaces_secret": "Do Spaces Secret", "do_spaces_secret": "Do Spaces Secret",
"do_spaces_region": "Do Spaced Region", "do_spaces_region": "Do Spaced Region",
"do_spaces_bucket": "Do Spaces Bucket", "do_spaces_bucket": "Do Spaces Bucket",
"do_spaces_endpoint": "Do Spaces Endpunkt", "do_spaces_endpoint": "Do Spaces Endpoint",
"do_spaces_root": "Do Spaced Root", "do_spaces_root": "Do Spaced Root",
"dropbox_type": "Dropbox Typ", "dropbox_type": "Dropbox Typ",
"dropbox_token": "Dropbox Token", "dropbox_token": "Dropbox Token",
"dropbox_key": "Dropbox Schlüssel", "dropbox_key": "Dropbox Schlüssel",
"dropbox_secret": "Dropbox Secret", "dropbox_secret": "Dropbox Secret",
"dropbox_app": "Dropbox App", "dropbox_app": "Dropbox App",
"dropbox_root": "Dropbox Root Verzeichnis", "dropbox_root": "Dropbox Root",
"default_driver": "Standard-Treiber", "default_driver": "Standard-Treiber",
"is_default": "Standard", "is_default": "Standard",
"set_default_disk": "Als Standard festlegen", "set_default_disk": "Als Standard festlegen",
@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Angebot", "pdf_estimate_label": "Angebot",
"pdf_estimate_number": "Angebotsnummer", "pdf_estimate_number": "Angebotsnummer",
"pdf_estimate_date": "Angebotsdatum", "pdf_estimate_date": "Angebotsdatum",
"pdf_estimate_expire_date": "Zahlungsziel", "pdf_estimate_expire_date": "Gültig bis",
"pdf_invoice_label": "Rechnung", "pdf_invoice_label": "Rechnung",
"pdf_invoice_number": "Rechnungsnummer", "pdf_invoice_number": "Rechnungsnummer",
"pdf_invoice_date": "Rechnungsdatum", "pdf_invoice_date": "Rechnungsdatum",

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Εκτίμηση", "pdf_estimate_label": "Εκτίμηση",
"pdf_estimate_number": "Εκτίμηση Αριθμού", "pdf_estimate_number": "Εκτίμηση Αριθμού",
"pdf_estimate_date": "Εκτιμώμενη ημ. επισκευής", "pdf_estimate_date": "Εκτιμώμενη ημ. επισκευής",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Ημερομηνία λήξης",
"pdf_invoice_label": "Τιμολόγιο", "pdf_invoice_label": "Τιμολόγιο",
"pdf_invoice_number": "Αριθμός τιμολογίου", "pdf_invoice_number": "Αριθμός τιμολογίου",
"pdf_invoice_date": "Ημ/νία Τιμολόγησης", "pdf_invoice_date": "Ημ/νία Τιμολόγησης",

View File

@ -100,7 +100,9 @@
"pay_invoice": "Pay Invoice", "pay_invoice": "Pay Invoice",
"login_successfully": "Logged in successfully!", "login_successfully": "Logged in successfully!",
"logged_out_successfully": "Logged out successfully", "logged_out_successfully": "Logged out successfully",
"mark_as_default": "Mark as default" "mark_as_default": "Mark as default",
"select_option": "Select option",
"send_test_mail": "Send Test Mail"
}, },
"dashboard": { "dashboard": {
"select_year": "Select year", "select_year": "Select year",
@ -233,7 +235,8 @@
"updated_message": "Customer updated successfully", "updated_message": "Customer updated successfully",
"address_updated_message": "Address Information Updated succesfully", "address_updated_message": "Address Information Updated succesfully",
"deleted_message": "Customer deleted successfully | Customers deleted successfully", "deleted_message": "Customer deleted successfully | Customers deleted successfully",
"edit_currency_not_allowed": "Cannot change currency once transactions created." "edit_currency_not_allowed": "Cannot change currency once transactions created.",
"select_sender": "Select Sender"
}, },
"items": { "items": {
"title": "Items", "title": "Items",
@ -728,7 +731,8 @@
"updated_message": "User updated successfully", "updated_message": "User updated successfully",
"deleted_message": "User deleted successfully | Users deleted successfully", "deleted_message": "User deleted successfully | Users deleted successfully",
"select_company_role": "Select Role for {company}", "select_company_role": "Select Role for {company}",
"companies": "Companies" "companies": "Companies",
"select_sender": "Select Sender"
}, },
"reports": { "reports": {
"title": "Report", "title": "Report",
@ -807,7 +811,8 @@
"payment_modes": "Payment Modes", "payment_modes": "Payment Modes",
"notes": "Notes", "notes": "Notes",
"exchange_rate": "Exchange Rate", "exchange_rate": "Exchange Rate",
"address_information": "Address Information" "address_information": "Address Information",
"mail_sender": "Mail Senders"
}, },
"address_information": { "address_information": {
"section_description": " You can update Your Address information using form below." "section_description": " You can update Your Address information using form below."
@ -1311,6 +1316,51 @@
"state_placeholder": "Example: CA", "state_placeholder": "Example: CA",
"zip_placeholder": "Example: 90024", "zip_placeholder": "Example: 90024",
"invalid_address": "Please provide valid address details." "invalid_address": "Please provide valid address details."
},
"mail_sender": {
"title": "Mail Sender | Mail Senders",
"description": "Configure & test your mail senders for the selected company.",
"add_new_mail_sender": "New Mail Sender",
"name": "Sender Name",
"name_help": "Type a name to identify the sender for users.",
"driver": "Mail Driver",
"is_default": "Set as default",
"is_default_description": "You can only set one sender as default at a given time.",
"cc": "CC",
"bcc": "BCC",
"from_address": "From Mail Address",
"from_name": "From Mail Name",
"edit_mail_sender": "Edit Mail Sender",
"delete_mail_sender": "Delete Mail Sender",
"confirm_delete": "You will not be able to recover this Mail Sender",
"created_message": "Mail Sender created successfully",
"updated_message": "Mail Sender updated successfully",
"deleted_message": "Mail Sender deleted successfully",
"default_record_exists": "Default mail sender already exist",
"email_list": "Supports a comma separated list of email addresses",
"select_mail_sender": "Select Mail Sender",
"manage_mail_sender": "Manage Mail Senders",
"no_mail_sender_found": "No mail senders found!",
"no_mail_sender_found_description": "You must configure at-least one mail sender for the selected company in order to continue.",
"smtp_config": {
"host": "Host",
"port": "Port",
"username": "Username",
"password": "Password",
"encryption": "Encryption"
},
"mailgun_config": {
"domain": "Domain",
"secret": "Maingun Secret",
"endpoint": "Mailgun Endpoint"
},
"ses_config": {
"host": "Host",
"port": "Port",
"encryption": "Encryption",
"ses_key": "SES Key",
"ses_secret": "SES Secret"
}
} }
}, },
"wizard": { "wizard": {

View File

@ -1,6 +1,6 @@
{ {
"navigation": { "navigation": {
"dashboard": "Panel de Control", "dashboard": "Tablero",
"customers": "Clientes", "customers": "Clientes",
"items": "Artículos", "items": "Artículos",
"invoices": "Facturas", "invoices": "Facturas",
@ -9,7 +9,7 @@
"estimates": "Presupuestos", "estimates": "Presupuestos",
"payments": "Pagos", "payments": "Pagos",
"reports": "Informes", "reports": "Informes",
"settings": "Configuración", "settings": "Ajustes",
"logout": "Cerrar sesión", "logout": "Cerrar sesión",
"users": "Usuarios", "users": "Usuarios",
"modules": "Módulos" "modules": "Módulos"
@ -47,7 +47,7 @@
"delete": "Eliminar", "delete": "Eliminar",
"edit": "Editar", "edit": "Editar",
"view": "Ver", "view": "Ver",
"add_new_item": "Agregar Nuevo Artículo", "add_new_item": "Agregar ítem nuevo",
"clear_all": "Limpiar todo", "clear_all": "Limpiar todo",
"showing": "Mostrar", "showing": "Mostrar",
"of": "de", "of": "de",
@ -87,7 +87,7 @@
"select_city": "Seleccionar ciudad", "select_city": "Seleccionar ciudad",
"street_1": "Calle 1", "street_1": "Calle 1",
"street_2": "Calle 2", "street_2": "Calle 2",
"action_failed": "Acción Fallida", "action_failed": "Accion Fallida",
"retry": "Procesar de nuevo", "retry": "Procesar de nuevo",
"choose_note": "Elegir nota", "choose_note": "Elegir nota",
"no_note_found": "No se encontró ninguna nota", "no_note_found": "No se encontró ninguna nota",
@ -98,7 +98,7 @@
"do_you_wish_to_continue": "¿Deseas continuar?", "do_you_wish_to_continue": "¿Deseas continuar?",
"note": "Nota", "note": "Nota",
"pay_invoice": "Pagar factura", "pay_invoice": "Pagar factura",
"login_successfully": "¡Sesión inciada con éxito!", "login_successfully": "Logeado Satisfactoriamente!",
"logged_out_successfully": "Logeado Satisfactoriamente", "logged_out_successfully": "Logeado Satisfactoriamente",
"mark_as_default": "Marcar como predeterminado" "mark_as_default": "Marcar como predeterminado"
}, },
@ -113,7 +113,7 @@
}, },
"chart_info": { "chart_info": {
"total_sales": "Ventas", "total_sales": "Ventas",
"total_receipts": "Recibos", "total_receipts": "Ingresos",
"total_expense": "Gastos", "total_expense": "Gastos",
"net_income": "Ingresos netos", "net_income": "Ingresos netos",
"year": "Seleccione año" "year": "Seleccione año"
@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Presupuestar", "pdf_estimate_label": "Presupuestar",
"pdf_estimate_number": "Número de Presupuesto", "pdf_estimate_number": "Número de Presupuesto",
"pdf_estimate_date": "Fecha presupuesto", "pdf_estimate_date": "Fecha presupuesto",
"pdf_estimate_expire_date": "Fecha de vencimiento", "pdf_estimate_expire_date": "Fecha de caducidad",
"pdf_invoice_label": "Factura", "pdf_invoice_label": "Factura",
"pdf_invoice_number": "Numero de factura", "pdf_invoice_number": "Numero de factura",
"pdf_invoice_date": "Fecha de la factura", "pdf_invoice_date": "Fecha de la factura",

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Estimate", "pdf_estimate_label": "Estimate",
"pdf_estimate_number": "Estimate Number", "pdf_estimate_number": "Estimate Number",
"pdf_estimate_date": "Estimate Date", "pdf_estimate_date": "Estimate Date",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Expiry date",
"pdf_invoice_label": "Invoice", "pdf_invoice_label": "Invoice",
"pdf_invoice_number": "Invoice Number", "pdf_invoice_number": "Invoice Number",
"pdf_invoice_date": "Invoice Date", "pdf_invoice_date": "Invoice Date",

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Tarjous", "pdf_estimate_label": "Tarjous",
"pdf_estimate_number": "Tarjousnumero", "pdf_estimate_number": "Tarjousnumero",
"pdf_estimate_date": "Tarjouksen päiväys", "pdf_estimate_date": "Tarjouksen päiväys",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Voimassaolo päivä",
"pdf_invoice_label": "Lasku", "pdf_invoice_label": "Lasku",
"pdf_invoice_number": "Laskunumero", "pdf_invoice_number": "Laskunumero",
"pdf_invoice_date": "Laskun päiväys", "pdf_invoice_date": "Laskun päiväys",

View File

@ -310,7 +310,7 @@
"confirm_mark_as_sent": "Ce devis sera marqué comme envoyé", "confirm_mark_as_sent": "Ce devis sera marqué comme envoyé",
"confirm_mark_as_accepted": "Ce devis sera marqué comme accepté", "confirm_mark_as_accepted": "Ce devis sera marqué comme accepté",
"confirm_mark_as_rejected": "Ce devis sera marqué comme rejeté", "confirm_mark_as_rejected": "Ce devis sera marqué comme rejeté",
"no_matching_estimates": "Aucun devis correspondant !", "no_matching_estimates": "Aucune estimation correspondante !",
"mark_as_sent_successfully": "Devis marqué comme envoyé", "mark_as_sent_successfully": "Devis marqué comme envoyé",
"send_estimate_successfully": "Devis envoyé", "send_estimate_successfully": "Devis envoyé",
"errors": { "errors": {
@ -355,7 +355,7 @@
"select_an_item": "Sélectionnez un article", "select_an_item": "Sélectionnez un article",
"type_item_description": "Taper la description de l'article (facultatif)" "type_item_description": "Taper la description de l'article (facultatif)"
}, },
"mark_as_default_estimate_template_description": "Si activé, le modèle sélectionné sera automatiquement utilisé pour les nouvelles estimations." "mark_as_default_estimate_template_description": "If enabled, the selected template will be automatically selected for new estimates."
}, },
"invoices": { "invoices": {
"title": "Factures", "title": "Factures",
@ -447,7 +447,7 @@
"marked_as_sent_message": "Facture supprimée | Factures supprimées", "marked_as_sent_message": "Facture supprimée | Factures supprimées",
"something_went_wrong": "quelque chose a mal tourné", "something_went_wrong": "quelque chose a mal tourné",
"invalid_due_amount_message": "Le paiement entré est supérieur au montant total dû pour cette facture. Veuillez vérifier et réessayer.", "invalid_due_amount_message": "Le paiement entré est supérieur au montant total dû pour cette facture. Veuillez vérifier et réessayer.",
"mark_as_default_invoice_template_description": "Si activé, le modèle sélectionné sera automatiquement utilisé pour les nouvelles factures." "mark_as_default_invoice_template_description": "If enabled, the selected template will be automatically selected for new invoices."
}, },
"recurring_invoices": { "recurring_invoices": {
"title": "Factures récurrentes", "title": "Factures récurrentes",
@ -526,7 +526,7 @@
"cloned_successfully": "Facture récurrente clonée", "cloned_successfully": "Facture récurrente clonée",
"clone_invoice": "Dupliquer", "clone_invoice": "Dupliquer",
"confirm_clone": "Cette facture récurrente sera clonée dans une nouvelle facture récurrente", "confirm_clone": "Cette facture récurrente sera clonée dans une nouvelle facture récurrente",
"add_customer_email": "Veuillez ajouter une adresse e-mail pour ce client afin d'envoyer les factures automatiquement.", "add_customer_email": "Please add an email address for this customer to send invoices automatically.",
"item": { "item": {
"title": "Nom", "title": "Nom",
"description": "Description", "description": "Description",
@ -844,9 +844,9 @@
"secret": "Secret", "secret": "Secret",
"mailgun_secret": "Secret Mailgun", "mailgun_secret": "Secret Mailgun",
"mailgun_domain": "Domaine", "mailgun_domain": "Domaine",
"mailgun_endpoint": "Endpoint de Mailgun", "mailgun_endpoint": "Mailgun Endpoint",
"ses_secret": "Clé secrète SES", "ses_secret": "SES Secret",
"ses_key": "Clé SES", "ses_key": "SES Key",
"password": "Mot de passe", "password": "Mot de passe",
"username": "Nom d'utilisateur", "username": "Nom d'utilisateur",
"mail_config": "Envoi d'emails", "mail_config": "Envoi d'emails",
@ -1112,10 +1112,10 @@
"error": "Vous ne pouvez pas supprimer le fournisseur actif", "error": "Vous ne pouvez pas supprimer le fournisseur actif",
"default_currency_error": "Cette devise est déjà affectée à un fournisseur", "default_currency_error": "Cette devise est déjà affectée à un fournisseur",
"exchange_help_text": "Veuillez entrer le taux de change pour convertir {currency} en {baseCurrency}", "exchange_help_text": "Veuillez entrer le taux de change pour convertir {currency} en {baseCurrency}",
"currency_freak": "Currency Freaks", "currency_freak": "Currency Freak",
"currency_layer": "Currency Layer", "currency_layer": "Currency Layer",
"open_exchange_rate": "Ouvrir le taux de change", "open_exchange_rate": "Open Exchange Rate",
"currency_converter": "Convertisseur de devises", "currency_converter": "Currency Converter",
"server": "Serveur", "server": "Serveur",
"url": "URL", "url": "URL",
"active": "Actif", "active": "Actif",
@ -1150,8 +1150,8 @@
"payment_mode_added": "Mode de paiement ajouté", "payment_mode_added": "Mode de paiement ajouté",
"payment_mode_updated": "Mode de paiement mis à jour", "payment_mode_updated": "Mode de paiement mis à jour",
"payment_mode_confirm_delete": "Vous ne pourrez pas récupérer ce mode de paiement", "payment_mode_confirm_delete": "Vous ne pourrez pas récupérer ce mode de paiement",
"payments_attached": "Ce moyen de paiement est déjà utilisé par des paiements. Merci de supprimer les paiements associés avant de procéder à la suppression.", "payments_attached": "This payment method is already attached to payments. Please delete the attached payments to proceed with deletion.",
"expenses_attached": "Ce moyen de paiement est déjà utilisé par des dépenses. Merci de supprimer les dépenses associés avant de procéder à la suppression.", "expenses_attached": "This payment method is already attached to expenses. Please delete the attached expenses to proceed with deletion.",
"deleted_message": "Mode de paiement supprimé" "deleted_message": "Mode de paiement supprimé"
}, },
"expense_category": { "expense_category": {
@ -1262,8 +1262,8 @@
"media_driver": "Stockage multimédia", "media_driver": "Stockage multimédia",
"media_root": "Répertoire média", "media_root": "Répertoire média",
"aws_driver": "AWS", "aws_driver": "AWS",
"aws_key": "Clé AWS", "aws_key": "AWS Key",
"aws_secret": "Clé secrète AWS", "aws_secret": "AWS Secret",
"aws_region": "Région AWS", "aws_region": "Région AWS",
"aws_bucket": "Bucket", "aws_bucket": "Bucket",
"aws_root": "Répertoire", "aws_root": "Répertoire",
@ -1491,7 +1491,7 @@
"pdf_invoice_date": "Date", "pdf_invoice_date": "Date",
"pdf_invoice_due_date": "Date déchéance", "pdf_invoice_due_date": "Date déchéance",
"pdf_notes": "Notes de bas de page", "pdf_notes": "Notes de bas de page",
"pdf_items_label": "Désignation", "pdf_items_label": "Articles",
"pdf_quantity_label": "Quantité", "pdf_quantity_label": "Quantité",
"pdf_price_label": "Prix", "pdf_price_label": "Prix",
"pdf_discount_label": "Remise", "pdf_discount_label": "Remise",

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Estimate", "pdf_estimate_label": "Estimate",
"pdf_estimate_number": "Estimate Number", "pdf_estimate_number": "Estimate Number",
"pdf_estimate_date": "Estimate Date", "pdf_estimate_date": "Estimate Date",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Expiry date",
"pdf_invoice_label": "Invoice", "pdf_invoice_label": "Invoice",
"pdf_invoice_number": "Invoice Number", "pdf_invoice_number": "Invoice Number",
"pdf_invoice_date": "Invoice Date", "pdf_invoice_date": "Invoice Date",

View File

@ -4,7 +4,7 @@
"customers": "Klijenti", "customers": "Klijenti",
"items": "Stavke", "items": "Stavke",
"invoices": "Fakture", "invoices": "Fakture",
"recurring-invoices": "Ponavljajuće fakture\n", "recurring-invoices": "Recurring Invoices",
"expenses": "Rashodi", "expenses": "Rashodi",
"estimates": "Ponude", "estimates": "Ponude",
"payments": "Uplate", "payments": "Uplate",
@ -12,7 +12,7 @@
"settings": "Postavke", "settings": "Postavke",
"logout": "Odjava", "logout": "Odjava",
"users": "Korisnici", "users": "Korisnici",
"modules": "Moduli" "modules": "Modules"
}, },
"general": { "general": {
"add_company": "Dodaj tvrtku", "add_company": "Dodaj tvrtku",
@ -30,8 +30,8 @@
"from": "Pošiljatelj", "from": "Pošiljatelj",
"to": "Primatelj", "to": "Primatelj",
"ok": "Ok", "ok": "Ok",
"yes": "Da", "yes": "Yes",
"no": "Ne", "no": "No",
"sort_by": "Posloži Po", "sort_by": "Posloži Po",
"ascending": "Rastuće", "ascending": "Rastuće",
"descending": "Padajuće", "descending": "Padajuće",
@ -39,7 +39,7 @@
"body": "Tijelo", "body": "Tijelo",
"message": "Poruka", "message": "Poruka",
"send": "Pošalji", "send": "Pošalji",
"preview": "Pregled", "preview": "Preview",
"go_back": "Natrag", "go_back": "Natrag",
"back_to_login": "Natrag na prijavu?", "back_to_login": "Natrag na prijavu?",
"home": "Početna", "home": "Početna",
@ -65,7 +65,7 @@
"sent": "Poslano", "sent": "Poslano",
"all": "Sve", "all": "Sve",
"select_all": "Izaberi sve", "select_all": "Izaberi sve",
"select_template": "Odaberite predložak", "select_template": "Select Template",
"choose_file": "Klikni ovdje da izabereš fajl", "choose_file": "Klikni ovdje da izabereš fajl",
"choose_template": "Izaberi predložak", "choose_template": "Izaberi predložak",
"choose": "Izaberi", "choose": "Izaberi",
@ -93,13 +93,13 @@
"no_note_found": "Ne postoje spremljene napomene", "no_note_found": "Ne postoje spremljene napomene",
"insert_note": "Unesi bilješku", "insert_note": "Unesi bilješku",
"copied_pdf_url_clipboard": "Link do PDF fajla kopiran!", "copied_pdf_url_clipboard": "Link do PDF fajla kopiran!",
"copied_url_clipboard": "URL je kopiran u međuspremnik!", "copied_url_clipboard": "Copied url to clipboard!",
"docs": "Dokumenti", "docs": "Docs",
"do_you_wish_to_continue": "Želite li nastaviti?", "do_you_wish_to_continue": "Do you wish to continue?",
"note": "Bilješka", "note": "Note",
"pay_invoice": "Plati račun", "pay_invoice": "Pay Invoice",
"login_successfully": "Uspješno ste prijavljeni!\n", "login_successfully": "Logged in successfully!",
"logged_out_successfully": "Uspješno odjavljen\n", "logged_out_successfully": "Logged out successfully",
"mark_as_default": "Postavi kao zadano" "mark_as_default": "Postavi kao zadano"
}, },
"dashboard": { "dashboard": {
@ -109,7 +109,7 @@
"customers": "Klijenti", "customers": "Klijenti",
"invoices": "Računi", "invoices": "Računi",
"estimates": "Ponude", "estimates": "Ponude",
"payments": "Plaćanja" "payments": "Payments"
}, },
"chart_info": { "chart_info": {
"total_sales": "Prodaja", "total_sales": "Prodaja",
@ -151,18 +151,18 @@
"no_results_found": "Nema rezultata" "no_results_found": "Nema rezultata"
}, },
"company_switcher": { "company_switcher": {
"label": "IZABERI TVRTKU", "label": "SWITCH COMPANY",
"no_results_found": "Nema rezultata\n", "no_results_found": "No Results Found",
"add_new_company": "Dodajte novu tvrtku\n", "add_new_company": "Add new company",
"new_company": "Nova tvrtka\n", "new_company": "New company",
"created_message": "Tvrtka uspješno stvorena\n" "created_message": "Company created successfully"
}, },
"dateRange": { "dateRange": {
"today": "Danas\n", "today": "Today",
"this_week": "Danas\n", "this_week": "This Week",
"this_month": "Danas\n", "this_month": "This Month",
"this_quarter": "Danas\n", "this_quarter": "This Quarter",
"this_year": "Danas\n", "this_year": "This Year",
"previous_week": "Previous Week", "previous_week": "Previous Week",
"previous_month": "Previous Month", "previous_month": "Previous Month",
"previous_quarter": "Previous Quarter", "previous_quarter": "Previous Quarter",
@ -456,32 +456,32 @@
"months": "{months} Month", "months": "{months} Month",
"years": "{years} Year", "years": "{years} Year",
"all": "All", "all": "All",
"paid": "Plaćeno", "paid": "Paid",
"unpaid": "Ne plaćeno", "unpaid": "Unpaid",
"viewed": "Pregledano", "viewed": "Viewed",
"overdue": "Kašnjenja", "overdue": "Overdue",
"active": "Aktivno", "active": "Active",
"completed": "Završeno", "completed": "Completed",
"customer": "KUPAC", "customer": "CUSTOMER",
"paid_status": "STATUS PLAĆANJA", "paid_status": "PAID STATUS",
"ref_no": "BR. REFERENCE", "ref_no": "REF NO.",
"number": "BROJ", "number": "NUMBER",
"amount_due": "AMOUNT DUE", "amount_due": "AMOUNT DUE",
"partially_paid": "Djelomično plaćeno\n", "partially_paid": "Partially Paid",
"total": "Ukupno", "total": "Total",
"discount": "Popust", "discount": "Discount",
"sub_total": "Popdzbroj", "sub_total": "Sub Total",
"invoice": "Ponavljajuća faktura | Ponavjaljuća faktura", "invoice": "Recurring Invoice | Recurring Invoices",
"invoice_number": "Broj ponavljajuće fakture\n", "invoice_number": "Recurring Invoice Number",
"next_invoice_date": "Datum sljedećeg računa", "next_invoice_date": "Next Invoice Date",
"ref_number": "Broj reference", "ref_number": "Ref Number",
"contact": "Kontakt", "contact": "Contact",
"add_item": "Dodaj stavku", "add_item": "Add an Item",
"date": "Datum", "date": "Date",
"limit_by": "Ograniči po", "limit_by": "Limit by",
"limit_date": "Vremenski rok", "limit_date": "Limit Date",
"limit_count": "Broj ograničenja\n", "limit_count": "Limit Count",
"count": "Brojač", "count": "Count",
"status": "Status", "status": "Status",
"select_a_status": "Select a status", "select_a_status": "Select a status",
"working": "Working", "working": "Working",
@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Ponuda", "pdf_estimate_label": "Ponuda",
"pdf_estimate_number": "Broj Ponude", "pdf_estimate_number": "Broj Ponude",
"pdf_estimate_date": "Datum Ponude", "pdf_estimate_date": "Datum Ponude",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Datum isteka Ponude",
"pdf_invoice_label": "Faktura", "pdf_invoice_label": "Faktura",
"pdf_invoice_number": "Broj Fakture", "pdf_invoice_number": "Broj Fakture",
"pdf_invoice_date": "Datum Fakture", "pdf_invoice_date": "Datum Fakture",

File diff suppressed because it is too large Load Diff

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Estimate", "pdf_estimate_label": "Estimate",
"pdf_estimate_number": "Estimate Number", "pdf_estimate_number": "Estimate Number",
"pdf_estimate_date": "Estimate Date", "pdf_estimate_date": "Estimate Date",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Expiry date",
"pdf_invoice_label": "Invoice", "pdf_invoice_label": "Invoice",
"pdf_invoice_number": "Invoice Number", "pdf_invoice_number": "Invoice Number",
"pdf_invoice_date": "Invoice Date", "pdf_invoice_date": "Invoice Date",

View File

@ -17,6 +17,7 @@ import sk from './sk.json'
import vi from './vi.json' import vi from './vi.json'
import el from './el.json' import el from './el.json'
import hr from './hr.json' import hr from './hr.json'
import th from './th.json'
export default { export default {
cs, cs,
@ -37,5 +38,6 @@ export default {
vi, vi,
pl, pl,
el, el,
hr hr,
th
} }

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Pasiūlymas", "pdf_estimate_label": "Pasiūlymas",
"pdf_estimate_number": "Pasiūlymo numeris", "pdf_estimate_number": "Pasiūlymo numeris",
"pdf_estimate_date": "Pasiūlymo data", "pdf_estimate_date": "Pasiūlymo data",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Galiojimo laikas",
"pdf_invoice_label": "Sąskaita", "pdf_invoice_label": "Sąskaita",
"pdf_invoice_number": "Invoice Number", "pdf_invoice_number": "Invoice Number",
"pdf_invoice_date": "Invoice Date", "pdf_invoice_date": "Invoice Date",

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
"customers": "Klanten", "customers": "Klanten",
"items": "Artikelen", "items": "Artikelen",
"invoices": "Facturen", "invoices": "Facturen",
"recurring-invoices": "Periodieke facturen", "recurring-invoices": "Periodieke factuur",
"expenses": "Uitgaven", "expenses": "Uitgaven",
"estimates": "Offertes", "estimates": "Offertes",
"payments": "Betalingen", "payments": "Betalingen",
@ -28,16 +28,16 @@
"from_date": "Vanaf datum", "from_date": "Vanaf datum",
"to_date": "T/m datum", "to_date": "T/m datum",
"from": "Vanaf", "from": "Vanaf",
"to": "Naar", "to": "Naar.",
"ok": "Oké", "ok": "Oké.",
"yes": "Ja", "yes": "Ja.",
"no": "Nee", "no": "Nee.",
"sort_by": "Sorteer op", "sort_by": "Sorteer op",
"ascending": "Oplopend", "ascending": "Oplopend",
"descending": "Aflopend", "descending": "Aflopend",
"subject": "Onderwerp", "subject": "Onderwerp",
"body": "Inhoud", "body": "Inhoud",
"message": "Bericht", "message": "Bericht.",
"send": "Verstuur", "send": "Verstuur",
"preview": "Voorbeeld", "preview": "Voorbeeld",
"go_back": "Ga terug", "go_back": "Ga terug",
@ -54,7 +54,7 @@
"actions": "Acties", "actions": "Acties",
"subtotal": "SUBTOTAAL", "subtotal": "SUBTOTAAL",
"discount": "KORTING", "discount": "KORTING",
"fixed": "Vast bedrag", "fixed": "Gemaakt",
"percentage": "Percentage", "percentage": "Percentage",
"tax": "BELASTING", "tax": "BELASTING",
"total_amount": "TOTAALBEDRAG", "total_amount": "TOTAALBEDRAG",
@ -85,17 +85,17 @@
"select_state": "Selecteer staat", "select_state": "Selecteer staat",
"select_country": "Selecteer land", "select_country": "Selecteer land",
"select_city": "Selecteer stad", "select_city": "Selecteer stad",
"street_1": "Straat 1", "street_1": "straat 1",
"street_2": "Straat 2", "street_2": "Straat # 2",
"action_failed": "Actie mislukt", "action_failed": "Actie: mislukt",
"retry": "Opnieuw proberen", "retry": "Retr",
"choose_note": "Kies notitie", "choose_note": "Kies notitie",
"no_note_found": "Geen notitie gevonden", "no_note_found": "Geen notitie gevonden",
"insert_note": "Notitie invoegen", "insert_note": "Notitie invoegen",
"copied_pdf_url_clipboard": "PDF link naar klembord gekopieerd!", "copied_pdf_url_clipboard": "PDF link naar klembord gekopieerd!",
"copied_url_clipboard": "URL naar klembord gekopieerd!", "copied_url_clipboard": "URL naar klembord gekopieerd!",
"docs": "Documentatie", "docs": "Documenten",
"do_you_wish_to_continue": "Wil je doorgaan?", "do_you_wish_to_continue": "Wilt u Doorgaan?",
"note": "Notitie", "note": "Notitie",
"pay_invoice": "Betaal factuur", "pay_invoice": "Betaal factuur",
"login_successfully": "Succesvol ingelogd!", "login_successfully": "Succesvol ingelogd!",
@ -526,7 +526,7 @@
"cloned_successfully": "Terugkerende factuur succesvol gekopieerd", "cloned_successfully": "Terugkerende factuur succesvol gekopieerd",
"clone_invoice": "Kopieer periodieke factuur", "clone_invoice": "Kopieer periodieke factuur",
"confirm_clone": "Deze periodieke factuur wordt gekopieerd naar een nieuwe periodieke factuur", "confirm_clone": "Deze periodieke factuur wordt gekopieerd naar een nieuwe periodieke factuur",
"add_customer_email": "Voeg een e-mailadres aan deze klant toe zodat facturen automatisch verzonden kunnen worden.", "add_customer_email": "Voeg een e-mailadres aan deze klant toe, zodat facturen automatisch verzonden kunnen worden.",
"item": { "item": {
"title": "Item titel", "title": "Item titel",
"description": "Beschrijving", "description": "Beschrijving",
@ -1114,13 +1114,13 @@
"exchange_help_text": "Voer de wisselkoers in om te converteren van {currency} naar {baseCurrency}", "exchange_help_text": "Voer de wisselkoers in om te converteren van {currency} naar {baseCurrency}",
"currency_freak": "Valuta Freak", "currency_freak": "Valuta Freak",
"currency_layer": "Valuta-laag", "currency_layer": "Valuta-laag",
"open_exchange_rate": "Open wisselkoers", "open_exchange_rate": "Open Exchange Rate",
"currency_converter": "Valuta omzetter", "currency_converter": "Valuta omzetter",
"server": "Server", "server": "Server",
"url": "URL", "url": "URL",
"active": "Actief", "active": "Actief",
"currency_help_text": "Deze aanbieder wordt alleen gebruikt voor de hier boven geselecteerde valuta", "currency_help_text": "This provider will only be used on above selected currencies",
"currency_in_used": "De volgende valuta zijn al actief bij een andere aanbieder. Verwijder deze valuta uit de selectie om deze aanbieder opnieuw te activeren." "currency_in_used": "The following currencies are already active on another provider. Please remove these currencies from selection to activate this provider again."
}, },
"tax_types": { "tax_types": {
"title": "Belastingtypen", "title": "Belastingtypen",
@ -1143,16 +1143,16 @@
}, },
"payment_modes": { "payment_modes": {
"title": "Betaalmethodes", "title": "Betaalmethodes",
"description": "Modi van transacties voor betalingen", "description": "Modes of transaction for payments",
"add_payment_mode": "Voeg betaalwijze toe", "add_payment_mode": "Add Payment Mode",
"edit_payment_mode": "Wijzig betaalwijze", "edit_payment_mode": "Edit Payment Mode",
"mode_name": "Modusnaam", "mode_name": "Mode Name",
"payment_mode_added": "Betaalwijze toegevoegd", "payment_mode_added": "Betaalwijze toegevoegd",
"payment_mode_updated": "Betaalwijze bijgewerkt", "payment_mode_updated": "Payment Mode Updated",
"payment_mode_confirm_delete": "U kunt deze betalingsmodus niet herstellen", "payment_mode_confirm_delete": "You will not be able to recover this Payment Mode",
"payments_attached": "Deze betalingsmethode is al gekoppeld aan betalingen. Verwijder de gekoppelde betalingen om verder te gaan met het verwijderen.", "payments_attached": "This payment method is already attached to payments. Please delete the attached payments to proceed with deletion.",
"expenses_attached": "Deze betaalmethode is al gekoppeld aan uitgaven. Verwijder de gekoppelde kosten om door te gaan met het verwijderen.", "expenses_attached": "This payment method is already attached to expenses. Please delete the attached expenses to proceed with deletion.",
"deleted_message": "Betaalwijze succesvol verwijderd" "deleted_message": "Payment Mode deleted successfully"
}, },
"expense_category": { "expense_category": {
"title": "Onkostencategorieën", "title": "Onkostencategorieën",
@ -1178,8 +1178,8 @@
"discount_setting": "Kortingsinstelling", "discount_setting": "Kortingsinstelling",
"discount_per_item": "Korting per item", "discount_per_item": "Korting per item",
"discount_setting_description": "Schakel dit in als u korting wilt toevoegen aan afzonderlijke factuuritems. Standaard wordt korting rechtstreeks aan de factuur toegevoegd.", "discount_setting_description": "Schakel dit in als u korting wilt toevoegen aan afzonderlijke factuuritems. Standaard wordt korting rechtstreeks aan de factuur toegevoegd.",
"expire_public_links": "Publieke links automatisch laten vervallen", "expire_public_links": "Automatically Expire Public Links",
"expire_setting_description": "Geef aan of je alle links die eerder zijn verstuurd door de applicatie om facturen, offertes en betalingen te bekijken wilt laten verlopen na een bepaalde duur.", "expire_setting_description": "Specify whether you would like to expire all the links sent by application to view invoices, estimates & payments, etc after a specified duration.",
"save": "Opslaan", "save": "Opslaan",
"preference": "Voorkeur | Voorkeuren", "preference": "Voorkeur | Voorkeuren",
"general_settings": "Standaardvoorkeuren voor het systeem.", "general_settings": "Standaardvoorkeuren voor het systeem.",
@ -1188,9 +1188,9 @@
"select_time_zone": "Selecteer Tijdzone", "select_time_zone": "Selecteer Tijdzone",
"select_date_format": "Selecteer datum/tijdindeling", "select_date_format": "Selecteer datum/tijdindeling",
"select_financial_year": "Selecteer financieel ja", "select_financial_year": "Selecteer financieel ja",
"recurring_invoice_status": "Status periodieke facturen", "recurring_invoice_status": "Recurring Invoice Status",
"create_status": "Status aanmaken", "create_status": "Create Status",
"active": "Actief", "active": "Active",
"on_hold": "In wacht", "on_hold": "In wacht",
"update_status": "Updatestatus", "update_status": "Updatestatus",
"completed": "Voltooid", "completed": "Voltooid",
@ -1217,10 +1217,10 @@
"finishing_update": "Afwerking Update", "finishing_update": "Afwerking Update",
"update_failed": "Update mislukt", "update_failed": "Update mislukt",
"update_failed_text": "Sorry! Je update is mislukt op: {step} step ", "update_failed_text": "Sorry! Je update is mislukt op: {step} step ",
"update_warning": "Alle applicatiebestanden en de standaard sjabloonbestanden worden overschreven wanneer u de applicatie met behulp van dit hulpprogramma bijwerkt. Maak een reservekopie van uw sjablonen en database voordat u deze bijwerkt." "update_warning": "All of the application files and default template files will be overwritten when you update the application using this utility. Please take a backup of your templates & database before updating."
}, },
"backup": { "backup": {
"title": "Back-up | Back-ups", "title": "Backup | Backups",
"description": "De back-up is een zipfile met alle bestanden in de mappen die je opgeeft samen met een dump van je database", "description": "De back-up is een zipfile met alle bestanden in de mappen die je opgeeft samen met een dump van je database",
"new_backup": "Nieuwe back-up", "new_backup": "Nieuwe back-up",
"create_backup": "Backup maken", "create_backup": "Backup maken",

View File

@ -2,7 +2,7 @@
"navigation": { "navigation": {
"dashboard": "Pulpit", "dashboard": "Pulpit",
"customers": "Kontrahenci", "customers": "Kontrahenci",
"items": "Produkty", "items": "Pozycje",
"invoices": "Faktury", "invoices": "Faktury",
"recurring-invoices": "Faktury cykliczne", "recurring-invoices": "Faktury cykliczne",
"expenses": "Wydatki", "expenses": "Wydatki",
@ -100,7 +100,7 @@
"pay_invoice": "Zapłać Fakturę", "pay_invoice": "Zapłać Fakturę",
"login_successfully": "Zalogowano pomyślnie!", "login_successfully": "Zalogowano pomyślnie!",
"logged_out_successfully": "Wylogowano pomyślnie", "logged_out_successfully": "Wylogowano pomyślnie",
"mark_as_default": "Oznacz jako domyślne" "mark_as_default": "Mark as default"
}, },
"dashboard": { "dashboard": {
"select_year": "Wybierz rok", "select_year": "Wybierz rok",
@ -355,7 +355,7 @@
"select_an_item": "Wpisz lub kliknij aby wybrać element", "select_an_item": "Wpisz lub kliknij aby wybrać element",
"type_item_description": "Opis pozycji (opcjonalnie)" "type_item_description": "Opis pozycji (opcjonalnie)"
}, },
"mark_as_default_estimate_template_description": "Jeśli włączone, wybrany szablon zostanie automatycznie wybrany dla nowych ofert." "mark_as_default_estimate_template_description": "If enabled, the selected template will be automatically selected for new estimates."
}, },
"invoices": { "invoices": {
"title": "Faktury", "title": "Faktury",
@ -447,7 +447,7 @@
"marked_as_sent_message": "Faktura oznaczona jako wysłana pomyślnie", "marked_as_sent_message": "Faktura oznaczona jako wysłana pomyślnie",
"something_went_wrong": "coś poszło nie tak", "something_went_wrong": "coś poszło nie tak",
"invalid_due_amount_message": "Całkowita kwota faktury nie może być mniejsza niż całkowita kwota zapłacona za tę fakturę. Proszę zaktualizować fakturę lub usunąć powiązane płatności, aby kontynuować.", "invalid_due_amount_message": "Całkowita kwota faktury nie może być mniejsza niż całkowita kwota zapłacona za tę fakturę. Proszę zaktualizować fakturę lub usunąć powiązane płatności, aby kontynuować.",
"mark_as_default_invoice_template_description": "Jeśli włączone, wybrany szablon zostanie automatycznie wybrany dla nowych faktur." "mark_as_default_invoice_template_description": "If enabled, the selected template will be automatically selected for new invoices."
}, },
"recurring_invoices": { "recurring_invoices": {
"title": "Faktury cykliczne", "title": "Faktury cykliczne",
@ -526,7 +526,7 @@
"cloned_successfully": "Faktura Cykliczna sklonowana pomyślnie", "cloned_successfully": "Faktura Cykliczna sklonowana pomyślnie",
"clone_invoice": "Klonuj Fakturę Cykliczną", "clone_invoice": "Klonuj Fakturę Cykliczną",
"confirm_clone": "Ta faktura cykliczna zostanie sklonowana do nowej faktury cyklicznej", "confirm_clone": "Ta faktura cykliczna zostanie sklonowana do nowej faktury cyklicznej",
"add_customer_email": "Dodaj adres e-mail dla tego klienta, aby wysyłać faktury automatycznie.", "add_customer_email": "Please add an email address for this customer to send invoices automatically.",
"item": { "item": {
"title": "Tytuł pozycji", "title": "Tytuł pozycji",
"description": "Opis", "description": "Opis",
@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Oferta", "pdf_estimate_label": "Oferta",
"pdf_estimate_number": "Numer oferty", "pdf_estimate_number": "Numer oferty",
"pdf_estimate_date": "Data oferty", "pdf_estimate_date": "Data oferty",
"pdf_estimate_expire_date": "Data ważności", "pdf_estimate_expire_date": "Termin ważności",
"pdf_invoice_label": "Faktura", "pdf_invoice_label": "Faktura",
"pdf_invoice_number": "Numer faktury", "pdf_invoice_number": "Numer faktury",
"pdf_invoice_date": "Data faktury", "pdf_invoice_date": "Data faktury",

View File

@ -12,7 +12,7 @@
"settings": "Configurações", "settings": "Configurações",
"logout": "Encerrar sessão", "logout": "Encerrar sessão",
"users": "Usuários", "users": "Usuários",
"modules": "Módulos" "modules": "Navegação → módulos"
}, },
"general": { "general": {
"add_company": "Adicionar Empresa", "add_company": "Adicionar Empresa",
@ -29,13 +29,13 @@
"to_date": "Até a Data", "to_date": "Até a Data",
"from": "De", "from": "De",
"to": "Para", "to": "Para",
"ok": "Ok", "ok": "Geral → Ok",
"yes": "Sim", "yes": "Sim",
"no": "Não", "no": "Não",
"sort_by": "Ordenar por", "sort_by": "Ordenar por",
"ascending": "Crescente", "ascending": "Crescente",
"descending": "Descendente", "descending": "Descendente",
"subject": "Assunto", "subject": "Sujeita",
"body": "Corpo", "body": "Corpo",
"message": "Mensagem", "message": "Mensagem",
"send": "Enviar", "send": "Enviar",
@ -210,8 +210,8 @@
"basic_info": "Informação Básica", "basic_info": "Informação Básica",
"portal_access": "Clientes → Acessar portal", "portal_access": "Clientes → Acessar portal",
"portal_access_text": "Clientes→ Texto do portal de acesso?", "portal_access_text": "Clientes→ Texto do portal de acesso?",
"portal_access_url": "URL de login do Portal do Cliente", "portal_access_url": "Customer Portal Login URL",
"portal_access_url_help": "Por favor, copie a URL fornecida acima e envie a seu cliente para fornecer acesso.", "portal_access_url_help": "Please copy & forward the above given URL to your customer for providing access.",
"billing_address": "Endereço de cobrança", "billing_address": "Endereço de cobrança",
"shipping_address": "Endereço de entrega", "shipping_address": "Endereço de entrega",
"copy_billing_address": "Copiar Endereço de Faturamento", "copy_billing_address": "Copiar Endereço de Faturamento",
@ -231,7 +231,7 @@
"confirm_delete": "Você não poderá recuperar este cliente e todas as faturas, orçamentos e pagamentos relacionados. | Você não poderá recuperar esses clientes e todas as faturas, estimativas e pagamentos relacionados.", "confirm_delete": "Você não poderá recuperar este cliente e todas as faturas, orçamentos e pagamentos relacionados. | Você não poderá recuperar esses clientes e todas as faturas, estimativas e pagamentos relacionados.",
"created_message": "Cliente criado com sucesso", "created_message": "Cliente criado com sucesso",
"updated_message": "Cliente atualizado com sucesso", "updated_message": "Cliente atualizado com sucesso",
"address_updated_message": "Informações de endereço atualizadas com sucesso", "address_updated_message": "Address Information Updated succesfully",
"deleted_message": "Cliente excluído com sucesso | Clientes excluídos com sucesso", "deleted_message": "Cliente excluído com sucesso | Clientes excluídos com sucesso",
"edit_currency_not_allowed": "Não é possível alterar a moeda depois de criar transações." "edit_currency_not_allowed": "Não é possível alterar a moeda depois de criar transações."
}, },
@ -265,8 +265,8 @@
}, },
"estimates": { "estimates": {
"title": "Orçamentos", "title": "Orçamentos",
"accept_estimate": "Aceitar Orçamento", "accept_estimate": "Accept Estimate",
"reject_estimate": "Rejeitar Orçamento", "reject_estimate": "Reject Estimate",
"estimate": "Orçamento | Orçamentos", "estimate": "Orçamento | Orçamentos",
"estimates_list": "Lista de orçamentos", "estimates_list": "Lista de orçamentos",
"days": "{days} Dias", "days": "{days} Dias",
@ -318,10 +318,10 @@
}, },
"accepted": "Aceito", "accepted": "Aceito",
"rejected": "Rejeitado", "rejected": "Rejeitado",
"expired": "Expirado", "expired": "Expired",
"sent": "Enviado", "sent": "Enviado",
"draft": "Rascunho", "draft": "Rascunho",
"viewed": "Visualizado", "viewed": "Viewed",
"declined": "Rejeitado", "declined": "Rejeitado",
"new_estimate": "Novo orçamento", "new_estimate": "Novo orçamento",
"add_new_estimate": "Adicionar novo orçamento", "add_new_estimate": "Adicionar novo orçamento",
@ -355,14 +355,14 @@
"select_an_item": "Escreva ou clique para selecionar um item", "select_an_item": "Escreva ou clique para selecionar um item",
"type_item_description": "Descrição do Item (opcional)" "type_item_description": "Descrição do Item (opcional)"
}, },
"mark_as_default_estimate_template_description": "Se habilitado, o modelo selecionado será automaticamente selecionado para novas estimativas." "mark_as_default_estimate_template_description": "If enabled, the selected template will be automatically selected for new estimates."
}, },
"invoices": { "invoices": {
"title": "Faturas", "title": "Faturas",
"download": "Baixar", "download": "Download",
"pay_invoice": "Pagar Fatura", "pay_invoice": "Pay Invoice",
"invoices_list": "Lista de faturas", "invoices_list": "Lista de faturas",
"invoice_information": "Informações da Fatura", "invoice_information": "Invoice Information",
"days": "{days} dias", "days": "{days} dias",
"months": "{months} Mês", "months": "{months} Mês",
"years": "{years} Ano", "years": "{years} Ano",
@ -374,7 +374,7 @@
"completed": "Concluído", "completed": "Concluído",
"customer": "CLIENTE", "customer": "CLIENTE",
"paid_status": "STATUS PAGAMENTO", "paid_status": "STATUS PAGAMENTO",
"ref_no": "N° de Referência", "ref_no": "REF NO.",
"number": "NÚMERO", "number": "NÚMERO",
"amount_due": "VALOR DEVIDO", "amount_due": "VALOR DEVIDO",
"partially_paid": "Parcialmente Pago", "partially_paid": "Parcialmente Pago",
@ -447,7 +447,7 @@
"marked_as_sent_message": "Fatura marcada como enviada com sucesso", "marked_as_sent_message": "Fatura marcada como enviada com sucesso",
"something_went_wrong": "algo deu errado", "something_went_wrong": "algo deu errado",
"invalid_due_amount_message": "O valor total da fatura não pode ser menor que o valor total pago para esta fatura. Atualize a fatura ou exclua os pagamentos associados para continuar.", "invalid_due_amount_message": "O valor total da fatura não pode ser menor que o valor total pago para esta fatura. Atualize a fatura ou exclua os pagamentos associados para continuar.",
"mark_as_default_invoice_template_description": "Se habilitado, o modelo selecionado será automaticamente selecionado para novas estimativas." "mark_as_default_invoice_template_description": "If enabled, the selected template will be automatically selected for new invoices."
}, },
"recurring_invoices": { "recurring_invoices": {
"title": "Faturas Recorrentes", "title": "Faturas Recorrentes",
@ -464,56 +464,56 @@
"completed": "Concluído", "completed": "Concluído",
"customer": "CLIENTE", "customer": "CLIENTE",
"paid_status": "STATUS PAGAMENTO", "paid_status": "STATUS PAGAMENTO",
"ref_no": "N° de Referência", "ref_no": "REF NO.",
"number": "NÚMERO", "number": "NUMBER",
"amount_due": "VALOR DEVIDO", "amount_due": "AMOUNT DUE",
"partially_paid": "Parcialmente Pago", "partially_paid": "Partially Paid",
"total": "Total", "total": "Total",
"discount": "Desconto", "discount": "Discount",
"sub_total": "Subtotal", "sub_total": "Sub Total",
"invoice": "Fatura Recorrente | Faturas Recorrentes", "invoice": "Recurring Invoice | Recurring Invoices",
"invoice_number": "Número da Fatura Recorrente", "invoice_number": "Recurring Invoice Number",
"next_invoice_date": "Data da Próxima Fatura", "next_invoice_date": "Next Invoice Date",
"ref_number": "Número de Referência", "ref_number": "Ref Number",
"contact": "Contato", "contact": "Contact",
"add_item": "Adicionar um Item", "add_item": "Add an Item",
"date": "Data", "date": "Date",
"limit_by": "Limitar por", "limit_by": "Limit by",
"limit_date": "Data Limite", "limit_date": "Limit Date",
"limit_count": "Quantidade Máxima", "limit_count": "Limit Count",
"count": "Quantidade", "count": "Count",
"status": "Status", "status": "Status",
"select_a_status": "Selecione o Status", "select_a_status": "Select a status",
"working": "Processando", "working": "Working",
"on_hold": "Pausado", "on_hold": "On Hold",
"complete": "Concluído", "complete": "Completed",
"add_tax": "Adicionar Imposto", "add_tax": "Add Tax",
"amount": "Valor", "amount": "Amount",
"action": "Ação", "action": "Action",
"notes": "Observações", "notes": "Notes",
"view": "Ver", "view": "View",
"basic_info": "Informações Básicas", "basic_info": "Basic Info",
"send_invoice": "Enviar Fatura Recorrente", "send_invoice": "Send Recurring Invoice",
"auto_send": "Envio Automático", "auto_send": "Auto Send",
"resend_invoice": "Reenviar Fatura Recorrente", "resend_invoice": "Resend Recurring Invoice",
"invoice_template": "Modelo de Fatura Recorrente", "invoice_template": "Recurring Invoice Template",
"conversion_message": "Fatura Recorrente clonada com sucesso", "conversion_message": "Recurring Invoice cloned successful",
"template": "Modelo", "template": "Template",
"mark_as_sent": "Marcar como enviado", "mark_as_sent": "Mark as sent",
"confirm_send_invoice": "Esta fatura recorrente será enviada por e-mail para o cliente", "confirm_send_invoice": "This recurring invoice will be sent via email to the customer",
"invoice_mark_as_sent": "Esta fatura recorrente será marcada como enviada", "invoice_mark_as_sent": "This recurring invoice will be marked as sent",
"confirm_send": "Esta fatura recorrente será enviada por e-mail para o cliente", "confirm_send": "This recurring invoice will be sent via email to the customer",
"starts_at": "Data de início", "starts_at": "Start Date",
"due_date": "Vencimento da Fatura", "due_date": "Invoice Due Date",
"record_payment": "Registrar Pagamento", "record_payment": "Record Payment",
"add_new_invoice": "Adicionar nova fatura recorrente", "add_new_invoice": "Add New Recurring Invoice",
"update_expense": "Atualizar Despesa", "update_expense": "Update Expense",
"edit_invoice": "Editar fatura recorrente", "edit_invoice": "Edit Recurring Invoice",
"new_invoice": "Nova fatura recorrente", "new_invoice": "New Recurring Invoice",
"send_automatically": "Enviar automaticamente", "send_automatically": "Send Automatically",
"send_automatically_desc": "Habilite isso, se você gostaria de enviar a fatura automaticamente para o cliente.", "send_automatically_desc": "Enable this, if you would like to send the invoice automatically to the customer when its created.",
"save_invoice": "Salvar fatura recorrente", "save_invoice": "Save Recurring Invoice",
"update_invoice": "Atualizar fatura recorrente", "update_invoice": "Update Recurring Invoice",
"add_new_tax": "Adicionar Novo Imposto", "add_new_tax": "Adicionar Novo Imposto",
"no_invoices": "Não há faturas recorrentes ainda!", "no_invoices": "Não há faturas recorrentes ainda!",
"mark_as_rejected": "Marcar como rejeitada", "mark_as_rejected": "Marcar como rejeitada",
@ -522,42 +522,42 @@
"select_invoice": "Selecionar Fatura", "select_invoice": "Selecionar Fatura",
"no_matching_invoices": "Não há faturas recorrentes correspondentes!", "no_matching_invoices": "Não há faturas recorrentes correspondentes!",
"mark_as_sent_successfully": "Fatura recorrente marcada como enviada com sucesso", "mark_as_sent_successfully": "Fatura recorrente marcada como enviada com sucesso",
"invoice_sent_successfully": "Fatura recorrente enviada com sucesso", "invoice_sent_successfully": "Recurring Invoice sent successfully",
"cloned_successfully": "Fatura recorrente copiada com sucesso", "cloned_successfully": "Recurring Invoice cloned successfully",
"clone_invoice": "Copiar Fatura Recorrente", "clone_invoice": "Clone Recurring Invoice",
"confirm_clone": "Esta fatura recorrente será copiada em uma nova fatura recorrente", "confirm_clone": "This recurring invoice will be cloned into a new Recurring Invoice",
"add_customer_email": "Por favor, adicione um endereço de e-mail para este cliente para enviar faturas automaticamente.", "add_customer_email": "Please add an email address for this customer to send invoices automatically.",
"item": { "item": {
"title": "Titulo do item", "title": "Item Title",
"description": "Descrição", "description": "Description",
"quantity": "Quantidade", "quantity": "Quantity",
"price": "Preço", "price": "Price",
"discount": "Desconto", "discount": "Discount",
"total": "Total", "total": "Total",
"total_discount": "Desconto total", "total_discount": "Total Discount",
"sub_total": "Subtotal", "sub_total": "Sub Total",
"tax": "Imposto", "tax": "Tax",
"amount": "Valor", "amount": "Amount",
"select_an_item": "Digite ou clique para selecionar", "select_an_item": "Type or click to select an item",
"type_item_description": "Descrição do Item (opcional)" "type_item_description": "Type Item Description (optional)"
}, },
"frequency": { "frequency": {
"title": "Frequência", "title": "Frequency",
"select_frequency": "Selecione a Frequência", "select_frequency": "Select Frequency",
"minute": "Minuto", "minute": "Minute",
"hour": "Hora", "hour": "Hour",
"day_month": "Dia do mês", "day_month": "Day of month",
"month": "Mês", "month": "Month",
"day_week": "Dia da semana" "day_week": "Day of week"
}, },
"confirm_delete": "Você não poderá recuperar esta fatura | Você não poderá recuperar essas faturas", "confirm_delete": "You will not be able to recover this Invoice | You will not be able to recover these Invoices",
"created_message": "Fatura recorrente criada com sucesso", "created_message": "Recurring Invoice created successfully",
"updated_message": "Fatura recorrente atualizada com sucesso", "updated_message": "Recurring Invoice updated successfully",
"deleted_message": "Fatura recorrente excluída com sucesso | Faturas recorrentes excluídas com sucesso", "deleted_message": "Recurring Invoice deleted successfully | Recurring Invoices deleted successfully",
"marked_as_sent_message": "Fatura recorrente marcada como enviada com sucesso", "marked_as_sent_message": "Recurring Invoice marked as sent successfully",
"user_email_does_not_exist": "E-mail de usuário não existe", "user_email_does_not_exist": "User email does not exist",
"something_went_wrong": "houve algo de errado", "something_went_wrong": "something went wrong",
"invalid_due_amount_message": "O valor total da fatura não pode ser menor que o valor total pago para esta fatura. Atualize a fatura ou exclua os pagamentos associados para continuar." "invalid_due_amount_message": "Total Recurring Invoice amount cannot be less than total paid amount for this Recurring Invoice. Please update the invoice or delete the associated payments to continue."
}, },
"payments": { "payments": {
"title": "Pagamentos", "title": "Pagamentos",
@ -603,7 +603,7 @@
"select_a_customer": "Selecione um cliente", "select_a_customer": "Selecione um cliente",
"expense_title": "Título", "expense_title": "Título",
"customer": "Cliente", "customer": "Cliente",
"currency": "Moeda", "currency": "Currency",
"contact": "Contato", "contact": "Contato",
"category": "Categoria", "category": "Categoria",
"from_date": "A partir da Data", "from_date": "A partir da Data",
@ -658,49 +658,49 @@
"retype_password": "Confirme a Senha" "retype_password": "Confirme a Senha"
}, },
"modules": { "modules": {
"buy_now": "Compre agora", "buy_now": "Buy Now",
"install": "Instalar", "install": "Install",
"price": "Preço", "price": "Price",
"download_zip_file": "Baixar arquivo ZIP", "download_zip_file": "Download ZIP file",
"unzipping_package": "Descompactando pacote", "unzipping_package": "Unzipping Package",
"copying_files": "Copiando arquivos", "copying_files": "Copying Files",
"deleting_files": "Excluindo arquivos não utilizados", "deleting_files": "Deleting Unused files",
"completing_installation": "Completando instalação", "completing_installation": "Completing Installation",
"update_failed": "Atualização falhou", "update_failed": "Update Failed",
"install_success": "Módulo foi instalado com sucesso!", "install_success": "Module has been installed successfully!",
"customer_reviews": "Avaliações", "customer_reviews": "Reviews",
"license": "Licença", "license": "License",
"faq": "FAQ", "faq": "FAQ",
"monthly": "Mensalmente", "monthly": "Monthly",
"yearly": "Anual", "yearly": "Yearly",
"updated": "Atualizado", "updated": "Updated",
"version": "Versão", "version": "Version",
"disable": "Desabilitar", "disable": "Disable",
"module_disabled": "Módulo Desabilitado", "module_disabled": "Module Disabled",
"enable": "Habilitar", "enable": "Enable",
"module_enabled": "Módulo Habilitado", "module_enabled": "Module Enabled",
"update_to": "Atualizar Para", "update_to": "Update To",
"module_updated": "Módulo atualizado com sucesso!", "module_updated": "Module Updated Successfully!",
"title": "Módulos", "title": "Modules",
"module": "Módulo | Módulos", "module": "Module | Modules",
"api_token": "Token de API", "api_token": "API token",
"invalid_api_token": "Token da API inválido.", "invalid_api_token": "Invalid API Token.",
"other_modules": "Outros Módulos", "other_modules": "Other Modules",
"view_all": "Ver todos", "view_all": "View All",
"no_reviews_found": "Não há avaliações para este módulo ainda!", "no_reviews_found": "There are no reviews for this module yet!",
"module_not_purchased": "Módulo não comprado", "module_not_purchased": "Module Not Purchased",
"module_not_found": "Módulo não encontrado", "module_not_found": "Module Not Found",
"version_not_supported": "This module version doesn't support the current version of Crater", "version_not_supported": "This module version doesn't support the current version of Crater",
"last_updated": "Última atualização em", "last_updated": "Last Updated On",
"connect_installation": "Conecte sua instalação", "connect_installation": "Connect your installation",
"api_token_description": "Faça login em {url} e conecte esta instalação digitando o Token da API. Os módulos comprados aparecerão aqui após a conexão ser estabelecida.", "api_token_description": "Login to {url} and connect this installation by entering the API Token. Your purchased modules will show up here after the connection is established.",
"view_module": "Ver Módulo", "view_module": "View Module",
"update_available": "Atualização disponível", "update_available": "Update Available",
"purchased": "Comprado", "purchased": "Purchased",
"installed": "Instalado", "installed": "Installed",
"no_modules_installed": "Nenhum módulo instalado ainda!", "no_modules_installed": "No Modules Installed Yet!",
"disable_warning": "Todas as configurações serão revertidas.", "disable_warning": "All the settings for this particular will be reverted.",
"what_you_get": "O que você recebe?" "what_you_get": "What you get"
}, },
"users": { "users": {
"title": "Usuários", "title": "Usuários",
@ -727,8 +727,8 @@
"created_message": "Usuário criado com sucesso", "created_message": "Usuário criado com sucesso",
"updated_message": "Usuário atualizado com sucesso", "updated_message": "Usuário atualizado com sucesso",
"deleted_message": "Usuário excluído com sucesso | Usuários excluídos com sucesso", "deleted_message": "Usuário excluído com sucesso | Usuários excluídos com sucesso",
"select_company_role": "Selecione o cargo da {company}", "select_company_role": "Select Role for {company}",
"companies": "Empresas" "companies": "Companies"
}, },
"reports": { "reports": {
"title": "Relatório", "title": "Relatório",
@ -801,16 +801,16 @@
"tax_types": "Tipos de Impostos", "tax_types": "Tipos de Impostos",
"expense_category": "Categorias de Despesas", "expense_category": "Categorias de Despesas",
"update_app": "Atualizar Aplicativo", "update_app": "Atualizar Aplicativo",
"backup": "Cópia de Segurança", "backup": "Backup",
"file_disk": "Disco de Arquivos", "file_disk": "Disco de Arquivos",
"custom_fields": "Os campos personalizados", "custom_fields": "Os campos personalizados",
"payment_modes": "Meios de Pagamento", "payment_modes": "Meios de Pagamento",
"notes": "Observações", "notes": "Observações",
"exchange_rate": "Taxa de Câmbio", "exchange_rate": "Exchange Rate",
"address_information": "Informações de Endereço" "address_information": "Address Information"
}, },
"address_information": { "address_information": {
"section_description": " Você pode atualizar suas informações de endereço usando o formulário abaixo." "section_description": " You can update Your Address information using form below."
}, },
"title": "Configurações", "title": "Configurações",
"setting": "Configuração | Configurações", "setting": "Configuração | Configurações",
@ -872,13 +872,13 @@
"address": "Endereço", "address": "Endereço",
"zip": "CEP", "zip": "CEP",
"save": "Salvar", "save": "Salvar",
"delete": "Excluir", "delete": "Delete",
"updated_message": "Informações da Empresa atualizadas com sucesso", "updated_message": "Informações da Empresa atualizadas com sucesso",
"delete_company": "Excluir Empresa", "delete_company": "Delete Company",
"delete_company_description": "Depois de excluir sua empresa, você perderá todos os dados e arquivos associados a ela permanentemente.", "delete_company_description": "Once you delete your company, you will lose all the data and files associated with it permanently.",
"are_you_absolutely_sure": "Você tem certeza?", "are_you_absolutely_sure": "Are you absolutely sure?",
"delete_company_modal_desc": "Esta ação não pode ser desfeita. Isto irá apagar permanentemente a {company} e todos os dados associados.", "delete_company_modal_desc": "This action cannot be undone. This will permanently delete {company} and all of its associated data.",
"delete_company_modal_label": "Digite {company} para confirmar" "delete_company_modal_label": "Please type {company} to confirm"
}, },
"custom_fields": { "custom_fields": {
"title": "Os campos personalizados", "title": "Os campos personalizados",
@ -916,103 +916,103 @@
"ticked_by_default": "Marcado por padrão", "ticked_by_default": "Marcado por padrão",
"updated_message": "Campo personalizado atualizado com sucesso", "updated_message": "Campo personalizado atualizado com sucesso",
"added_message": "Campo personalizado adicionado com sucesso", "added_message": "Campo personalizado adicionado com sucesso",
"press_enter_to_add": "Aperte enter para adicionar uma nova opção", "press_enter_to_add": "Press enter to add new option",
"model_in_use": "Não é possível atualizar o modelo para campos que já estão em uso.", "model_in_use": "Cannot update model for fields which are already in use.",
"type_in_use": "Não é possível atualizar o tipo para os campos que já estão em uso." "type_in_use": "Cannot update type for fields which are already in use."
}, },
"customization": { "customization": {
"customization": "personalização", "customization": "personalização",
"updated_message": "Informações da Empresa atualizadas com sucesso", "updated_message": "Informações da Empresa atualizadas com sucesso",
"save": "Salvar", "save": "Salvar",
"insert_fields": "Inserir Campos", "insert_fields": "Insert Fields",
"learn_custom_format": "Aprenda a usar o formato personalizado", "learn_custom_format": "Learn how to use custom format",
"add_new_component": "Novo Componente", "add_new_component": "Add New Component",
"component": "Componente", "component": "Component",
"Parameter": "Parâmetro", "Parameter": "Parameter",
"series": "Séries", "series": "Series",
"series_description": "Para definir um prefixo/sufixo estático como 'INV' em sua empresa. Ele suporta o comprimento do caractere de até 6 caracteres.", "series_description": "To set a static prefix/postfix like 'INV' across your company. It supports character length of up to 6 chars.",
"series_param_label": "Valor da Série", "series_param_label": "Series Value",
"delimiter": "Delimitador", "delimiter": "Delimiter",
"delimiter_description": "Caractere único para especificar o limite entre 2 componentes separados. Por padrão é -", "delimiter_description": "Single character for specifying the boundary between 2 separate components. By default its set to -",
"delimiter_param_label": "Valor Delimitador", "delimiter_param_label": "Delimiter Value",
"date_format": "Formato de Data", "date_format": "Date Format",
"date_format_description": "Um campo de data e hora local que aceita um parâmetro de formato. O formato padrão: 'Y' apresenta o ano atual.", "date_format_description": "A local date and time field which accepts a format parameter. The default format: 'Y' renders the current year.",
"date_format_param_label": "Formato", "date_format_param_label": "Format",
"sequence": "Sequência", "sequence": "Sequence",
"sequence_description": "Sequência consecutiva de números em sua empresa. Você pode especificar o comprimento nos parâmetros indicados.", "sequence_description": "Consecutive sequence of numbers across your company. You can specify the length on the given parameter.",
"sequence_param_label": "Comprimento da sequência", "sequence_param_label": "Sequence Length",
"customer_series": "Série do Cliente", "customer_series": "Customer Series",
"customer_series_description": "Para definir um prefixo/sufixo diferente para cada cliente.", "customer_series_description": "To set a different prefix/postfix for each customer.",
"customer_sequence": "Sequência do Cliente", "customer_sequence": "Customer Sequence",
"customer_sequence_description": "Sequência consecutiva de números para cada um de seus clientes.", "customer_sequence_description": "Consecutive sequence of numbers for each of your customer.",
"customer_sequence_param_label": "Comprimento da Sequência", "customer_sequence_param_label": "Sequence Length",
"random_sequence": "Sequência aleatória", "random_sequence": "Random Sequence",
"random_sequence_description": "Cadeia alfanumérica aleatória. Você pode especificar o comprimento no parâmetro fornecido.", "random_sequence_description": "Random alphanumeric string. You can specify the length on the given parameter.",
"random_sequence_param_label": "Comprimento da Sequência", "random_sequence_param_label": "Sequence Length",
"invoices": { "invoices": {
"title": "Faturas", "title": "Faturas",
"invoice_number_format": "Formato do Número da Fatura", "invoice_number_format": "Invoice Number Format",
"invoice_number_format_description": "Personalize como o número da sua fatura é gerado automaticamente quando você cria uma nova fatura.", "invoice_number_format_description": "Customize how your invoice number gets generated automatically when you create a new invoice.",
"preview_invoice_number": "Pré-visualizar número da fatura", "preview_invoice_number": "Preview Invoice Number",
"due_date": "Vencimento", "due_date": "Due Date",
"due_date_description": "Especifique como a data de vencimento é definida automaticamente ao criar uma fatura.", "due_date_description": "Specify how due date is automatically set when you create an invoice.",
"due_date_days": "Número de dias antes do vencimento da fatura", "due_date_days": "Invoice Due after days",
"set_due_date_automatically": "Definir Data de Vencimento Automaticamente", "set_due_date_automatically": "Set Due Date Automatically",
"set_due_date_automatically_description": "Habilite isso se deseja definir a data de vencimento automaticamente ao criar uma fatura.", "set_due_date_automatically_description": "Enable this if you wish to set due date automatically when you create a new invoice.",
"default_formats": "Formatos Padrão", "default_formats": "Default Formats",
"default_formats_description": "Os formatos indicados abaixo são usados para preencher os campos automaticamente na criação da fatura.", "default_formats_description": "Below given formats are used to fill up the fields automatically on invoice creation.",
"default_invoice_email_body": "Corpo Padrão de Email de Fatura", "default_invoice_email_body": "Corpo Padrão de Email de Fatura",
"company_address_format": "Formato de Endereço de Empresa", "company_address_format": "Formato de Endereço de Empresa",
"shipping_address_format": "Formato de Endereço de Envio", "shipping_address_format": "Formato de Endereço de Envio",
"billing_address_format": "Formato de Endereço de Faturamento", "billing_address_format": "Formato de Endereço de Faturamento",
"invoice_email_attachment": "Enviar faturas como anexos", "invoice_email_attachment": "Enviar faturas como anexos",
"invoice_email_attachment_setting_description": "Ative esta opção se quiser anexar faturas no e-mail. Lembrando que quando habilitado, o botão 'Ver fatura' nos e-mails não será mais exibido.", "invoice_email_attachment_setting_description": "Ative esta opção se quiser anexar faturas no e-mail. Lembrando que quando habilitado, o botão 'Ver fatura' nos e-mails não será mais exibido.",
"invoice_settings_updated": "Configurações da fatura atualizadas com sucesso", "invoice_settings_updated": "Invoice Settings updated successfully",
"retrospective_edits": "Edições Retrospectivas", "retrospective_edits": "Retrospective Edits",
"allow": "Permitir", "allow": "Allow",
"disable_on_invoice_partial_paid": "Desativar após registrar um pagamento parcial", "disable_on_invoice_partial_paid": "Disable after partial payment is recorded",
"disable_on_invoice_paid": "Desativar após registrar um pagamento completo", "disable_on_invoice_paid": "Disable after full payment is recorded",
"disable_on_invoice_sent": "Desativar após o envio da fatura", "disable_on_invoice_sent": "Disable after invoice is sent",
"retrospective_edits_description": " Com base nas leis do seu país ou na sua preferência, é possível restringir os usuários de editar faturas finalizadas." "retrospective_edits_description": " Based on your country's laws or your preference, you can restrict users from editing finalised invoices."
}, },
"estimates": { "estimates": {
"title": "Orçamentos", "title": "Orçamentos",
"estimate_number_format": "Formato do Número de Orçamento", "estimate_number_format": "Estimate Number Format",
"estimate_number_format_description": "Personalize como seu número de orçamento é gerado automaticamente quando você cria um orçamento.", "estimate_number_format_description": "Customize how your estimate number gets generated automatically when you create a new estimate.",
"preview_estimate_number": "Pré-visualizar Número de Orçamento", "preview_estimate_number": "Preview Estimate Number",
"expiry_date": "Vencimento", "expiry_date": "Expiry Date",
"expiry_date_description": "Especifique como a data de vencimento é definida automaticamente quando você cria um orçamento.", "expiry_date_description": "Specify how expiry date is automatically set when you create an estimate.",
"expiry_date_days": "Orçamento expira após dias", "expiry_date_days": "Estimate Expires after days",
"set_expiry_date_automatically": "Definir Data de Vencimento Automaticamente", "set_expiry_date_automatically": "Set Expiry Date Automatically",
"set_expiry_date_automatically_description": "Habilite isso se desejar definir a data de vencimento automaticamente ao criar um orçamento.", "set_expiry_date_automatically_description": "Enable this if you wish to set expiry date automatically when you create a new estimate.",
"default_formats": "Formatos Padrão", "default_formats": "Default Formats",
"default_formats_description": "Os formatos indicados abaixo são usados para preencher os campos automaticamente na criação do orçamento.", "default_formats_description": "Below given formats are used to fill up the fields automatically on estimate creation.",
"default_estimate_email_body": "Corpo Padrão de Email de Orçamento", "default_estimate_email_body": "Corpo Padrão de Email de Orçamento",
"company_address_format": "Formato de Endereço de Empresa", "company_address_format": "Formato de Endereço de Empresa",
"shipping_address_format": "Formato de Endereço de Envio", "shipping_address_format": "Formato de Endereço de Envio",
"billing_address_format": "Formato de Endereço de Faturamento", "billing_address_format": "Formato de Endereço de Faturamento",
"estimate_email_attachment": "Enviar orçamentos como anexos", "estimate_email_attachment": "Enviar orçamentos como anexos",
"estimate_email_attachment_setting_description": "Ative esta opção se quiser anexar orçamentos no e-mail. Lembrando que quando habilitado, o botão 'Ver orçamento' nos e-mails não será mais exibido.", "estimate_email_attachment_setting_description": "Ative esta opção se quiser anexar orçamentos no e-mail. Lembrando que quando habilitado, o botão 'Ver orçamento' nos e-mails não será mais exibido.",
"estimate_settings_updated": "Configurações de orçamento atualizadas com sucesso", "estimate_settings_updated": "Estimate Settings updated successfully",
"convert_estimate_options": "Ação de Conversão de Orçamento", "convert_estimate_options": "Estimate Convert Action",
"convert_estimate_description": "Especifique o que acontece com o orçamento depois que ele é convertido em uma fatura.", "convert_estimate_description": "Specify what happens to the estimate after it gets converted to an invoice.",
"no_action": "Nenhuma ação", "no_action": "No action",
"delete_estimate": "Excluir orçamento", "delete_estimate": "Delete estimate",
"mark_estimate_as_accepted": "Marcar orçamento como aceito" "mark_estimate_as_accepted": "Mark estimate as accepted"
}, },
"payments": { "payments": {
"title": "Pagamentos", "title": "Pagamentos",
"payment_number_format": "Formato do Número de Pagamento", "payment_number_format": "Payment Number Format",
"payment_number_format_description": "Personalize como seu número de pagamento é gerado automaticamente quando você cria um pagamento.", "payment_number_format_description": "Customize how your payment number gets generated automatically when you create a new payment.",
"preview_payment_number": "Visualizar Número de Pagamento", "preview_payment_number": "Preview Payment Number",
"default_formats": "Formato padrão", "default_formats": "Default Formats",
"default_formats_description": "Os formatos abaixo são usados para preencher os campos automaticamente na criação de pagamentos.", "default_formats_description": "Below given formats are used to fill up the fields automatically on payment creation.",
"default_payment_email_body": "Corpo Padrão de Email de Pagamento", "default_payment_email_body": "Corpo Padrão de Email de Pagamento",
"company_address_format": "Formato de Endereço de Empresa", "company_address_format": "Formato de Endereço de Empresa",
"from_customer_address_format": "Formato de Endereço de Cliente Remetente", "from_customer_address_format": "Formato de Endereço de Cliente Remetente",
"payment_email_attachment": "Enviar pagamentos como anexos", "payment_email_attachment": "Enviar pagamentos como anexos",
"payment_email_attachment_setting_description": "Ative esta opção se quiser enviar em anexo os recibos de pagamento no e-mail. Lembrando que quando habilitado, o botão 'Ver Pagamento' nos e-mails não será mais exibido.", "payment_email_attachment_setting_description": "Ative esta opção se quiser enviar em anexo os recibos de pagamento no e-mail. Lembrando que quando habilitado, o botão 'Ver Pagamento' nos e-mails não será mais exibido.",
"payment_settings_updated": "Configurações de Pagamento atualizada com sucesso" "payment_settings_updated": "Payment Settings updated successfully"
}, },
"items": { "items": {
"title": "Itens", "title": "Itens",
@ -1072,55 +1072,55 @@
"please_enter_email": "Por favor digite um E-mail" "please_enter_email": "Por favor digite um E-mail"
}, },
"roles": { "roles": {
"title": "Nível de Acesso", "title": "Roles",
"description": "Gerenciar os cargos e permissões desta empresa", "description": "Manage the roles & permissions of this company",
"save": "Salvar", "save": "Save",
"add_new_role": "Criar Nível de Acesso", "add_new_role": "Add New Role",
"role_name": "Nome", "role_name": "Role Name",
"added_on": "Adicionado em", "added_on": "Added on",
"add_role": "Adicionar função", "add_role": "Add Role",
"edit_role": "Editar Função", "edit_role": "Edit Role",
"name": "Nome", "name": "Name",
"permission": "Permissão | Permissões", "permission": "Permission | Permissions",
"select_all": "Selecionar tudo", "select_all": "Select All",
"none": "Nenhum", "none": "None",
"confirm_delete": "Você não poderá recuperar este Cargo", "confirm_delete": "You will not be able to recover this Role",
"created_message": "Cargo criado com sucesso", "created_message": "Role created successfully",
"updated_message": "Cargo atualizado com sucesso", "updated_message": "Role updated successfully",
"deleted_message": "Cargo deletado com sucesso", "deleted_message": "Role deleted successfully",
"already_in_use": "Cargo já em uso" "already_in_use": "Role is already in use"
}, },
"exchange_rate": { "exchange_rate": {
"exchange_rate": "Taxa de Câmbio", "exchange_rate": "Exchange Rate",
"title": "Corrigir problemas do câmbio", "title": "Fix Currency Exchange issues",
"description": "Por favor, indique a taxa de câmbio de todas as moedas mencionadas abaixo para ajudar o Crater a calcular corretamente as quantidades em {currency}.", "description": "Please enter exchange rate of all the currencies mentioned below to help Crater properly calculate the amounts in {currency}.",
"drivers": "Drivers", "drivers": "Drivers",
"new_driver": "Adicionar Fornecedor", "new_driver": "Add New Provider",
"edit_driver": "Editar fornecedor", "edit_driver": "Edit Provider",
"select_driver": "Select Driver", "select_driver": "Select Driver",
"update": "selecione a taxa de câmbio ", "update": "select exchange rate ",
"providers_description": "Configure aqui a taxa de câmbio de seus fornecedores para buscar automaticamente a taxa de câmbio mais recente nas transações.", "providers_description": "Configure your exchange rate providers here to automatically fetch the latest exchange rate on transactions.",
"key": "Chave da API", "key": "API Key",
"name": "Nome", "name": "Name",
"driver": "Driver", "driver": "Driver",
"is_default": "É PADRÃO", "is_default": "IS DEFAULT",
"currency": "Moedas", "currency": "Currencies",
"exchange_rate_confirm_delete": "You will not be able to recover this driver", "exchange_rate_confirm_delete": "You will not be able to recover this driver",
"created_message": "Fornecedor criado com sucesso", "created_message": "Provider Created successfully",
"updated_message": "Fornecedor Atualizado com Sucesso", "updated_message": "Provider Updated Successfully",
"deleted_message": "Fornecedor Excluído com Sucesso", "deleted_message": "Provider Deleted Successfully",
"error": " You cannot Delete Active Driver", "error": " You cannot Delete Active Driver",
"default_currency_error": "Esta moeda já é usada em um dos fornecedores ativos", "default_currency_error": "This currency is already used in one of the Active Provider",
"exchange_help_text": "Digite a taxa de câmbio para converter de {currency} para {baseCurrency}", "exchange_help_text": "Enter exchange rate to convert from {currency} to {baseCurrency}",
"currency_freak": "Currency Freak", "currency_freak": "Currency Freak",
"currency_layer": "Currency Layer", "currency_layer": "Currency Layer",
"open_exchange_rate": "Abrir Taxa de Câmbio", "open_exchange_rate": "Open Exchange Rate",
"currency_converter": "Conversor de moeda", "currency_converter": "Currency Converter",
"server": "Servidor", "server": "Server",
"url": "URL", "url": "URL",
"active": "Ativo", "active": "Active",
"currency_help_text": "Este fornecedor será usado somente nas moedas selecionadas acima", "currency_help_text": "This provider will only be used on above selected currencies",
"currency_in_used": "As seguintes moedas já estão ativas em outro fornecedor. Remova essas moedas da seleção para ativar este fornecedor novamente." "currency_in_used": "The following currencies are already active on another provider. Please remove these currencies from selection to activate this provider again."
}, },
"tax_types": { "tax_types": {
"title": "Tipos de Impostos", "title": "Tipos de Impostos",
@ -1142,17 +1142,17 @@
"already_in_use": "O Imposto já está em uso" "already_in_use": "O Imposto já está em uso"
}, },
"payment_modes": { "payment_modes": {
"title": "Forma de Pagamento", "title": "Payment Modes",
"description": "Modos de transação para pagamentos", "description": "Modes of transaction for payments",
"add_payment_mode": "Adicionar Forma de Pagamento", "add_payment_mode": "Add Payment Mode",
"edit_payment_mode": "Editar Forma de Pagamento", "edit_payment_mode": "Edit Payment Mode",
"mode_name": "Nome da Forma de Pagamento", "mode_name": "Mode Name",
"payment_mode_added": "Forma de Pagamento Adicionada", "payment_mode_added": "Payment Mode Added",
"payment_mode_updated": "Forma de Pagamento Atualizada", "payment_mode_updated": "Payment Mode Updated",
"payment_mode_confirm_delete": "Você não poderá recuperar esta Forma de Pagamento", "payment_mode_confirm_delete": "You will not be able to recover this Payment Mode",
"payments_attached": "Este método de pagamento já está anexado aos pagamentos. Por favor, exclua os pagamentos anexados para prosseguir com a exclusão.", "payments_attached": "This payment method is already attached to payments. Please delete the attached payments to proceed with deletion.",
"expenses_attached": "Este método de pagamento já está anexado às despesas. Por favor, apague as despesas anexadas para prosseguir com a exclusão.", "expenses_attached": "This payment method is already attached to expenses. Please delete the attached expenses to proceed with deletion.",
"deleted_message": "Forma de Pagamento excluída com sucesso" "deleted_message": "Payment Mode deleted successfully"
}, },
"expense_category": { "expense_category": {
"title": "Categoria de Despesa", "title": "Categoria de Despesa",
@ -1178,8 +1178,8 @@
"discount_setting": "Configuração de Desconto", "discount_setting": "Configuração de Desconto",
"discount_per_item": "Desconto por Item ", "discount_per_item": "Desconto por Item ",
"discount_setting_description": "Habilite isso se desejar adicionar desconto a itens de Fatura individualmente. Por padrão, o desconto é adicionado diretamente à Fatura.", "discount_setting_description": "Habilite isso se desejar adicionar desconto a itens de Fatura individualmente. Por padrão, o desconto é adicionado diretamente à Fatura.",
"expire_public_links": "Expirar Links Públicos Automaticamente", "expire_public_links": "Automatically Expire Public Links",
"expire_setting_description": "Especifique se deseja expirar todos os links enviados pelo aplicativo para visualizar faturas, orçamentos, pagamentos e etc., após um período especificado.", "expire_setting_description": "Specify whether you would like to expire all the links sent by application to view invoices, estimates & payments, etc after a specified duration.",
"save": "Salvar", "save": "Salvar",
"preference": "Preferência | Preferências", "preference": "Preferência | Preferências",
"general_settings": "Preferências padrão para o sistema.", "general_settings": "Preferências padrão para o sistema.",
@ -1188,13 +1188,13 @@
"select_time_zone": "Selecione um fuso horário", "select_time_zone": "Selecione um fuso horário",
"select_date_format": "Selecionar um Formato de Data", "select_date_format": "Selecionar um Formato de Data",
"select_financial_year": "Selecione o ano financeiro", "select_financial_year": "Selecione o ano financeiro",
"recurring_invoice_status": "Status da fatura recorrente", "recurring_invoice_status": "Recurring Invoice Status",
"create_status": "Criar Status", "create_status": "Create Status",
"active": "Ativo", "active": "Active",
"on_hold": "Em espera", "on_hold": "On Hold",
"update_status": "Atualizar Status", "update_status": "Update Status",
"completed": "Concluído", "completed": "Completed",
"company_currency_unchangeable": "Moeda da empresa não pode ser alterada" "company_currency_unchangeable": "Company currency cannot be changed"
}, },
"update_app": { "update_app": {
"title": "Atualizar Aplicativo", "title": "Atualizar Aplicativo",
@ -1217,10 +1217,10 @@
"finishing_update": "Acabando a Atualização", "finishing_update": "Acabando a Atualização",
"update_failed": "Atualização falhou", "update_failed": "Atualização falhou",
"update_failed_text": "Desculpa! Sua atualização falhou no passo: {step}", "update_failed_text": "Desculpa! Sua atualização falhou no passo: {step}",
"update_warning": "Todos os arquivos de aplicativo e arquivos de modelo padrão serão substituídos quando você atualizar o aplicativo usando este utilitário. Faça um backup de seus templates e banco de dados antes de atualizar." "update_warning": "All of the application files and default template files will be overwritten when you update the application using this utility. Please take a backup of your templates & database before updating."
}, },
"backup": { "backup": {
"title": "Cópia de segurança | Cópias de segurança", "title": "Backup | Backups",
"description": "O backup é um arquivo zip que contém todos os arquivos nas pastas que você especificou juntamente com um arquivo de backup de sua base de dados", "description": "O backup é um arquivo zip que contém todos os arquivos nas pastas que você especificou juntamente com um arquivo de backup de sua base de dados",
"new_backup": "Adicionar Novo Backup", "new_backup": "Adicionar Novo Backup",
"create_backup": "Criar Backup", "create_backup": "Criar Backup",
@ -1248,7 +1248,7 @@
"created_at": "criado em", "created_at": "criado em",
"dropbox": "dropbox", "dropbox": "dropbox",
"name": "Nome", "name": "Nome",
"driver": "Motorista", "driver": "Driver",
"disk_type": "Tipo", "disk_type": "Tipo",
"disk_name": "Nome do disco", "disk_name": "Nome do disco",
"new_disk": "Adicionar novo disco", "new_disk": "Adicionar novo disco",
@ -1301,16 +1301,16 @@
"invalid_disk_credentials": "Credencial inválida para o disco selecionado" "invalid_disk_credentials": "Credencial inválida para o disco selecionado"
}, },
"taxations": { "taxations": {
"add_billing_address": "Endereço de Cobrança do Cliente", "add_billing_address": "Enter Billing Address",
"add_shipping_address": "Endereço de Entrega do Cliente", "add_shipping_address": "Enter Shipping Address",
"add_company_address": "Insira o Endereço da Empresa", "add_company_address": "Enter Company Address",
"modal_description": "As informações abaixo são necessárias para obter o imposto sobre vendas.", "modal_description": "The information below is required in order to fetch sales tax.",
"add_address": "Adicionar endereço para buscar o imposto sobre vendas.", "add_address": "Add Address for fetching sales tax.",
"address_placeholder": "Exemplo: 123, Minha Rua", "address_placeholder": "Example: 123, My Street",
"city_placeholder": "Exemplo: Los Angeles", "city_placeholder": "Example: Los Angeles",
"state_placeholder": "Exemplo: CA", "state_placeholder": "Example: CA",
"zip_placeholder": "Exemplo: 90024", "zip_placeholder": "Example: 90024",
"invalid_address": "Forneça detalhes do endereço válido." "invalid_address": "Please provide valid address details."
} }
}, },
"wizard": { "wizard": {
@ -1328,7 +1328,7 @@
"logo_preview": "Pré-visualizar Logotipo", "logo_preview": "Pré-visualizar Logotipo",
"preferences": "Preferências", "preferences": "Preferências",
"preferences_desc": "Preferências padrão para o sistema.", "preferences_desc": "Preferências padrão para o sistema.",
"currency_set_alert": "A moeda da empresa não pode ser alterada mais tarde.", "currency_set_alert": "The company's currency cannot be changed later.",
"country": "País", "country": "País",
"state": "Estado", "state": "Estado",
"city": "Cidade", "city": "Cidade",
@ -1372,7 +1372,7 @@
"app_domain": "Domínio do Aplicativo", "app_domain": "Domínio do Aplicativo",
"verify_now": "Verificar Agora", "verify_now": "Verificar Agora",
"success": "Domínio Verificado com Sucesso.", "success": "Domínio Verificado com Sucesso.",
"failed": "Falha na verificação de domínio. Digite um nome de domínio válido.", "failed": "Domain verification failed. Please enter valid domain name.",
"verify_and_continue": "Verificar e Continuar" "verify_and_continue": "Verificar e Continuar"
}, },
"mail": { "mail": {
@ -1425,7 +1425,7 @@
"not_yet": "Ainda não? Envie novamente", "not_yet": "Ainda não? Envie novamente",
"password_min_length": "A senha deve ter {count} caracteres", "password_min_length": "A senha deve ter {count} caracteres",
"name_min_length": "O nome deve ter pelo menos {count} letras.", "name_min_length": "O nome deve ter pelo menos {count} letras.",
"prefix_min_length": "O nome deve ter pelo menos {count} letras.", "prefix_min_length": "Prefix must have at least {count} letters.",
"enter_valid_tax_rate": "Insira uma taxa de imposto válida", "enter_valid_tax_rate": "Insira uma taxa de imposto válida",
"numbers_only": "Apenas Números.", "numbers_only": "Apenas Números.",
"characters_only": "Apenas Caracteres.", "characters_only": "Apenas Caracteres.",
@ -1440,7 +1440,7 @@
"price_minvalue": "O preço deve ser maior que 0.", "price_minvalue": "O preço deve ser maior que 0.",
"amount_maxlength": "Valor não deve ter mais de 20 dígitos.", "amount_maxlength": "Valor não deve ter mais de 20 dígitos.",
"amount_minvalue": "O valor deve ser maior que 0.", "amount_minvalue": "O valor deve ser maior que 0.",
"discount_maxlength": "Desconto não deve ser maior que o máximo de desconto", "discount_maxlength": "Discount should not be greater than max discount",
"description_maxlength": "A descrição não deve ter mais que 255 caracteres.", "description_maxlength": "A descrição não deve ter mais que 255 caracteres.",
"subject_maxlength": "O assunto não deve ter mais que 100 caracteres.", "subject_maxlength": "O assunto não deve ter mais que 100 caracteres.",
"message_maxlength": "A mensagem não deve ter mais que 255 caracteres.", "message_maxlength": "A mensagem não deve ter mais que 255 caracteres.",
@ -1451,41 +1451,41 @@
"prefix_maxlength": "O prefixo não deve ter mais que 5 caracteres.", "prefix_maxlength": "O prefixo não deve ter mais que 5 caracteres.",
"something_went_wrong": "algo deu errado", "something_went_wrong": "algo deu errado",
"number_length_minvalue": "O valor deve ser maior que 0", "number_length_minvalue": "O valor deve ser maior que 0",
"at_least_one_ability": "Você deve selecionar ao menos uma permissão.", "at_least_one_ability": "Please select atleast one Permission.",
"valid_driver_key": "Por favor, insira uma chave válida de {driver}.", "valid_driver_key": "Please enter a valid {driver} key.",
"valid_exchange_rate": "Por favor digite a taxa de câmbio.", "valid_exchange_rate": "Please enter a valid exchange rate.",
"company_name_not_same": "O nome da empresa deve corresponder com o nome fornecido." "company_name_not_same": "Company name must match with given name."
}, },
"errors": { "errors": {
"starter_plan": "Este recurso está disponível no plano de Starter!", "starter_plan": "This feature is available on Starter plan and onwards!",
"invalid_provider_key": "Por favor, insira uma chave de API do provedor válido.", "invalid_provider_key": "Please Enter Valid Provider API Key.",
"estimate_number_used": "O número de pagamento já está em uso.", "estimate_number_used": "The estimate number has already been taken.",
"invoice_number_used": "O número da fatura já está em uso.", "invoice_number_used": "The invoice number has already been taken.",
"payment_attached": "Uma das faturas selecionadas já possui um pagamento anexado. Certifique-se de excluir os pagamentos anexados primeiro, para continuar com a exclusão.", "payment_attached": "This invoice already has a payment attached to it. Make sure to delete the attached payments first in order to go ahead with the removal.",
"payment_number_used": "O número de pagamento já está em uso.", "payment_number_used": "The payment number has already been taken.",
"name_already_taken": "O nome já está em uso.", "name_already_taken": "The name has already been taken.",
"receipt_does_not_exist": "O recibo não existe.", "receipt_does_not_exist": "Receipt does not exist.",
"customer_cannot_be_changed_after_payment_is_added": "O cliente não pode ser alterado após o pagamento ser adicionado", "customer_cannot_be_changed_after_payment_is_added": "Customer cannot be change after payment is added",
"invalid_credentials": "Credenciais inválidas", "invalid_credentials": "Invalid Credentials.",
"not_allowed": "Não permitido", "not_allowed": "Not Allowed",
"login_invalid_credentials": "Credenciais não correspondem aos nossos registros.", "login_invalid_credentials": "These credentials do not match our records.",
"enter_valid_cron_format": "Por favor, insira um formato de URL válida", "enter_valid_cron_format": "Please enter a valid cron format",
"email_could_not_be_sent": "Não foi possível enviar o e-mail para este endereço de e-mail.", "email_could_not_be_sent": "Email could not be sent to this email address.",
"invalid_address": "Por favor, insira um endereço de e-mail válido.", "invalid_address": "Please enter a valid address.",
"invalid_key": "Favor inserir uma chave válida.", "invalid_key": "Please enter valid key.",
"invalid_state": "Por favor, insira um estado válido.", "invalid_state": "Please enter a valid state.",
"invalid_city": "Por favor, insira uma cidade válida.", "invalid_city": "Please enter a valid city.",
"invalid_postal_code": "Por favor, insira um CEP válido.", "invalid_postal_code": "Please enter a valid zip.",
"invalid_format": "Por favor, insira o formato de texto de consulta válido.", "invalid_format": "Please enter valid query string format.",
"api_error": "O servidor não está respondendo", "api_error": "Server not responding.",
"feature_not_enabled": "Recurso não ativado.", "feature_not_enabled": "Feature not enabled.",
"request_limit_met": "Limite de solicitações excedido", "request_limit_met": "Api request limit exceeded.",
"address_incomplete": "Endereço Incompleto" "address_incomplete": "Incomplete Address"
}, },
"pdf_estimate_label": "Orçamento", "pdf_estimate_label": "Orçamento",
"pdf_estimate_number": "Numero do Orçamento", "pdf_estimate_number": "Numero do Orçamento",
"pdf_estimate_date": "Data do Orçamento", "pdf_estimate_date": "Data do Orçamento",
"pdf_estimate_expire_date": "Validade", "pdf_estimate_expire_date": "Data de expiração",
"pdf_invoice_label": "Fatura", "pdf_invoice_label": "Fatura",
"pdf_invoice_number": "Número da fatura", "pdf_invoice_number": "Número da fatura",
"pdf_invoice_date": "Data da Fatura", "pdf_invoice_date": "Data da Fatura",
@ -1522,5 +1522,5 @@
"pdf_bill_to": "Cobrar a,", "pdf_bill_to": "Cobrar a,",
"pdf_ship_to": "Envie a,", "pdf_ship_to": "Envie a,",
"pdf_received_from": "Remetente:", "pdf_received_from": "Remetente:",
"pdf_tax_label": "Imposto" "pdf_tax_label": "Tax"
} }

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Estimate", "pdf_estimate_label": "Estimate",
"pdf_estimate_number": "Estimate Number", "pdf_estimate_number": "Estimate Number",
"pdf_estimate_date": "Estimate Date", "pdf_estimate_date": "Estimate Date",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Expiry date",
"pdf_invoice_label": "Invoice", "pdf_invoice_label": "Invoice",
"pdf_invoice_number": "Invoice Number", "pdf_invoice_number": "Invoice Number",
"pdf_invoice_date": "Invoice Date", "pdf_invoice_date": "Invoice Date",

File diff suppressed because it is too large Load Diff

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Cenový odhad", "pdf_estimate_label": "Cenový odhad",
"pdf_estimate_number": "Číslo cenového odhadu", "pdf_estimate_number": "Číslo cenového odhadu",
"pdf_estimate_date": "Dátum cenového odhadu", "pdf_estimate_date": "Dátum cenového odhadu",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Platnosť cenového odhadu",
"pdf_invoice_label": "Faktúra", "pdf_invoice_label": "Faktúra",
"pdf_invoice_number": "Číslo faktúry", "pdf_invoice_number": "Číslo faktúry",
"pdf_invoice_date": "Dátum vystavenia", "pdf_invoice_date": "Dátum vystavenia",

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
"settings": "Podešavanja", "settings": "Podešavanja",
"logout": "Odjavi se", "logout": "Odjavi se",
"users": "Korisnici", "users": "Korisnici",
"modules": "Moduli" "modules": "Modules"
}, },
"general": { "general": {
"add_company": "Dodaj kompaniju", "add_company": "Dodaj kompaniju",
@ -30,8 +30,8 @@
"from": "Pošiljalac", "from": "Pošiljalac",
"to": "Primalac", "to": "Primalac",
"ok": "Ok", "ok": "Ok",
"yes": "Da", "yes": "Yes",
"no": "Ne", "no": "No",
"sort_by": "Rasporedi Po", "sort_by": "Rasporedi Po",
"ascending": "Rastuće", "ascending": "Rastuće",
"descending": "Opadajuće", "descending": "Opadajuće",
@ -39,7 +39,7 @@
"body": "Telo", "body": "Telo",
"message": "Poruka", "message": "Poruka",
"send": "Pošalji", "send": "Pošalji",
"preview": "Pregled", "preview": "Preview",
"go_back": "Idi nazad", "go_back": "Idi nazad",
"back_to_login": "Nazad na prijavu?", "back_to_login": "Nazad na prijavu?",
"home": "Početna", "home": "Početna",
@ -95,9 +95,9 @@
"copied_pdf_url_clipboard": "Link do PDF fajla kopiran!", "copied_pdf_url_clipboard": "Link do PDF fajla kopiran!",
"copied_url_clipboard": "Copied url to clipboard!", "copied_url_clipboard": "Copied url to clipboard!",
"docs": "Docs", "docs": "Docs",
"do_you_wish_to_continue": "Da li želite nastaviti?", "do_you_wish_to_continue": "Do you wish to continue?",
"note": "Bilješka", "note": "Note",
"pay_invoice": "Plati račun", "pay_invoice": "Pay Invoice",
"login_successfully": "Logged in successfully!", "login_successfully": "Logged in successfully!",
"logged_out_successfully": "Logged out successfully", "logged_out_successfully": "Logged out successfully",
"mark_as_default": "Mark as default" "mark_as_default": "Mark as default"
@ -318,10 +318,10 @@
}, },
"accepted": "Prihvaćeno", "accepted": "Prihvaćeno",
"rejected": "Odbijeno", "rejected": "Odbijeno",
"expired": "Istekao", "expired": "Expired",
"sent": "Poslato", "sent": "Poslato",
"draft": "U izradi", "draft": "U izradi",
"viewed": "Pregledano", "viewed": "Viewed",
"declined": "Odbijeno", "declined": "Odbijeno",
"new_estimate": "Nova Profaktura", "new_estimate": "Nova Profaktura",
"add_new_estimate": "Dodaj novu Profakturu", "add_new_estimate": "Dodaj novu Profakturu",
@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Profaktura", "pdf_estimate_label": "Profaktura",
"pdf_estimate_number": "Broj Profakture", "pdf_estimate_number": "Broj Profakture",
"pdf_estimate_date": "Datum Profakture", "pdf_estimate_date": "Datum Profakture",
"pdf_estimate_expire_date": "Expiry Date", "pdf_estimate_expire_date": "Datum isteka Profakture",
"pdf_invoice_label": "Faktura", "pdf_invoice_label": "Faktura",
"pdf_invoice_number": "Broj Fakture", "pdf_invoice_number": "Broj Fakture",
"pdf_invoice_date": "Datum Fakture", "pdf_invoice_date": "Datum Fakture",

Some files were not shown because too many files have changed in this diff Show More