From 4839e57791f7a1b5409564ed9734fa140dd604a4 Mon Sep 17 00:00:00 2001 From: yogesh_gohil Date: Tue, 12 Nov 2019 17:21:06 +0530 Subject: [PATCH 1/9] connect mail settings to api --- .../Controllers/EnvironmentController.php | 19 +++++++++- .../assets/js/components/base/BaseInput.vue | 18 ++++++++-- .../assets/js/views/settings/MailConfig.vue | 35 +++++++++++-------- .../js/views/wizard/EmailConfiguration.vue | 3 +- .../assets/plugins/vue-font-awesome/index.js | 4 ++- routes/api.php | 15 ++++++++ 6 files changed, 74 insertions(+), 20 deletions(-) diff --git a/app/Http/Controllers/EnvironmentController.php b/app/Http/Controllers/EnvironmentController.php index 2ce919e9..0ef07962 100755 --- a/app/Http/Controllers/EnvironmentController.php +++ b/app/Http/Controllers/EnvironmentController.php @@ -57,13 +57,30 @@ class EnvironmentController extends Controller */ public function saveMailEnvironment(MailEnvironmentRequest $request) { + $setting = Setting::getSetting('profile_complete'); $results = $this->EnvironmentManager->saveMailVariables($request); - Setting::setSetting('profile_complete', 4); + if ($setting !== 'COMPLETED') + { + Setting::setSetting('profile_complete', 4); + } return response()->json($results); } + public function getMailEnvironment() + { + $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') + ]; + + return response()->json($MailData); + } /** * diff --git a/resources/assets/js/components/base/BaseInput.vue b/resources/assets/js/components/base/BaseInput.vue index 08a85bfd..09936d55 100644 --- a/resources/assets/js/components/base/BaseInput.vue +++ b/resources/assets/js/components/base/BaseInput.vue @@ -4,7 +4,7 @@ +
+ +
@@ -77,12 +80,17 @@ export default { autocomplete: { type: String, default: 'on' + }, + showPassword: { + type: Boolean, + default: false } }, data () { return { inputValue: this.value, - focus: false + focus: false, + showPass: false } }, computed: { @@ -94,6 +102,12 @@ export default { return true } return false + }, + toggleType () { + if (this.showPass) { + return 'text' + } + return this.type } }, watch: { diff --git a/resources/assets/js/views/settings/MailConfig.vue b/resources/assets/js/views/settings/MailConfig.vue index e3f83ac6..418803fa 100644 --- a/resources/assets/js/views/settings/MailConfig.vue +++ b/resources/assets/js/views/settings/MailConfig.vue @@ -66,8 +66,9 @@
@@ -121,7 +122,7 @@ color="theme" type="submit" > - {{ $t('wizard.save_cont') }} + {{ $t('general.save') }}
@@ -141,12 +142,12 @@ export default { data () { return { mailConfigData: { - mail_driver: 'smtp', - mail_host: 'mailtrap.io', - mail_port: 2525, - mail_username: 'cc3c64516febd4', - mail_password: 'e6a0176301f587', - mail_encryption: 'tls' + mail_driver: '', + mail_host: '', + mail_port: null, + mail_username: '', + mail_password: '', + mail_encryption: '' }, loading: false, mail_drivers: [] @@ -176,18 +177,22 @@ export default { } }, mounted () { - // this.getMailDrivers() + this.loadData() }, methods: { - async getMailDrivers () { + async loadData () { this.loading = true - let response = await window.axios.get('/api/admin/onboarding/environment/mail') + let mailDrivers = await window.axios.get('/api/settings/environment/mail') + let mailData = await window.axios.get('/api/settings/environment/mail-env') - if (response.data) { - this.mail_drivers = response.data - this.loading = false + if (mailDrivers.data) { + this.mail_drivers = mailDrivers.data } + if (mailData.data) { + this.mailConfigData = mailData.data + } + this.loading = false }, async saveEmailConfig () { this.$v.mailConfigData.$touch() @@ -196,7 +201,7 @@ export default { } this.loading = true try { - let response = await window.axios.post('/api/admin/onboarding/environment/mail', this.mailConfigData) + let response = await window.axios.post('/api/settings/environment/mail', this.mailConfigData) if (response.data.success) { window.toastr['success'](this.$t('wizard.success.' + response.data.success)) } else { diff --git a/resources/assets/js/views/wizard/EmailConfiguration.vue b/resources/assets/js/views/wizard/EmailConfiguration.vue index f90c6a04..ecc92ad5 100644 --- a/resources/assets/js/views/wizard/EmailConfiguration.vue +++ b/resources/assets/js/views/wizard/EmailConfiguration.vue @@ -61,7 +61,8 @@ diff --git a/resources/assets/plugins/vue-font-awesome/index.js b/resources/assets/plugins/vue-font-awesome/index.js index fd85606a..f2cfac9b 100644 --- a/resources/assets/plugins/vue-font-awesome/index.js +++ b/resources/assets/plugins/vue-font-awesome/index.js @@ -50,7 +50,8 @@ import { faShare, faEllipsisH, faCopy, - faPaperPlane + faPaperPlane, + faEyeSlash } from '@fortawesome/free-solid-svg-icons' import { far } from '@fortawesome/free-regular-svg-icons' import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' @@ -108,6 +109,7 @@ library.add( faFilePdf, faEnvelope, faEye, + faEyeSlash, faShare, faEllipsisH, faCopy, diff --git a/routes/api.php b/routes/api.php index 4fa230ff..6fca466d 100644 --- a/routes/api.php +++ b/routes/api.php @@ -323,6 +323,21 @@ Route::group(['middleware' => 'api'], function () { 'uses' => 'CompanyController@updateSetting' ]); + Route::get('/environment/mail', [ + 'as' => 'admin.environment.mail', + 'uses' => 'EnvironmentController@getMailDrivers' + ]); + + Route::get('/environment/mail-env', [ + 'as' => 'admin.mail.env', + 'uses' => 'EnvironmentController@getMailEnvironment' + ]); + + Route::post('/environment/mail', [ + 'as' => 'admin.environment.mail.save', + 'uses' => 'EnvironmentController@saveMailEnvironment' + ]); + }); }); From 85cc6427e942efcc87e0b87492f2d836c0dd76bc Mon Sep 17 00:00:00 2001 From: bansarishukla Date: Thu, 14 Nov 2019 14:54:12 +0530 Subject: [PATCH 2/9] status color --- resources/assets/sass/pages/statuses.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/assets/sass/pages/statuses.scss b/resources/assets/sass/pages/statuses.scss index e1c304dd..ba06575f 100644 --- a/resources/assets/sass/pages/statuses.scss +++ b/resources/assets/sass/pages/statuses.scss @@ -15,9 +15,9 @@ } .inv-status-unpaid { - background: rgba(246, 208, 154, 0.4); + background: #F8EDCB; font-size: 13px; - color: #A96E1A; + color: #6C432E; padding: 5px 10px; } @@ -50,9 +50,9 @@ } .inv-status-partially_paid { - background: #E1E0EA; + background: #C9E3EC; font-size: 13px; - color: #312F57; + color: #1E576C; padding: 5px 10px; } From 8fc1ef93486605ef31bb5ccf03fc1b3dc85af32c Mon Sep 17 00:00:00 2001 From: bansarishukla Date: Thu, 14 Nov 2019 15:05:39 +0530 Subject: [PATCH 3/9] status color --- resources/assets/sass/pages/statuses.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/sass/pages/statuses.scss b/resources/assets/sass/pages/statuses.scss index ba06575f..6f98827e 100644 --- a/resources/assets/sass/pages/statuses.scss +++ b/resources/assets/sass/pages/statuses.scss @@ -1,6 +1,6 @@ // Invoice statuses -.inv-status-due { +.inv-status-overdue { background: #FED7D7; font-size: 13px; color: #9B2C2C; From 2dda0baa3fb40a3f28c5dadd027dfa7980c55ddb Mon Sep 17 00:00:00 2001 From: yogesh_gohil Date: Thu, 14 Nov 2019 15:51:48 +0530 Subject: [PATCH 4/9] fix conflicts --- database/seeds/UsersTableSeeder.php | 4 +- laravel-echo-server.json | 27 ---- npm-debug.log | 37 ----- public/assets/icon/check-circle-solid.svg | 17 +++ public/assets/icon/envelope-solid.svg | 13 ++ public/assets/icon/paper-plane-solid.svg | 14 ++ public/assets/icon/times-circle-solid.svg | 14 ++ public/assets/icon/trash-solid.svg | 14 ++ resources/assets/js/plugins/en.js | 23 +++- resources/assets/js/plugins/es.js | 21 ++- resources/assets/js/plugins/fr.js | 22 ++- resources/assets/js/router.js | 6 + resources/assets/js/views/auth/Login.vue | 15 +- .../assets/js/views/customers/Create.vue | 25 ++-- resources/assets/js/views/customers/Index.vue | 4 +- .../assets/js/views/dashboard/Dashboard.vue | 4 +- resources/assets/js/views/estimates/Index.vue | 130 ++++++++++++------ resources/assets/js/views/estimates/View.vue | 24 +++- resources/assets/js/views/expenses/Index.vue | 4 +- resources/assets/js/views/invoices/Index.vue | 60 +++++--- resources/assets/js/views/invoices/View.vue | 24 +++- resources/assets/js/views/items/Index.vue | 4 +- resources/assets/js/views/payments/Create.vue | 4 +- resources/assets/js/views/payments/Index.vue | 4 +- .../js/views/reports/ExpensesReport.vue | 9 +- .../js/views/reports/ProfitLossReport.vue | 9 +- .../assets/js/views/reports/SalesReports.vue | 9 +- .../assets/js/views/reports/TaxReport.vue | 11 +- .../js/views/settings/ExpenseCategory.vue | 24 +++- .../assets/js/views/settings/MailConfig.vue | 4 +- .../assets/js/views/settings/TaxTypes.vue | 35 ++--- .../assets/js/views/settings/UpdateApp.vue | 55 ++++++++ .../assets/js/views/settings/UserProfile.vue | 6 +- .../assets/js/views/settings/layout/Index.vue | 6 + .../assets/js/views/wizard/CompanyInfo.vue | 18 ++- .../assets/js/views/wizard/UserProfile.vue | 4 +- .../assets/plugins/vue-font-awesome/index.js | 4 +- resources/assets/sass/base.scss | 4 + .../sass/components/vue-multi-select.scss | 38 ++++- resources/assets/sass/pages/customers.scss | 3 - resources/assets/sass/pages/dashboard.scss | 19 +++ .../assets/sass/pages/estimates/index.scss | 4 +- .../assets/sass/pages/invoices/create.scss | 3 +- .../assets/sass/pages/invoices/index.scss | 4 +- resources/assets/sass/pages/wizard.scss | 3 + .../app/pdf/estimate/estimate1.blade.php | 2 + .../app/pdf/estimate/estimate2.blade.php | 2 + .../app/pdf/estimate/estimate3.blade.php | 2 + .../views/app/pdf/invoice/invoice1.blade.php | 2 + .../views/app/pdf/invoice/invoice2.blade.php | 4 +- .../views/app/pdf/invoice/invoice3.blade.php | 4 +- 51 files changed, 576 insertions(+), 226 deletions(-) delete mode 100644 laravel-echo-server.json delete mode 100644 npm-debug.log create mode 100644 public/assets/icon/check-circle-solid.svg create mode 100644 public/assets/icon/envelope-solid.svg create mode 100644 public/assets/icon/paper-plane-solid.svg create mode 100644 public/assets/icon/times-circle-solid.svg create mode 100644 public/assets/icon/trash-solid.svg create mode 100644 resources/assets/js/views/settings/UpdateApp.vue diff --git a/database/seeds/UsersTableSeeder.php b/database/seeds/UsersTableSeeder.php index 273e354f..3f3e480f 100644 --- a/database/seeds/UsersTableSeeder.php +++ b/database/seeds/UsersTableSeeder.php @@ -15,10 +15,10 @@ class UsersTableSeeder extends Seeder public function run() { User::create([ - 'email' => 'admin@crater.in', + 'email' => 'admin@craterapp.com', 'name' => 'Jane Doe', 'role' => 'admin', - 'password' => Hash::make('admin@123') + 'password' => Hash::make('crater@123') ]); Setting::setSetting('profile_complete', 0); diff --git a/laravel-echo-server.json b/laravel-echo-server.json deleted file mode 100644 index e72cdecc..00000000 --- a/laravel-echo-server.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "authHost": "http://crater-vue.test", - "authEndpoint": "/broadcasting/auth", - "clients": [], - "database": "redis", - "databaseConfig": { - "redis": {}, - "sqlite": { - "databasePath": "/database/laravel-echo-server.sqlite" - } - }, - "devMode": true, - "host": null, - "port": "6001", - "protocol": "http", - "socketio": {}, - "sslCertPath": "", - "sslKeyPath": "", - "sslCertChainPath": "", - "sslPassphrase": "", - "apiOriginAllow": { - "allowCors": false, - "allowOrigin": "", - "allowMethods": "", - "allowHeaders": "" - } -} \ No newline at end of file diff --git a/npm-debug.log b/npm-debug.log deleted file mode 100644 index b8c9d9e1..00000000 --- a/npm-debug.log +++ /dev/null @@ -1,37 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', -1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', -1 verbose cli 'run', -1 verbose cli 'watch' ] -2 info using npm@3.10.10 -3 info using node@v6.11.2 -4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ] -5 info lifecycle @~prewatch: @ -6 silly lifecycle @~prewatch: no script for prewatch, continuing -7 info lifecycle @~watch: @ -8 verbose lifecycle @~watch: unsafe-perm in lifecycle true -9 verbose lifecycle @~watch: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\laragon2\www\crater-vue\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\laragon2\bin\php\php-7.2.5-Win32-VC15-x86;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\laragon2\bin\yarn\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Java\jdk-10.0.1\bin;C:\Users\bytefury\AppData\Roaming\Composer\vendor\bin;C:\laragon\www\wp\node_modules\.bin;C:\laragon\www\Laravel\node_modules\webpack\bin;C:\Users\bytefury\AppData\Roaming\npm;C:\Program Files\Microsoft VS Code\bin;C:\Users\bytefury\AppData\Local\Microsoft\WindowsApps; -10 verbose lifecycle @~watch: CWD: C:\laragon2\www\crater-vue -11 silly lifecycle @~watch: Args: [ '/d /s /c', -11 silly lifecycle 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ] -12 verbose stack Error: kill ENOSYS -12 verbose stack at exports._errnoException (util.js:1020:11) -12 verbose stack at process.kill (internal/process.js:190:13) -12 verbose stack at process.listener (C:\Program Files\nodejs\node_modules\npm\node_modules\npmlog\node_modules\gauge\node_modules\signal-exit\index.js:86:15) -12 verbose stack at emitNone (events.js:91:20) -12 verbose stack at process.emit (events.js:185:7) -12 verbose stack at processEmit (C:\Program Files\nodejs\node_modules\npm\node_modules\npmlog\node_modules\gauge\node_modules\signal-exit\index.js:146:32) -12 verbose stack at processEmit (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\node_modules\npmlog\node_modules\gauge\node_modules\signal-exit\index.js:146:32) -12 verbose stack at Signal.wrap.onsignal (internal/process.js:217:44) -13 verbose cwd C:\laragon2\www\crater-vue -14 error Windows_NT 10.0.17134 -15 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch" -16 error node v6.11.2 -17 error npm v3.10.10 -18 error code ENOSYS -19 error errno ENOSYS -20 error syscall kill -21 error kill ENOSYS -22 error If you need help, you may report this error at: -22 error -23 verbose exit [ 1, true ] diff --git a/public/assets/icon/check-circle-solid.svg b/public/assets/icon/check-circle-solid.svg new file mode 100644 index 00000000..2c21c410 --- /dev/null +++ b/public/assets/icon/check-circle-solid.svg @@ -0,0 +1,17 @@ + + + + diff --git a/public/assets/icon/envelope-solid.svg b/public/assets/icon/envelope-solid.svg new file mode 100644 index 00000000..5102d95a --- /dev/null +++ b/public/assets/icon/envelope-solid.svg @@ -0,0 +1,13 @@ + diff --git a/public/assets/icon/paper-plane-solid.svg b/public/assets/icon/paper-plane-solid.svg new file mode 100644 index 00000000..771707c5 --- /dev/null +++ b/public/assets/icon/paper-plane-solid.svg @@ -0,0 +1,14 @@ + diff --git a/public/assets/icon/times-circle-solid.svg b/public/assets/icon/times-circle-solid.svg new file mode 100644 index 00000000..f64cfebc --- /dev/null +++ b/public/assets/icon/times-circle-solid.svg @@ -0,0 +1,14 @@ + diff --git a/public/assets/icon/trash-solid.svg b/public/assets/icon/trash-solid.svg new file mode 100644 index 00000000..6d52f5b6 --- /dev/null +++ b/public/assets/icon/trash-solid.svg @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/resources/assets/js/plugins/en.js b/resources/assets/js/plugins/en.js index 76fab629..404bebda 100644 --- a/resources/assets/js/plugins/en.js +++ b/resources/assets/js/plugins/en.js @@ -228,6 +228,10 @@ export default { save_estimate: 'Save Estimate', confirm_conversion: 'You want to convert this Estimate into Invoice?', conversion_message: 'Conversion successful', + confirm_send_estimate: 'This estimate will be sent via email to the customer', + confirm_mark_as_sent: 'This estimate will be marked as sent', + confirm_mark_as_accepted: 'This estimate will be marked as Accepted', + confirm_mark_as_rejected: 'This estimate will be marked as Rejected', no_matching_estimates: 'There are no matching estimates!', errors: { required: 'Field is required' @@ -303,7 +307,9 @@ export default { send_invoice: 'Send Invoice', invoice_template: 'Invoice Template', template: 'Template', - mark_as_sent: 'Mark as Sent', + mark_as_sent: 'Mark as sent', + invoice_mark_as_sent: 'This invoice will be marked as sent', + confirm_send: 'This invoice will be sent via email to the customer', invoice_date: 'Invoice Date', record_payment: 'Record Payment', add_new_invoice: 'Add New Invoice', @@ -522,7 +528,8 @@ export default { preferences: 'Preferences', notifications: 'Notifications', tax_types: 'Tax Types', - expense_category: 'Expense Categories' + expense_category: 'Expense Categories', + update_app: 'Update App' }, title: 'Settings', setting: 'Settings | Settings', @@ -624,6 +631,7 @@ export default { created_message: 'Sales tax created successfully', updated_message: 'Sales tax updated successfully', deleted_message: 'Sales tax deleted successfully', + confirm_delete: 'You will not be able to recover this Tax Type', already_in_use: 'Tax is already in use' }, expense_category: { @@ -636,6 +644,7 @@ export default { created_message: 'Category created successfully', deleted_message: 'Expense category deleted successfully', updated_message: 'Expense category updated successfully', + confirm_delete: 'You will not be able to recover this Expense Category', already_in_use: 'Category is already in use' }, preferences: { @@ -656,6 +665,11 @@ export default { select_time_zone: 'select Time Zone', select_date_formate: 'select Date Formate', select_financial_year: 'select financial year' + }, + update_app: { + title: 'Update App', + description: 'update app description', + update: 'Update' } }, wizard: { @@ -745,6 +759,7 @@ export default { invalid_url: 'Invalid url (ex: http://www.crater.com)', required: 'Field is required', email_incorrect: 'Incorrect Email.', + email_already_taken: 'The email has already been taken.', email_does_not_exist: "User with given email doesn't exist", send_reset_link: 'Send Reset Link', not_yet: 'Not yet? Send it again', @@ -761,9 +776,9 @@ export default { payment_greater_than_due_amount: 'Entered Payment is more than due amount of this invoice.', quantity_maxlength: 'Quantity should not be greater than 10 digits.', price_maxlength: 'Price should not be greater than 10 digits.', - price_minvalue: 'Price should be greater than 0 digits', + price_minvalue: 'Price should be greater than 0.', amount_maxlength: 'Amount should not be greater than 10 digits.', - amount_minvalue: 'Amount should be greater than 0 digits', + amount_minvalue: 'Amount should be greater than 0.', description_maxlength: 'Description should not be greater than 255 characters.', maximum_options_error: 'Maximum of {max} options selected. First remove a selected option to select another.', notes_maxlength: 'Notes should not be greater than 255 characters.', diff --git a/resources/assets/js/plugins/es.js b/resources/assets/js/plugins/es.js index 5369025a..73454af7 100644 --- a/resources/assets/js/plugins/es.js +++ b/resources/assets/js/plugins/es.js @@ -228,12 +228,15 @@ export default { estimate_template: 'Plantilla de estimación', convert_to_invoice: 'Convertir a factura', mark_as_sent: 'Marcar como enviado', - send_estimate: 'Enviar presupuesto', record_payment: 'Registro de pago', add_estimate: 'Agregar presupuesto', save_estimate: 'Guardar estimación', confirm_conversion: '¿Quiere convertir esta estimación en factura?', conversion_message: 'Conversión exitosa', + confirm_send_estimate: 'Esta estimación se enviará por correo electrónico al cliente', + confirm_mark_as_sent: 'Esta estimación se marcará como enviada', + confirm_mark_as_accepted: 'Esta estimación se marcará como Aceptada', + confirm_mark_as_rejected: 'Esta estimación se marcará como Rechazada', errors: { required: 'Se requiere campo' }, @@ -309,6 +312,8 @@ export default { invoice_template: 'Plantilla de factura', template: 'Modelo', mark_as_sent: 'Marcar como enviado', + invoice_mark_as_sent: 'Esta factura se marcará como enviada', + confirm_send: 'Estas facturas se enviarán por correo electrónico al cliente.', invoice_date: 'Fecha de la factura', record_payment: 'Registro de pago', add_new_invoice: 'Añadir nueva factura', @@ -551,6 +556,16 @@ export default { action: 'Acción', add_currency: 'Agregar moneda' }, + mail: { + host: 'Host de correo', + port: 'Puerto de correo', + driver: 'Conductor de correo', + password: 'Contraseña de correo', + username: 'Nombre de usuario de correo', + mail_config: 'Configuración de correo', + encryption: 'Cifrado de correo', + mail_config_desc: 'Los detalles a continuación se utilizarán para actualizar el entorno de correo. También puede cambiar los detalles en cualquier momento después de iniciar sesión.' + }, pdf: { title: 'Configuración de PDF', footer_text: 'Texto de pie de página', @@ -613,6 +628,7 @@ export default { created_message: 'Impuesto sobre las ventas creado con éxito', updated_message: 'Impuesto sobre ventas actualizado con éxito', deleted_message: 'Impuesto sobre las ventas eliminado con éxito', + confirm_delete: 'No podrá recuperar este tipo de impuesto', already_in_use: 'El impuesto ya está en uso.' }, expense_category: { @@ -625,6 +641,7 @@ export default { created_message: 'Categoría creada con éxito', deleted_message: 'Categoría de gastos eliminada correctamente', updated_message: 'Categoría de gastos actualizada con éxito', + confirm_delete: 'No podrá recuperar esta categoría de gastos', already_in_use: 'La categoría ya está en uso.' }, preferences: { @@ -742,7 +759,7 @@ export default { numbers_only: 'Solo numeros.', characters_only: 'Solo personajes.', password_incorrect: 'Las contraseñas deben ser idénticas', - password_length: 'La contraseña debe tener 6 caracteres de longitud.', + password_length: 'La contraseña debe tener 5 caracteres de longitud.', qty_must_greater_than_zero: 'La cantidad debe ser mayor que cero.', price_greater_than_zero: 'El precio debe ser mayor que cero.', payment_greater_than_zero: 'El pago debe ser mayor que cero.', diff --git a/resources/assets/js/plugins/fr.js b/resources/assets/js/plugins/fr.js index 577cd5e9..27d9c312 100644 --- a/resources/assets/js/plugins/fr.js +++ b/resources/assets/js/plugins/fr.js @@ -233,6 +233,10 @@ export default { save_estimate: 'Sauvegarder lestimation', confirm_conversion: 'Vous souhaitez convertir cette estimation en facture?', conversion_message: 'Conversion réussie', + confirm_send_estimate: 'Cette estimation sera envoyée par courrier électronique au client.', + confirm_mark_as_sent: 'Cette estimation sera marquée comme envoyé', + confirm_mark_as_accepted: 'Cette estimation sera marquée comme acceptée', + confirm_mark_as_rejected: 'Cette estimation sera marquée comme Rejetée', errors: { required: 'Champ requis' }, @@ -308,6 +312,8 @@ export default { invoice_template: 'Modèle de facture', template: 'Modèle', mark_as_sent: 'Marquer comme envoyé', + invoice_mark_as_sent: 'Cette facture sera marquée comme envoyé', + confirm_send: 'Cette facture sera envoyée par courrier électronique au client.', invoice_date: 'Date de facturation', record_payment: 'Record de paiement', add_new_invoice: 'Ajouter une nouvelle facture', @@ -548,7 +554,17 @@ export default { right: 'Droite', left: 'La gauche', action: 'action', - add_currency: 'Ajouter une devise', + add_currency: 'Ajouter une devise' + }, + mail: { + host: 'Mail Host', + port: 'Port mail', + driver: 'Pilote de courrier', + password: 'Mot de passe mail', + username: "Mail Nom d'utilisateur", + mail_config: 'Configuration du courrier', + encryption: 'Chiffrement du courrier', + mail_config_desc: "Les détails ci-dessous seront utilisés pour mettre à jour l'environnement de messagerie. Aussi, vous pouvez modifier les détails à tout moment après la connexion." }, pdf: { title: 'Paramètre PDF', @@ -614,6 +630,7 @@ export default { created_message: 'La taxe de vente créée avec succès', updated_message: 'La taxe de vente a été mise à jour avec succès', deleted_message: 'La taxe de vente a été supprimée avec succès', + confirm_delete: 'Vous ne pourrez pas récupérer ce type de taxe', already_in_use: 'La taxe est déjà utilisée' }, expense_category: { @@ -626,6 +643,7 @@ export default { created_message: 'Catégorie créée avec succès', deleted_message: 'La catégorie de dépenses a été supprimée avec succès', updated_message: 'Catégorie de dépenses mise à jour avec succès', + confirm_delete: 'Vous ne pourrez pas récupérer cette catégorie de dépenses', already_in_use: 'La catégorie est déjà utilisée' }, preferences: { @@ -744,7 +762,7 @@ export default { numbers_only: 'Chiffres uniquement.', characters_only: 'Caractères seulement.', password_incorrect: 'Les mots de passe doivent être identiques', - password_length: 'Le mot de passe doit comporter 6 caractères.', + password_length: 'Le mot de passe doit comporter 5 caractères.', qty_must_greater_than_zero: 'La quantité doit être supérieure à zéro.', price_greater_than_zero: 'Le prix doit être supérieur à zéro.', payment_greater_than_zero: 'Le paiement doit être supérieur à zéro.', diff --git a/resources/assets/js/router.js b/resources/assets/js/router.js index 5fb1a243..279a620d 100644 --- a/resources/assets/js/router.js +++ b/resources/assets/js/router.js @@ -72,6 +72,7 @@ import UserProfile from './views/settings/UserProfile.vue' import TaxTypes from './views/settings/TaxTypes.vue' import ExpenseCategory from './views/settings/ExpenseCategory.vue' import MailConfig from './views/settings/MailConfig.vue' +import UpdateApp from './views/settings/UpdateApp.vue' import Wizard from './views/wizard/Index.vue' @@ -337,6 +338,11 @@ const routes = [ path: 'notifications', name: 'notifications', component: Notifications + }, + { + path: 'update-app', + name: 'updateapp', + component: UpdateApp } ] } diff --git a/resources/assets/js/views/auth/Login.vue b/resources/assets/js/views/auth/Login.vue index 5e253b38..71f11758 100644 --- a/resources/assets/js/views/auth/Login.vue +++ b/resources/assets/js/views/auth/Login.vue @@ -12,10 +12,15 @@ focus type="email" name="email" + @input="$v.loginData.email.$touch()" />
- {{ $tc('validation.required') }} - {{ $tc('validation.email_incorrect') }} + + {{ $tc('validation.required') }} + + + {{ $tc('validation.email_incorrect') }} +
@@ -25,8 +30,10 @@ :invalid="$v.loginData.password.$error" type="password" name="password" + show-password + @input="$v.loginData.password.$touch()" /> -
+
{{ $tc('validation.required') }} {{ $tc('validation.password_min_length', $v.loginData.password.$params.minLength.min, {count: $v.loginData.password.$params.minLength.min}) }}
@@ -91,7 +98,7 @@ export default { }, password: { required, - minLength: minLength(8) + minLength: minLength(5) } } }, diff --git a/resources/assets/js/views/customers/Create.vue b/resources/assets/js/views/customers/Create.vue index f01bf58f..8b831584 100644 --- a/resources/assets/js/views/customers/Create.vue +++ b/resources/assets/js/views/customers/Create.vue @@ -219,7 +219,7 @@

-
+
{{ $t('customers.copy_billing_address') }} @@ -624,17 +624,20 @@ export default { this.isLoading = true this.formData.currency_id = this.currency.id } - - let response = await this.addCustomer(this.formData) - - if (response.data.success) { - window.toastr['success'](this.$t('customers.created_message')) - this.$router.push('/admin/customers') - this.isLoading = false - return true + try { + let response = await this.addCustomer(this.formData) + if (response.data.success) { + window.toastr['success'](this.$t('customers.created_message')) + this.$router.push('/admin/customers') + this.isLoading = false + return true + } + } catch (err) { + if (err.response.data.errors.email) { + this.isLoading = false + window.toastr['error'](this.$t('validation.email_already_taken')) + } } - - window.toastr['error'](response.data.error) } }, async fetchBillingState () { diff --git a/resources/assets/js/views/customers/Index.vue b/resources/assets/js/views/customers/Index.vue index 4068e5eb..33d5b9e5 100644 --- a/resources/assets/js/views/customers/Index.vue +++ b/resources/assets/js/views/customers/Index.vue @@ -343,7 +343,7 @@ export default { swal({ title: this.$t('general.are_you_sure'), text: this.$tc('customers.confirm_delete'), - icon: 'error', + icon: '/assets/icon/trash-solid.svg', buttons: true, dangerMode: true }).then(async (willDelete) => { @@ -363,7 +363,7 @@ export default { swal({ title: this.$t('general.are_you_sure'), text: this.$tc('customers.confirm_delete', 2), - icon: 'error', + icon: '/assets/icon/trash-solid.svg', buttons: true, dangerMode: true }).then(async (willDelete) => { diff --git a/resources/assets/js/views/dashboard/Dashboard.vue b/resources/assets/js/views/dashboard/Dashboard.vue index e3780514..bca6d07b 100644 --- a/resources/assets/js/views/dashboard/Dashboard.vue +++ b/resources/assets/js/views/dashboard/Dashboard.vue @@ -1,5 +1,5 @@