mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 20:21:10 -04:00
Merge branch 'master' of https://gitlab.com/mohit.panjvani/crater-web into modal-size
This commit is contained in:
31
app/Events/UpdateFinished.php
Normal file
31
app/Events/UpdateFinished.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Laraspace\Events;
|
||||
|
||||
use Illuminate\Broadcasting\Channel;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Broadcasting\PresenceChannel;
|
||||
use Illuminate\Broadcasting\PrivateChannel;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class UpdateFinished
|
||||
{
|
||||
use Dispatchable;
|
||||
|
||||
public $new;
|
||||
|
||||
public $old;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($old, $new)
|
||||
{
|
||||
$this->old = $old;
|
||||
$this->new = $new;
|
||||
}
|
||||
}
|
||||
@ -54,7 +54,7 @@ class AccessTokensController extends Controller
|
||||
{
|
||||
$request->validate([
|
||||
'username' => 'required|email',
|
||||
'password' => 'required|string',
|
||||
'password' => 'required|string|min:8',
|
||||
]);
|
||||
|
||||
if ($this->hasTooManyLoginAttempts($request)) {
|
||||
|
||||
@ -35,10 +35,9 @@ class EnvironmentController extends Controller
|
||||
{
|
||||
$results = $this->EnvironmentManager->saveDatabaseVariables($request);
|
||||
|
||||
|
||||
if(array_key_exists("success", $results)) {
|
||||
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('key:generate --force');
|
||||
Artisan::call('migrate --seed');
|
||||
Artisan::call('migrate', ['--path' => 'vendor/laravel/passport/database/migrations']);
|
||||
|
||||
@ -57,13 +56,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);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -260,6 +260,7 @@ class InvoicesController extends Controller
|
||||
'error' => 'invalid_due_amount'
|
||||
]);
|
||||
} elseif ($invoice->due_amount != 0 && $invoice->paid_status == Invoice::STATUS_PAID) {
|
||||
$invoice->status = $invoice->getPreviousStatus();
|
||||
$invoice->paid_status = Invoice::STATUS_PARTIALLY_PAID;
|
||||
}
|
||||
|
||||
|
||||
@ -203,7 +203,7 @@ class OnboardingController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
Setting::setSetting('version','1.0.0');
|
||||
Setting::setSetting('version', config('crater.version'));
|
||||
|
||||
Artisan::call('passport:install --force');
|
||||
|
||||
|
||||
@ -170,6 +170,7 @@ class PaymentController extends Controller
|
||||
$invoice->status = Invoice::STATUS_COMPLETED;
|
||||
$invoice->paid_status = Invoice::STATUS_PAID;
|
||||
} else {
|
||||
$invoice->status = $invoice->getPreviousStatus();
|
||||
$invoice->paid_status = Invoice::STATUS_PARTIALLY_PAID;
|
||||
}
|
||||
|
||||
@ -211,16 +212,7 @@ class PaymentController extends Controller
|
||||
$invoice->paid_status = Invoice::STATUS_PARTIALLY_PAID;
|
||||
}
|
||||
|
||||
if ($invoice->due_date < Carbon::now()) {
|
||||
$invoice->status = Invoice::STATUS_OVERDUE;
|
||||
} elseif ($invoice->viewed) {
|
||||
$invoice->status = Invoice::STATUS_VIEWED;
|
||||
} elseif ($invoice->sent) {
|
||||
$invoice->status = Invoice::STATUS_SENT;
|
||||
} else {
|
||||
$invoice->status = Invoice::STATUS_DRAFT;
|
||||
}
|
||||
|
||||
$invoice->status = $invoice->getPreviousStatus();
|
||||
$invoice->save();
|
||||
}
|
||||
|
||||
@ -246,16 +238,7 @@ class PaymentController extends Controller
|
||||
$invoice->paid_status = Invoice::STATUS_PARTIALLY_PAID;
|
||||
}
|
||||
|
||||
if ($invoice->due_date < Carbon::now()) {
|
||||
$invoice->status = Invoice::STATUS_OVERDUE;
|
||||
} elseif ($invoice->sent) {
|
||||
$invoice->status = Invoice::STATUS_SENT;
|
||||
} elseif ($invoice->viewed) {
|
||||
$invoice->status = Invoice::STATUS_VIEWED;
|
||||
} else {
|
||||
$invoice->status = Invoice::STATUS_DRAFT;
|
||||
}
|
||||
|
||||
$invoice->status = $invoice->getPreviousStatus();
|
||||
$invoice->save();
|
||||
}
|
||||
|
||||
|
||||
@ -26,8 +26,7 @@ class ReportController extends Controller
|
||||
$query->whereBetween(
|
||||
'invoice_date',
|
||||
[$start->format('Y-m-d'), $end->format('Y-m-d')]
|
||||
)
|
||||
->where('paid_status', Invoice::STATUS_PAID);
|
||||
);
|
||||
}])
|
||||
->customer()
|
||||
->whereCompany($company->id)
|
||||
|
||||
28
app/Http/Controllers/UpdateController.php
Normal file
28
app/Http/Controllers/UpdateController.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Laraspace\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Laraspace\Space\Updater;
|
||||
use Laraspace\Space\SiteApi;
|
||||
|
||||
class UpdateController extends Controller
|
||||
{
|
||||
public function update(Request $request)
|
||||
{
|
||||
set_time_limit(600); // 10 minutes
|
||||
|
||||
$json = Updater::update($request->installed, $request->version);
|
||||
|
||||
return response()->json($json);
|
||||
}
|
||||
|
||||
public function checkLatestVersion(Request $request)
|
||||
{
|
||||
set_time_limit(600); // 10 minutes
|
||||
|
||||
$json = Updater::checkForUpdate();
|
||||
|
||||
return response()->json($json);
|
||||
}
|
||||
}
|
||||
@ -26,12 +26,16 @@ class CustomerRequest extends FormRequest
|
||||
case 'POST':
|
||||
return [
|
||||
'name' => 'required',
|
||||
'addresses.*.address_street_1' => 'max:255',
|
||||
'addresses.*.address_street_2' => 'max:255',
|
||||
'email' => 'email|nullable|unique:users,email',
|
||||
];
|
||||
break;
|
||||
case 'PUT':
|
||||
return [
|
||||
'name' => 'required',
|
||||
'addresses.*.address_street_1' => 'max:255',
|
||||
'addresses.*.address_street_2' => 'max:255',
|
||||
];
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -27,13 +27,22 @@ class EstimatesRequest extends FormRequest
|
||||
'expiry_date' => 'required',
|
||||
'estimate_number' => 'required|unique:estimates,estimate_number',
|
||||
'user_id' => 'required',
|
||||
'discount' => 'required',
|
||||
'discount' => 'required|digits_between:1,20',
|
||||
'discount_val' => 'required|digits_between:1,20',
|
||||
'sub_total' => 'required|digits_between:1,20',
|
||||
'total' => 'required|digits_between:1,20',
|
||||
'tax' => 'required|digits_between:1,20',
|
||||
'estimate_template_id' => 'required',
|
||||
'items' => 'required|array',
|
||||
'items.*.description' => 'max:255',
|
||||
'items.*' => 'required|max:255',
|
||||
'items.*.name' => 'required',
|
||||
'items.*.quantity' => 'required|numeric',
|
||||
'items.*.price' => 'required|numeric',
|
||||
'items.*.quantity' => 'required|digits_between:1,20',
|
||||
'items.*.price' => 'required|digits_between:1,20',
|
||||
'items.*.discount' => 'digits_between:1,20',
|
||||
'items.*.discount_val' => 'digits_between:1,20',
|
||||
'items.*.tax' => 'digits_between:1,20',
|
||||
'items.*.total' => 'digits_between:1,20',
|
||||
];
|
||||
|
||||
if ($this->getMethod() == 'PUT') {
|
||||
|
||||
@ -25,7 +25,7 @@ class ExpenseRequest extends FormRequest
|
||||
return [
|
||||
'expense_date' => 'required',
|
||||
'expense_category_id' => 'required',
|
||||
'amount' => 'required'
|
||||
'amount' => 'required|digits_between:1,20'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,13 +27,22 @@ class InvoicesRequest extends FormRequest
|
||||
'due_date' => 'required',
|
||||
'invoice_number' => 'required|unique:invoices,invoice_number',
|
||||
'user_id' => 'required',
|
||||
'discount' => 'required',
|
||||
'discount' => 'required|digits_between:1,20',
|
||||
'discount_val' => 'required|digits_between:1,20',
|
||||
'sub_total' => 'required|digits_between:1,20',
|
||||
'total' => 'required|digits_between:1,20',
|
||||
'tax' => 'required|digits_between:1,20',
|
||||
'invoice_template_id' => 'required',
|
||||
'items' => 'required|array',
|
||||
'items.*' => 'required|max:255',
|
||||
'items.*.description' => 'max:255',
|
||||
'items.*.name' => 'required',
|
||||
'items.*.quantity' => 'required|numeric',
|
||||
'items.*.price' => 'required|numeric',
|
||||
'items.*.quantity' => 'required|digits_between:1,20',
|
||||
'items.*.price' => 'required|digits_between:1,20',
|
||||
'items.*.discount' => 'digits_between:1,20',
|
||||
'items.*.discount_val' => 'digits_between:1,20',
|
||||
'items.*.tax' => 'digits_between:1,20',
|
||||
'items.*.total' => 'digits_between:1,20',
|
||||
];
|
||||
|
||||
if ($this->getMethod() == 'PUT') {
|
||||
|
||||
@ -24,7 +24,7 @@ class ItemsRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'name' => 'required',
|
||||
'price' => 'required',
|
||||
'price' => 'required|digits_between:1,20',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ class PaymentRequest extends FormRequest
|
||||
'payment_date' => 'required',
|
||||
'payment_number' => 'required|unique:payments,payment_number',
|
||||
'user_id' => 'required',
|
||||
'amount' => 'required',
|
||||
'amount' => 'required|digits_between:1,20',
|
||||
];
|
||||
|
||||
if ($this->getMethod() == 'PUT') {
|
||||
|
||||
@ -31,6 +31,8 @@ class ProfileRequest extends FormRequest
|
||||
return [
|
||||
'name' => 'required',
|
||||
'password' => 'required',
|
||||
'address_street_1' => 'max:255',
|
||||
'address_street_2' => 'max:255',
|
||||
'email' => [
|
||||
'required',
|
||||
'email',
|
||||
@ -41,6 +43,8 @@ class ProfileRequest extends FormRequest
|
||||
case 'PUT':
|
||||
return [
|
||||
'name' => 'required',
|
||||
'address_street_1' => 'max:255',
|
||||
'address_street_2' => 'max:255',
|
||||
'email' => 'required|email'
|
||||
];
|
||||
break;
|
||||
|
||||
@ -113,6 +113,19 @@ class Invoice extends Model
|
||||
return $this->belongsTo(InvoiceTemplate::class);
|
||||
}
|
||||
|
||||
public function getPreviousStatus()
|
||||
{
|
||||
if ($this->due_date < Carbon::now()) {
|
||||
return self::STATUS_OVERDUE;
|
||||
} elseif ($this->viewed) {
|
||||
return self::STATUS_VIEWED;
|
||||
} elseif ($this->sent) {
|
||||
return self::STATUS_SENT;
|
||||
} else {
|
||||
return self::STATUS_DRAFT;
|
||||
}
|
||||
}
|
||||
|
||||
private function strposX($haystack, $needle, $number)
|
||||
{
|
||||
if ($number == '1') {
|
||||
|
||||
@ -60,7 +60,7 @@ class InvoiceItem extends Model
|
||||
$query->whereBetween(
|
||||
'invoice_date',
|
||||
[$start->format('Y-m-d'), $end->format('Y-m-d')]
|
||||
)->where('paid_status', Invoice::STATUS_PAID);
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
24
app/Listeners/Updates/Listener.php
Normal file
24
app/Listeners/Updates/Listener.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Laraspace\Listeners\Updates;
|
||||
|
||||
class Listener
|
||||
{
|
||||
const VERSION = '';
|
||||
|
||||
/**
|
||||
* Check if should listen.
|
||||
*
|
||||
* @param $event
|
||||
* @return boolean
|
||||
*/
|
||||
protected function check($event)
|
||||
{
|
||||
// Do not apply to the same or newer versions
|
||||
// if (version_compare($event->old, static::VERSION, '>=')) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
32
app/Listeners/Updates/V10/Version101.php
Normal file
32
app/Listeners/Updates/V10/Version101.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Laraspace\Listeners\Updates\V10;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Laraspace\Listeners\Updates\Listener;
|
||||
use Laraspace\Events\UpdateFinished;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Laraspace\Setting;
|
||||
|
||||
class Version101 extends Listener
|
||||
{
|
||||
const VERSION = '1.0.1';
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param object $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(UpdateFinished $event)
|
||||
{
|
||||
// if (!$this->check($event)) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
Artisan::call('db:seed', ['--class' => 'DemoSeeder', '--force' => true]);
|
||||
|
||||
Setting::getSetting('version', self::VERSION);
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,8 @@ namespace Laraspace\Providers;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Laraspace\Events\UpdateFinished;
|
||||
use Laraspace\Listeners\Updates\V10\Version101;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
@ -13,8 +15,8 @@ class EventServiceProvider extends ServiceProvider
|
||||
* @var array
|
||||
*/
|
||||
protected $listen = [
|
||||
'Laraspace\Events\SomeEvent' => [
|
||||
'Laraspace\Listeners\EventListener',
|
||||
UpdateFinished::class=> [
|
||||
Version101::class,
|
||||
],
|
||||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
|
||||
@ -49,12 +49,20 @@ class EnvironmentManager
|
||||
'DB_PASSWORD='.$request->database_password."\n\n";
|
||||
|
||||
if (! $this->checkDatabaseConnection($request)) {
|
||||
|
||||
return [
|
||||
'error' => 'connection_failed'
|
||||
];
|
||||
} else {
|
||||
if(count(DB::connection()->select('SHOW TABLES'))) {
|
||||
return [
|
||||
'error' => 'database_should_be_empty'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
file_put_contents($this->envPath, str_replace(
|
||||
$oldDatabaseData,
|
||||
$newDatabaseData,
|
||||
@ -101,7 +109,7 @@ class EnvironmentManager
|
||||
'MAIL_USERNAME='.$request->mail_username."\n".
|
||||
'MAIL_PASSWORD='.$request->mail_password."\n".
|
||||
'MAIL_ENCRYPTION='.$request->mail_encryption."\n\n";
|
||||
// dd($newMailData);
|
||||
|
||||
try {
|
||||
|
||||
file_put_contents($this->envPath, str_replace(
|
||||
|
||||
36
app/Space/SiteApi.php
Normal file
36
app/Space/SiteApi.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Laraspace\Space;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Laraspace\Setting;
|
||||
|
||||
trait SiteApi
|
||||
{
|
||||
|
||||
protected static function getRemote($url, $data = array())
|
||||
{
|
||||
$base = 'http://crater-main.test/';
|
||||
|
||||
$client = new Client(['verify' => false, 'base_uri' => $base]);
|
||||
|
||||
$headers['headers'] = array(
|
||||
'Accept' => 'application/json',
|
||||
'Referer' => url('/'),
|
||||
'crater' => Setting::getSetting('version')
|
||||
);
|
||||
|
||||
$data['http_errors'] = false;
|
||||
|
||||
$data = array_merge($data, $headers);
|
||||
|
||||
try {
|
||||
$result = $client->get($url, $data);
|
||||
} catch (RequestException $e) {
|
||||
$result = $e;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
110
app/Space/Updater.php
Normal file
110
app/Space/Updater.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
namespace Laraspace\Space;
|
||||
|
||||
use File;
|
||||
use ZipArchive;
|
||||
use Artisan;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Laraspace\Space\SiteApi;
|
||||
use Laraspace\Events\UpdateFinished;
|
||||
use Laraspace\Setting;
|
||||
|
||||
class Updater
|
||||
{
|
||||
use SiteApi;
|
||||
|
||||
public static function update($installed, $version)
|
||||
{
|
||||
$data = null;
|
||||
$path = null;
|
||||
|
||||
$url = '/download/'.$version;
|
||||
|
||||
$response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]);
|
||||
|
||||
// Exception
|
||||
if ($response instanceof RequestException) {
|
||||
return [
|
||||
'success' => false,
|
||||
'errors' => 'Download Exception',
|
||||
'data' => [
|
||||
'path' => $path
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
if ($response && ($response->getStatusCode() == 200)) {
|
||||
$data = $response->getBody()->getContents();
|
||||
}
|
||||
|
||||
// Create temp directory
|
||||
$path = 'temp-' . md5(mt_rand());
|
||||
$path2 = 'temp2-' . md5(mt_rand());
|
||||
$temp_path = storage_path('app/temp') . '/' . $path;
|
||||
$temp_path2 = storage_path('app/temp') . '/' . $path2;
|
||||
|
||||
if (!File::isDirectory($temp_path)) {
|
||||
File::makeDirectory($temp_path);
|
||||
File::makeDirectory($temp_path2);
|
||||
}
|
||||
|
||||
$file = $temp_path . '/upload.zip';
|
||||
|
||||
// Add content to the Zip file
|
||||
$uploaded = is_int(file_put_contents($file, $data)) ? true : false;
|
||||
|
||||
if (!$uploaded) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Unzip the file
|
||||
$zip = new ZipArchive();
|
||||
|
||||
if ($zip->open($file)) {
|
||||
$zip->extractTo($temp_path2);
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
|
||||
// Delete zip file
|
||||
File::delete($file);
|
||||
|
||||
if (!File::copyDirectory($temp_path2.'/crater', base_path())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Delete temp directory
|
||||
File::deleteDirectory($temp_path);
|
||||
File::deleteDirectory($temp_path2);
|
||||
|
||||
try {
|
||||
event(new UpdateFinished($installed, $version));
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
'errors' => false,
|
||||
'data' => []
|
||||
];
|
||||
} catch (\Exception $e) {
|
||||
return [
|
||||
'success' => false,
|
||||
'errors' => 'Update error',
|
||||
'data' => []
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkForUpdate()
|
||||
{
|
||||
$data = null;
|
||||
$url = '/check/latest/download/'.Setting::getSetting('version');
|
||||
|
||||
$response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]);
|
||||
|
||||
if ($response && ($response->getStatusCode() == 200)) {
|
||||
$data = $response->getBody()->getContents();
|
||||
}
|
||||
|
||||
return json_decode($data);
|
||||
}
|
||||
}
|
||||
@ -216,7 +216,7 @@ class User extends Authenticatable implements HasMedia
|
||||
$query->whereBetween(
|
||||
'invoice_date',
|
||||
[$start->format('Y-m-d'), $end->format('Y-m-d')]
|
||||
)->where('paid_status', Invoice::STATUS_PAID);
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
14
config/crater.php
Normal file
14
config/crater.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Crater Requirements
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'version' => '1.0.0',
|
||||
|
||||
];
|
||||
@ -18,7 +18,7 @@ class CreateItemsTable extends Migration
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('unit')->nullable();
|
||||
$table->integer('price');
|
||||
$table->unsignedBigInteger('price');
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
|
||||
@ -24,13 +24,13 @@ class CreateInvoicesTable extends Migration
|
||||
$table->string('tax_per_item');
|
||||
$table->string('discount_per_item');
|
||||
$table->text('notes')->nullable();
|
||||
$table->decimal('discount', 15, 0)->nullable();
|
||||
$table->string('discount_type')->nullable();
|
||||
$table->integer('discount_val')->nullable();
|
||||
$table->integer('sub_total');
|
||||
$table->integer('total');
|
||||
$table->integer('tax');
|
||||
$table->integer('due_amount');
|
||||
$table->unsignedBigInteger('discount')->nullable();
|
||||
$table->unsignedBigInteger('discount_val')->nullable();
|
||||
$table->unsignedBigInteger('sub_total');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->unsignedBigInteger('due_amount');
|
||||
$table->boolean('sent')->default(false);
|
||||
$table->boolean('viewed')->default(false);
|
||||
$table->string('unique_hash')->nullable();
|
||||
|
||||
@ -17,13 +17,13 @@ class CreateInvoiceItemsTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->integer('quantity');
|
||||
$table->integer('price');
|
||||
$table->string('discount_type');
|
||||
$table->integer('discount_val');
|
||||
$table->decimal('discount', 15, 0);
|
||||
$table->integer('tax');
|
||||
$table->integer('total');
|
||||
$table->unsignedBigInteger('quantity');
|
||||
$table->unsignedBigInteger('price');
|
||||
$table->unsignedBigInteger('discount_val');
|
||||
$table->unsignedBigInteger('discount');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->integer('invoice_id')->unsigned();
|
||||
$table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
|
||||
$table->integer('item_id')->unsigned()->nullable();
|
||||
|
||||
@ -23,12 +23,12 @@ class CreateEstimatesTable extends Migration
|
||||
$table->string('tax_per_item');
|
||||
$table->string('discount_per_item');
|
||||
$table->string('notes')->nullable();
|
||||
$table->decimal('discount', 15, 0)->nullable();
|
||||
$table->string('discount_type')->nullable();
|
||||
$table->integer('discount_val')->nullable();
|
||||
$table->integer('sub_total');
|
||||
$table->integer('total');
|
||||
$table->integer('tax');
|
||||
$table->unsignedBigInteger('discount')->nullable();
|
||||
$table->unsignedBigInteger('discount_val')->nullable();
|
||||
$table->unsignedBigInteger('sub_total');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->string('unique_hash')->nullable();
|
||||
$table->integer('user_id')->unsigned()->nullable();
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
|
||||
@ -17,13 +17,13 @@ class CreateEstimateItemsTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->integer('quantity');
|
||||
$table->string('discount_type');
|
||||
$table->decimal('discount', 15, 0);
|
||||
$table->integer('discount_val');
|
||||
$table->integer('price');
|
||||
$table->integer('tax');
|
||||
$table->integer('total');
|
||||
$table->unsignedBigInteger('quantity');
|
||||
$table->unsignedBigInteger('discount');
|
||||
$table->unsignedBigInteger('discount_val');
|
||||
$table->unsignedBigInteger('price');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->integer('item_id')->unsigned()->nullable();
|
||||
$table->foreign('item_id')->references('id')->on('items')->onDelete('cascade');
|
||||
$table->integer('estimate_id')->unsigned();
|
||||
|
||||
@ -17,7 +17,7 @@ class CreateExpensesTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->date('expense_date');
|
||||
$table->string('attachment_receipt')->nullable();
|
||||
$table->integer('amount');
|
||||
$table->unsignedBigInteger('amount');
|
||||
$table->string('notes')->nullable();
|
||||
$table->integer('expense_category_id')->unsigned();
|
||||
$table->foreign('expense_category_id')->references('id')->on('expense_categories')->onDelete('cascade');
|
||||
|
||||
@ -19,7 +19,7 @@ class CreatePaymentsTable extends Migration
|
||||
$table->string('payment_mode')->nullable();
|
||||
$table->date('payment_date');
|
||||
$table->text('notes')->nullable();
|
||||
$table->decimal('amount', 15, 0);
|
||||
$table->unsignedBigInteger('amount');
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->integer('invoice_id')->unsigned()->nullable();
|
||||
|
||||
@ -30,7 +30,7 @@ class CreateTaxesTable extends Migration
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies');
|
||||
$table->string('name');
|
||||
$table->decimal('amount', 15, 0);
|
||||
$table->unsignedBigInteger('amount');
|
||||
$table->decimal('percent', 5, 2);
|
||||
$table->tinyInteger('compound_tax')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
@ -13,19 +13,19 @@ class EstimateTemplateSeeder extends Seeder
|
||||
public function run()
|
||||
{
|
||||
EstimateTemplate::create([
|
||||
'name' => 'Estimate Template1',
|
||||
'name' => 'Template 1',
|
||||
'view' => 'estimate1',
|
||||
'path' => '/assets/img/PDF/Template1.png'
|
||||
]);
|
||||
|
||||
EstimateTemplate::create([
|
||||
'name' => 'Estimate Template2',
|
||||
'name' => 'Template 2',
|
||||
'view' => 'estimate2',
|
||||
'path' => '/assets/img/PDF/Template2.png'
|
||||
]);
|
||||
|
||||
EstimateTemplate::create([
|
||||
'name' => 'Estimate Template3',
|
||||
'name' => 'Template 3',
|
||||
'view' => 'estimate3',
|
||||
'path' => '/assets/img/PDF/Template3.png'
|
||||
]);
|
||||
|
||||
@ -13,19 +13,19 @@ class InvoiceTemplateSeeder extends Seeder
|
||||
public function run()
|
||||
{
|
||||
InvoiceTemplate::create([
|
||||
'name' => 'Invoice Template1',
|
||||
'name' => 'Template 1',
|
||||
'view' => 'invoice1',
|
||||
'path' => '/assets/img/PDF/Template1.png'
|
||||
]);
|
||||
|
||||
InvoiceTemplate::create([
|
||||
'name' => 'Invoice Template2',
|
||||
'name' => ' Template 2',
|
||||
'view' => 'invoice2',
|
||||
'path' => '/assets/img/PDF/Template2.png'
|
||||
]);
|
||||
|
||||
InvoiceTemplate::create([
|
||||
'name' => 'Invoice Template3',
|
||||
'name' => 'Template 3',
|
||||
'view' => 'invoice3',
|
||||
'path' => '/assets/img/PDF/Template3.png'
|
||||
]);
|
||||
|
||||
@ -1,9 +1,29 @@
|
||||
<template>
|
||||
<button :type="type" :class="btnClass" :disabled="disabled" @click="handleClick">
|
||||
<font-awesome-icon v-if="icon && !loading && !rightIcon" :class="iconClass" :icon="icon" class="vue-icon icon-left" />
|
||||
<font-awesome-icon v-if="loading" :class="iconClass" icon="spinner" class="fa-spin"/>
|
||||
<button
|
||||
:type="type"
|
||||
:class="btnClass"
|
||||
:disabled="disabled || loading"
|
||||
@click="handleClick"
|
||||
>
|
||||
<font-awesome-icon
|
||||
v-if="icon && !loading && !rightIcon"
|
||||
:class="iconClass"
|
||||
:icon="icon"
|
||||
class="vue-icon icon-left"
|
||||
/>
|
||||
<font-awesome-icon
|
||||
v-if="loading"
|
||||
:class="iconClass"
|
||||
icon="spinner"
|
||||
class="fa-spin"
|
||||
/>
|
||||
<slot />
|
||||
<font-awesome-icon v-if="icon && !loading && rightIcon" :class="iconClass" :icon="icon" class="vue-icon icon-right" />
|
||||
<font-awesome-icon
|
||||
v-if="icon && !loading && rightIcon"
|
||||
:class="iconClass"
|
||||
:icon="icon"
|
||||
class="vue-icon icon-right"
|
||||
/>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<input
|
||||
ref="baseInput"
|
||||
v-model="inputValue"
|
||||
:type="type"
|
||||
:type="toggleType"
|
||||
:disabled="disabled"
|
||||
:readonly="readOnly"
|
||||
:name="name"
|
||||
@ -19,6 +19,9 @@
|
||||
@keydown="handleKeyDownEnter"
|
||||
@blur="handleFocusOut"
|
||||
>
|
||||
<div v-if="showPassword && isAlignLeftIcon" style="cursor: pointer" @click="showPass = !showPass" >
|
||||
<font-awesome-icon :icon="!showPass ?'eye-slash': 'eye'" class="right-icon" />
|
||||
</div>
|
||||
<font-awesome-icon v-if="icon && !isAlignLeftIcon" :icon="icon" class="right-icon" />
|
||||
</div>
|
||||
</template>
|
||||
@ -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: {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<form action="" @submit.prevent="submitCategoryData">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('expenses.category') }}<span class="required text-danger">*</span></label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('expenses.category') }}<span class="required text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
ref="name"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<tab id="basic-home" :name="$t('customers.basic_info')">
|
||||
<div class="basic-info">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.display_name') }} <span class="required">*</span></label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.display_name') }} <span class="required">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
ref="name"
|
||||
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.primary_display_name') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.primary_display_name') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
v-model="formData.contact_name"
|
||||
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('login.email') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('login.email') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
:invalid="$v.formData.email.$error"
|
||||
@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $tc('settings.currencies.currency') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $tc('settings.currencies.currency') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-select
|
||||
v-model="currency"
|
||||
@ -64,7 +64,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.phone') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.phone') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
:invalid="$v.formData.phone.$error"
|
||||
@ -79,7 +79,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.website') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.website') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
v-model="formData.website"
|
||||
@ -100,7 +100,7 @@
|
||||
<tab id="basic-profile" :name="$t('customers.billing_address')">
|
||||
<div class="basic-info">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.name') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.name') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
v-model="billing.name"
|
||||
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.phone') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.phone') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
:invalid="$v.billing.phone.$error"
|
||||
@ -126,7 +126,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.address') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.address') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-text-area
|
||||
v-model="billing.address_street_1"
|
||||
@ -155,7 +155,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.country') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.country') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-select
|
||||
v-model="billingCountry"
|
||||
@ -171,7 +171,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.state') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.state') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-select
|
||||
v-model="billingState"
|
||||
@ -187,7 +187,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.city') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.city') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-select
|
||||
v-model="billingCity"
|
||||
@ -213,7 +213,7 @@
|
||||
</div> -->
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.zip_code') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.zip_code') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
v-model="billing.zip"
|
||||
@ -236,7 +236,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.name') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.name') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
v-model="shipping.name"
|
||||
@ -246,7 +246,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.phone') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.phone') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
:invalid="$v.shipping.phone.$error"
|
||||
@ -262,7 +262,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.address') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.address') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-text-area
|
||||
v-model="shipping.address_street_1"
|
||||
@ -291,7 +291,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.country') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.country') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-select
|
||||
v-model="shippingCountry"
|
||||
@ -307,7 +307,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.state') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.state') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-select
|
||||
v-model="shippingState"
|
||||
@ -323,7 +323,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.city') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.city') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-select
|
||||
v-model="shippingCity"
|
||||
@ -339,7 +339,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('customers.zip_code') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('customers.zip_code') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-input
|
||||
v-model="shipping.zip"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<form action="" @submit.prevent="submitItemData">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">
|
||||
<label class="col-sm-4 col-form-label input-label">
|
||||
{{ $t('items.name') }}<span class="required">*</span>
|
||||
</label>
|
||||
<div class="col-sm-7">
|
||||
@ -22,7 +22,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('items.price') }}<span class="required">*</span></label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('items.price') }}<span class="required">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<div class="base-input">
|
||||
<money
|
||||
@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('items.unit') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('items.unit') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-select
|
||||
v-model="formData.unit"
|
||||
@ -54,7 +54,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('items.description') }}</label>
|
||||
<label class="col-sm-4 col-form-label input-label">{{ $t('items.description') }}</label>
|
||||
<div class="col-sm-7">
|
||||
<base-text-area
|
||||
v-model="formData.description"
|
||||
@ -121,7 +121,8 @@ export default {
|
||||
{ name: 'kg', value: 'kg' },
|
||||
{ name: 'km', value: 'km' },
|
||||
{ name: 'lb', value: 'lb' },
|
||||
{ name: 'mg', value: 'mg' }
|
||||
{ name: 'mg', value: 'mg' },
|
||||
{ name: 'pc', value: 'pc' }
|
||||
],
|
||||
formData: {
|
||||
name: null,
|
||||
|
||||
@ -611,8 +611,6 @@ export default {
|
||||
estimate_viewed_desc: 'When your customer views the estimate sent via crater dashboard.',
|
||||
save: 'Save',
|
||||
email_save_message: 'Email saved successfully',
|
||||
// invoice_viewed_message: 'Invoice viewed updated successfully',
|
||||
// estimate_viewed_message: 'Estimate viewed updated successfully',
|
||||
please_enter_email: 'Please Enter Email'
|
||||
},
|
||||
tax_types: {
|
||||
@ -622,7 +620,6 @@ export default {
|
||||
add_new_tax: 'Add New Tax',
|
||||
tax_settings: 'Tax Settings',
|
||||
tax_per_item: 'Tax Per Item',
|
||||
// tax_per_item_switch: 'Tax Per Item updated successfully',
|
||||
tax_name: 'Tax Name',
|
||||
compound_tax: 'Compound Tax',
|
||||
percent: 'Percent',
|
||||
@ -660,7 +657,6 @@ export default {
|
||||
preference: 'Preference | Preferences',
|
||||
general_settings: 'Default preferences for the system.',
|
||||
updated_message: 'Preferences updated successfully',
|
||||
// set_discount_per_item_message: 'Discount set per item updated successfully',
|
||||
select_language: 'select language',
|
||||
select_time_zone: 'select Time Zone',
|
||||
select_date_formate: 'select Date Formate',
|
||||
@ -740,7 +736,8 @@ export default {
|
||||
migrate_failed: 'Migrate Failed',
|
||||
database_variables_save_error: 'Unable to connect to the DB with Provided Values.',
|
||||
mail_variables_save_error: 'Email configuration failed.',
|
||||
connection_failed: 'Database Connection Failed'
|
||||
connection_failed: 'Database connection failed',
|
||||
database_should_be_empty: 'Database should be empty'
|
||||
},
|
||||
success: {
|
||||
mail_variables_save_successfully: 'Email configured successfully',
|
||||
|
||||
@ -529,7 +529,8 @@ export default {
|
||||
preferences: 'Preferencias',
|
||||
notifications: 'Notificaciones',
|
||||
tax_types: 'Tipos de impuestos',
|
||||
expense_category: 'Categorías de gastos'
|
||||
expense_category: 'Categorías de gastos',
|
||||
update_app: 'Actualizar aplicación'
|
||||
},
|
||||
title: 'Configuraciones',
|
||||
setting: 'Configuraciones | Configuraciones',
|
||||
@ -661,6 +662,11 @@ export default {
|
||||
select_time_zone: 'selecciona la zona horaria',
|
||||
select_date_formate: 'seleccione formato de fecha',
|
||||
select_financial_year: 'seleccione año financiero'
|
||||
},
|
||||
update_app: {
|
||||
title: 'Actualizar aplicación',
|
||||
description: 'actualizar la descripción de la aplicación',
|
||||
update: 'Actualizar'
|
||||
}
|
||||
},
|
||||
wizard: {
|
||||
|
||||
@ -529,7 +529,8 @@ export default {
|
||||
preferences: 'Préférences',
|
||||
notifications: 'Les notifications',
|
||||
tax_types: 'Types de taxe',
|
||||
expense_category: 'Catégories de dépenses'
|
||||
expense_category: 'Catégories de dépenses',
|
||||
update_app: "Mise à jour de l'application"
|
||||
},
|
||||
title: 'Paramètres',
|
||||
setting: 'Paramètres | Paramètres',
|
||||
@ -664,6 +665,11 @@ export default {
|
||||
select_time_zone: 'sélectionnez le fuseau horaire',
|
||||
select_date_formate: 'sélectionnez Date Formate',
|
||||
select_financial_year: 'sélectionner lexercice'
|
||||
},
|
||||
update_app: {
|
||||
title: "Mise à jour de l'application",
|
||||
description: "mettre à jour la description de l'application",
|
||||
update: 'Mise à jour'
|
||||
}
|
||||
},
|
||||
wizard: {
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
>
|
||||
<table-column :label="$t('dashboard.recent_invoices_card.due_on')" show="formattedDueDate" />
|
||||
<table-column :label="$t('dashboard.recent_invoices_card.customer')" show="user.name" />
|
||||
<table-column :label="$t('dashboard.recent_invoices_card.amount_due')" sort-as="due_amount">
|
||||
<table-column :label="$t('dashboard.recent_invoices_card.amount_due')" show="due_amount" sort-as="due_amount">
|
||||
<template slot-scope="row">
|
||||
<span>{{ $t('dashboard.recent_invoices_card.amount_due') }}</span>
|
||||
<div v-html="$utils.formatMoney(row.due_amount, row.user.currency)"/>
|
||||
@ -242,7 +242,7 @@
|
||||
>
|
||||
<table-column :label="$t('dashboard.recent_estimate_card.date')" show="formattedExpiryDate" />
|
||||
<table-column :label="$t('dashboard.recent_estimate_card.customer')" show="user.name" />
|
||||
<table-column :label="$t('dashboard.recent_estimate_card.amount_due')" sort-as="total">
|
||||
<table-column :label="$t('dashboard.recent_estimate_card.amount_due')" show="total" sort-as="total">
|
||||
<template slot-scope="row">
|
||||
<span>{{ $t('dashboard.recent_estimate_card.amount_due') }}</span>
|
||||
<div v-html="$utils.formatMoney(row.total, row.user.currency)"/>
|
||||
|
||||
@ -553,6 +553,8 @@ export default {
|
||||
if (response.data) {
|
||||
this.selectCustomer(response.data.estimate.user_id)
|
||||
this.newEstimate = response.data.estimate
|
||||
this.newEstimate.estimate_date = moment(response.data.estimate.estimate_date, 'YYYY-MM-DD').toString()
|
||||
this.newEstimate.expiry_date = moment(response.data.estimate.expiry_date, 'YYYY-MM-DD').toString()
|
||||
this.discountPerItem = response.data.discount_per_item
|
||||
this.taxPerItem = response.data.tax_per_item
|
||||
this.selectedCurrency = this.defaultCurrency
|
||||
|
||||
@ -554,6 +554,8 @@ export default {
|
||||
if (response.data) {
|
||||
this.selectCustomer(response.data.invoice.user_id)
|
||||
this.newInvoice = response.data.invoice
|
||||
this.newInvoice.invoice_date = moment(response.data.invoice.invoice_date, 'YYYY-MM-DD').toString()
|
||||
this.newInvoice.due_date = moment(response.data.invoice.due_date, 'YYYY-MM-DD').toString()
|
||||
this.discountPerItem = response.data.discount_per_item
|
||||
this.taxPerItem = response.data.tax_per_item
|
||||
this.selectedCurrency = this.defaultCurrency
|
||||
|
||||
@ -112,7 +112,8 @@ export default {
|
||||
{ name: 'kg', value: 'kg' },
|
||||
{ name: 'km', value: 'km' },
|
||||
{ name: 'lb', value: 'lb' },
|
||||
{ name: 'mg', value: 'mg' }
|
||||
{ name: 'mg', value: 'mg' },
|
||||
{ name: 'pc', value: 'pc' }
|
||||
],
|
||||
formData: {
|
||||
name: '',
|
||||
|
||||
@ -245,7 +245,8 @@ export default {
|
||||
{ name: 'kg', value: 'kg' },
|
||||
{ name: 'km', value: 'km' },
|
||||
{ name: 'lb', value: 'lb' },
|
||||
{ name: 'mg', value: 'mg' }
|
||||
{ name: 'mg', value: 'mg' },
|
||||
{ name: 'pc', value: 'pc' }
|
||||
],
|
||||
isRequestOngoing: true,
|
||||
filtersApplied: false,
|
||||
|
||||
@ -66,8 +66,9 @@
|
||||
<base-input
|
||||
:invalid="$v.mailConfigData.mail_password.$error"
|
||||
v-model.trim="mailConfigData.mail_password"
|
||||
type="mail_password"
|
||||
type="password"
|
||||
name="name"
|
||||
show-password
|
||||
@input="$v.mailConfigData.mail_password.$touch()"
|
||||
/>
|
||||
<div v-if="$v.mailConfigData.mail_password.$error">
|
||||
@ -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 {
|
||||
|
||||
@ -97,7 +97,6 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">{{ $t('wizard.database.password') }}</label>
|
||||
<span class="text-danger"> *</span>
|
||||
<base-input
|
||||
v-model.trim="databaseData.database_password"
|
||||
type="password"
|
||||
@ -154,7 +153,7 @@ export default {
|
||||
database_name: null,
|
||||
database_username: null,
|
||||
database_password: null,
|
||||
app_url: null
|
||||
app_url: window.location.origin
|
||||
},
|
||||
loading: false,
|
||||
connections: [
|
||||
@ -207,8 +206,8 @@ export default {
|
||||
}
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
window.toastr['error']('Something went wrong')
|
||||
console.log(e.response)
|
||||
window.toastr['error'](e.response.data.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,8 @@
|
||||
<base-input
|
||||
:invalid="$v.mailConfigData.mail_password.$error"
|
||||
v-model.trim="mailConfigData.mail_password"
|
||||
type="mail_password"
|
||||
type="password"
|
||||
show-password
|
||||
name="name"
|
||||
@input="$v.mailConfigData.mail_password.$touch()"
|
||||
/>
|
||||
|
||||
@ -67,8 +67,8 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
tab: 'step_1',
|
||||
step: 1
|
||||
tab: 'step_3',
|
||||
step: 3
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<base-button
|
||||
v-if="requirements"
|
||||
v-if="hasNext"
|
||||
:loading="loading"
|
||||
class="pull-right mt-4"
|
||||
icon="arrow-right"
|
||||
@ -46,7 +46,7 @@
|
||||
{{ $t('wizard.continue') }}
|
||||
</base-button>
|
||||
<base-button
|
||||
v-else
|
||||
v-if="!requirements"
|
||||
:loading="loading"
|
||||
class="pull-right mt-4"
|
||||
color="theme"
|
||||
@ -74,6 +74,20 @@ export default {
|
||||
isShow: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hasNext () {
|
||||
if (this.requirements) {
|
||||
let isRequired = true
|
||||
for (const key in this.requirements) {
|
||||
if (!this.requirements[key]) {
|
||||
isRequired = false
|
||||
}
|
||||
}
|
||||
return this.requirements && this.phpSupportInfo.supported && isRequired
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
listToggle () {
|
||||
this.isShow = !this.isShow
|
||||
|
||||
@ -51,6 +51,7 @@ import {
|
||||
faEllipsisH,
|
||||
faCopy,
|
||||
faPaperPlane,
|
||||
faEyeSlash,
|
||||
faSyncAlt
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { far } from '@fortawesome/free-regular-svg-icons'
|
||||
@ -109,6 +110,7 @@ library.add(
|
||||
faFilePdf,
|
||||
faEnvelope,
|
||||
faEye,
|
||||
faEyeSlash,
|
||||
faShare,
|
||||
faEllipsisH,
|
||||
faCopy,
|
||||
|
||||
@ -19,3 +19,19 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media(max-width: $x-small-breakpoint ) {
|
||||
|
||||
.base-modal {
|
||||
|
||||
.category-modal {
|
||||
|
||||
.input-label {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -34,3 +34,20 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@media(max-width: $x-small-breakpoint ) {
|
||||
|
||||
.base-modal {
|
||||
|
||||
.customer-modal {
|
||||
|
||||
.input-label {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
17
resources/assets/sass/components/item-modal.scss
vendored
17
resources/assets/sass/components/item-modal.scss
vendored
@ -19,3 +19,20 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@media(max-width: $x-small-breakpoint ) {
|
||||
|
||||
.base-modal {
|
||||
|
||||
.item-modal {
|
||||
|
||||
.input-label {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -58,6 +58,7 @@
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex:1;
|
||||
flex-direction: column;
|
||||
|
||||
label {
|
||||
@ -445,6 +446,9 @@
|
||||
.estimate-amount {
|
||||
font-size: 18px;
|
||||
color: #55547A;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.total {
|
||||
@ -491,7 +495,6 @@
|
||||
font-weight: 300;
|
||||
font-size: 12px;
|
||||
padding-top: 2px;
|
||||
padding-left: 10px;
|
||||
|
||||
textarea {
|
||||
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
|
||||
label {
|
||||
@ -445,6 +446,9 @@
|
||||
.invoice-amount {
|
||||
font-size: 18px;
|
||||
color: #55547A;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.total {
|
||||
|
||||
@ -263,7 +263,7 @@
|
||||
}
|
||||
|
||||
tr.main-table-header th {
|
||||
border-bottom: 1px solid #EAF1FB;
|
||||
border-bottom: 0.620315px solid #E8E8E8;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
|
||||
@ -264,7 +264,7 @@
|
||||
}
|
||||
|
||||
tr.main-table-header th {
|
||||
border-bottom: 1px solid #EAF1FB;
|
||||
border-bottom: 0.620315px solid #E8E8E8;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
<div class="notes">
|
||||
<div class="notes-label">
|
||||
Notes
|
||||
@if ($estimate->notes != '' && $estimate->notes != null)
|
||||
<div class="notes">
|
||||
<div class="notes-label">
|
||||
Notes
|
||||
</div>
|
||||
{{$estimate->notes}}
|
||||
</div>
|
||||
{{$estimate->notes}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@ -1,27 +1,32 @@
|
||||
<table width="100%" class="table2" cellspacing="0" border="0">
|
||||
<tr class="main-table-header">
|
||||
<th class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">#</th>
|
||||
@if($estimate->discount_per_item === 'NO')
|
||||
<th width="80%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th>
|
||||
@else
|
||||
<th width="40%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th>
|
||||
@endif
|
||||
<th width="17%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">Quantity</th>
|
||||
<th width="18%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 40px">Price</th>
|
||||
<th width="18%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 40px">Price</th>
|
||||
@if($estimate->discount_per_item === 'YES')
|
||||
<th width="10%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 10px">Discount</th>
|
||||
<th width="10%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-left: 10px">Discount</th>
|
||||
@endif
|
||||
<th width="15%" class="ItemTableHeader" style="text-align: right; color: #55547A;">Amount</th>
|
||||
</tr>
|
||||
@php
|
||||
$index = 1
|
||||
@endphp
|
||||
@foreach ($estimate->items as $item)
|
||||
<tr class="item-details">
|
||||
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px; vertical-align: top;">{{$index}}</td>
|
||||
<td class="inv-item items" style="text-align: left; color: #040405;padding-left: 0px">
|
||||
<span>{{ $item->name }}</span><br>
|
||||
<span style="text-align: left; color: #595959; font-size: 9px; font-weight:300; line-height: 12px;">{{ $item->description }}</span>
|
||||
</td>
|
||||
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px">{{$item->quantity}}</td>
|
||||
<td class="inv-item items" style="text-align: left; color: #040405; padding-left: 40px">{{$item->price/100}}</td>
|
||||
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 40px">{{$item->price/100}}</td>
|
||||
@if($estimate->discount_per_item === 'YES')
|
||||
<td class="inv-item items" style="text-align: left; color: #040405; padding-left: 10px">
|
||||
<td class="inv-item items" style="text-align: right; color: #040405; padding-left: 10px">
|
||||
@if($item->discount_type === 'fixed')
|
||||
{{$item->discount_val/100}}
|
||||
@endif
|
||||
@ -30,12 +35,15 @@
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
<td class="inv-item items" style="text-align: right; color: #040405">{{$item->total/100}}</td>
|
||||
<td class="inv-item items" style="text-align: right; color: #040405;">{{$item->total/100}}</td>
|
||||
</tr>
|
||||
@php
|
||||
$index += 1
|
||||
@endphp
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<table width="100%" style="margin-left:420px" cellspacing="0px" border="0" class="table3">
|
||||
<table width="100%" cellspacing="0px" style="margin-left:420px" border="0" class="table3 @if(count($estimate->items) > 12) page-break @endif">
|
||||
<tr>
|
||||
<td class="no-borde" style="color: #55547A; padding-left:10px; font-size:12px;">Subtotal</td>
|
||||
<td class="no-border items"
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
html {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
table {
|
||||
@ -35,7 +36,7 @@
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
top: -50px;
|
||||
}
|
||||
|
||||
.header-logo {
|
||||
@ -71,7 +72,7 @@
|
||||
|
||||
.wrapper {
|
||||
display: block;
|
||||
padding-top: 60px;
|
||||
padding-top: 16px;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
|
||||
@ -251,6 +252,7 @@
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
|
||||
.table2 hr {
|
||||
height:0.1px;
|
||||
}
|
||||
@ -263,7 +265,7 @@
|
||||
}
|
||||
|
||||
tr.main-table-header th {
|
||||
border-bottom: 1px solid #EAF1FB;
|
||||
border-bottom: 0.620315px solid #E8E8E8;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
@ -380,8 +382,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr class="header-line" style="border: 0.620315px solid #E8E8E8;"/>
|
||||
</div>
|
||||
<hr class="header-line" />
|
||||
<div class="wrapper">
|
||||
<div class="address">
|
||||
<div class="company">
|
||||
|
||||
@ -264,7 +264,7 @@
|
||||
}
|
||||
|
||||
tr.main-table-header th {
|
||||
border-bottom: 1px solid #EAF1FB;
|
||||
border-bottom: 0.620315px solid #E8E8E8;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
<div class="notes">
|
||||
<div class="notes-label">
|
||||
Notes
|
||||
@if ($invoice->notes != '' && $invoice->notes != null)
|
||||
<div class="notes">
|
||||
<div class="notes-label">
|
||||
Notes
|
||||
</div>
|
||||
{{$invoice->notes}}
|
||||
</div>
|
||||
{{$invoice->notes}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@ -1,27 +1,32 @@
|
||||
<table width="100%" class="table2" cellspacing="0" border="0">
|
||||
<tr class="main-table-header">
|
||||
<th class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">#</th>
|
||||
@if($invoice->discount_per_item === 'NO')
|
||||
<th width="80%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th>
|
||||
@else
|
||||
<th width="40%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th>
|
||||
@endif
|
||||
<th width="17%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">Quantity</th>
|
||||
<th width="18%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 40px">Price</th>
|
||||
<th width="18%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 40px">Price</th>
|
||||
@if($invoice->discount_per_item === 'YES')
|
||||
<th width="10%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 10px">Discount</th>
|
||||
<th width="10%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-left: 10px">Discount</th>
|
||||
@endif
|
||||
<th width="15%" class="ItemTableHeader" style="text-align: right; color: #55547A;">Amount</th>
|
||||
</tr>
|
||||
@php
|
||||
$index = 1
|
||||
@endphp
|
||||
@foreach ($invoice->items as $item)
|
||||
<tr class="item-details">
|
||||
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px; vertical-align: top;">{{$index}}</td>
|
||||
<td class="inv-item items" style="text-align: left; color: #040405;padding-left: 0px">
|
||||
<span>{{ $item->name }}</span><br>
|
||||
<span style="text-align: left; color: #595959; font-size: 9px; font-weight:300; line-height: 12px;">{{ $item->description }}</span>
|
||||
</td>
|
||||
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px">{{$item->quantity}}</td>
|
||||
<td class="inv-item items" style="text-align: left; color: #040405; padding-left: 40px">{{$item->price/100}}</td>
|
||||
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 40px">{{$item->price/100}}</td>
|
||||
@if($invoice->discount_per_item === 'YES')
|
||||
<td class="inv-item items" style="text-align: left; color: #040405; padding-left: 10px">
|
||||
<td class="inv-item items" style="text-align: right; color: #040405; padding-left: 10px">
|
||||
@if($item->discount_type === 'fixed')
|
||||
{{$item->discount_val/100}}
|
||||
@endif
|
||||
@ -30,8 +35,11 @@
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
<td class="inv-item items" style="text-align: right; color: #040405">{{$item->total/100}}</td>
|
||||
<td class="inv-item items" style="text-align: right; color: #040405;">{{$item->total/100}}</td>
|
||||
</tr>
|
||||
@php
|
||||
$index += 1
|
||||
@endphp
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
|
||||
@ -106,6 +106,8 @@ Route::group(['middleware' => 'redirect-if-installed'], function () {
|
||||
'uses' => 'OnboardingController@companySettings'
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
// App version
|
||||
// ----------------------------------
|
||||
|
||||
@ -120,6 +122,18 @@ Route::group(['middleware' => 'api'], function () {
|
||||
'middleware' => 'admin'
|
||||
], function () {
|
||||
|
||||
// Auto update routes
|
||||
//----------------------------------
|
||||
Route::post('/update', [
|
||||
'as' => 'auto.update',
|
||||
'uses' => 'UpdateController@update'
|
||||
]);
|
||||
|
||||
Route::get('/check/update', [
|
||||
'as' => 'check.update',
|
||||
'uses' => 'UpdateController@checkLatestVersion'
|
||||
]);
|
||||
|
||||
Route::get('/bootstrap', [
|
||||
'as' => 'bootstrap',
|
||||
'uses' => 'UsersController@getBootstrap'
|
||||
@ -323,6 +337,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'
|
||||
]);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user