mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
commit
630a6884dd
@ -1 +1 @@
|
||||
5.1.14
|
||||
5.1.16
|
@ -103,7 +103,7 @@ class CheckData extends Command
|
||||
if ($errorEmail) {
|
||||
Mail::raw($this->log, function ($message) use ($errorEmail, $database) {
|
||||
$message->to($errorEmail)
|
||||
->from(config('ninja.error_email'))
|
||||
->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->subject('Check-Data: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE)." [{$database}]");
|
||||
});
|
||||
} elseif (! $this->isValid) {
|
||||
|
163
app/Console/Commands/CreateAccount.php
Normal file
163
app/Console/Commands/CreateAccount.php
Normal file
@ -0,0 +1,163 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\DataMapper\CompanySettings;
|
||||
use App\DataMapper\FeesAndLimits;
|
||||
use App\Events\Invoice\InvoiceWasCreated;
|
||||
use App\Factory\InvoiceFactory;
|
||||
use App\Factory\InvoiceItemFactory;
|
||||
use App\Helpers\Invoice\InvoiceSum;
|
||||
use App\Jobs\Company\CreateCompanyPaymentTerms;
|
||||
use App\Jobs\Company\CreateCompanyTaskStatuses;
|
||||
use App\Jobs\Util\VersionCheck;
|
||||
use App\Models\Account;
|
||||
use App\Models\Client;
|
||||
use App\Models\ClientContact;
|
||||
use App\Models\Company;
|
||||
use App\Models\CompanyGateway;
|
||||
use App\Models\CompanyToken;
|
||||
use App\Models\Country;
|
||||
use App\Models\Credit;
|
||||
use App\Models\Expense;
|
||||
use App\Models\Product;
|
||||
use App\Models\Project;
|
||||
use App\Models\Quote;
|
||||
use App\Models\Task;
|
||||
use App\Models\User;
|
||||
use App\Models\Vendor;
|
||||
use App\Models\VendorContact;
|
||||
use App\Repositories\InvoiceRepository;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Traits\GeneratesCounter;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Carbon\Carbon;
|
||||
use Faker\Factory;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class CreateAccount extends Command
|
||||
{
|
||||
use MakesHash, GeneratesCounter;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Create Single Account';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'ninja:create-account {--email=} {--password=}';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @param InvoiceRepository $invoice_repo
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info(date('r').' Create Single Account...');
|
||||
|
||||
$this->warmCache();
|
||||
|
||||
$this->createAccount();
|
||||
|
||||
}
|
||||
|
||||
private function createAccount()
|
||||
{
|
||||
|
||||
$account = Account::factory()->create();
|
||||
$company = Company::factory()->create([
|
||||
'account_id' => $account->id,
|
||||
]);
|
||||
|
||||
$account->default_company_id = $company->id;
|
||||
$account->save();
|
||||
|
||||
$email = $this->option('email') ?? 'admin@example.com';
|
||||
$password = $this->option('password') ?? 'changeme!';
|
||||
|
||||
$user = User::factory()->create([
|
||||
'account_id' => $account->id,
|
||||
'email' => $email,
|
||||
'password' => Hash::make($password),
|
||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||
'email_verified_at' => now(),
|
||||
]);
|
||||
|
||||
$company_token = new CompanyToken;
|
||||
$company_token->user_id = $user->id;
|
||||
$company_token->company_id = $company->id;
|
||||
$company_token->account_id = $account->id;
|
||||
$company_token->name = 'User Token';
|
||||
$company_token->token = Str::random(64);
|
||||
$company_token->is_system = true;
|
||||
|
||||
$company_token->save();
|
||||
|
||||
$user->companies()->attach($company->id, [
|
||||
'account_id' => $account->id,
|
||||
'is_owner' => 1,
|
||||
'is_admin' => 1,
|
||||
'is_locked' => 0,
|
||||
'notifications' => CompanySettings::notificationDefaults(),
|
||||
'settings' => null,
|
||||
]);
|
||||
|
||||
CreateCompanyPaymentTerms::dispatchNow($company, $user);
|
||||
CreateCompanyTaskStatuses::dispatchNow($company, $user);
|
||||
VersionCheck::dispatchNow();
|
||||
|
||||
}
|
||||
|
||||
private function warmCache()
|
||||
{
|
||||
/* Warm up the cache !*/
|
||||
$cached_tables = config('ninja.cached_tables');
|
||||
|
||||
foreach ($cached_tables as $name => $class) {
|
||||
if (! Cache::has($name)) {
|
||||
// check that the table exists in case the migration is pending
|
||||
if (! Schema::hasTable((new $class())->getTable())) {
|
||||
continue;
|
||||
}
|
||||
if ($name == 'payment_terms') {
|
||||
$orderBy = 'num_days';
|
||||
} elseif ($name == 'fonts') {
|
||||
$orderBy = 'sort_order';
|
||||
} elseif (in_array($name, ['currencies', 'industries', 'languages', 'countries', 'banks'])) {
|
||||
$orderBy = 'name';
|
||||
} else {
|
||||
$orderBy = 'id';
|
||||
}
|
||||
$tableData = $class::orderBy($orderBy)->get();
|
||||
if ($tableData->count()) {
|
||||
Cache::forever($name, $tableData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -35,6 +35,7 @@ class CompanyFactory
|
||||
$company->custom_fields = (object) [];
|
||||
$company->subdomain = '';
|
||||
$company->enabled_modules = config('ninja.enabled_modules'); //32767;//8191; //4095
|
||||
$company->default_password_timeout = 30;
|
||||
|
||||
return $company;
|
||||
}
|
||||
|
@ -504,4 +504,18 @@ class BaseController extends Controller
|
||||
|
||||
return redirect('/setup');
|
||||
}
|
||||
|
||||
public function checkFeature($feature)
|
||||
{
|
||||
|
||||
if(auth()->user()->account->hasFeature($feature))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function featureFailure()
|
||||
{
|
||||
return response()->json(['message' => 'Upgrade to a paid plan for this feature.'], 403);
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use App\Http\Requests\Client\UpdateClientRequest;
|
||||
use App\Http\Requests\Client\UploadClientRequest;
|
||||
use App\Jobs\Client\StoreClient;
|
||||
use App\Jobs\Client\UpdateClient;
|
||||
use App\Models\Account;
|
||||
use App\Models\Client;
|
||||
use App\Repositories\ClientRepository;
|
||||
use App\Transformers\ClientTransformer;
|
||||
@ -574,6 +575,9 @@ class ClientController extends BaseController
|
||||
public function upload(UploadClientRequest $request, Client $client)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $client);
|
||||
|
||||
|
@ -26,6 +26,7 @@ use App\Jobs\Company\CreateCompanyPaymentTerms;
|
||||
use App\Jobs\Company\CreateCompanyTaskStatuses;
|
||||
use App\Jobs\Company\CreateCompanyToken;
|
||||
use App\Jobs\Ninja\RefundCancelledAccount;
|
||||
use App\Models\Account;
|
||||
use App\Models\Company;
|
||||
use App\Models\CompanyUser;
|
||||
use App\Repositories\CompanyRepository;
|
||||
@ -559,6 +560,9 @@ class CompanyController extends BaseController
|
||||
public function upload(UploadCompanyRequest $request, Company $company)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $company);
|
||||
|
||||
|
@ -14,6 +14,7 @@ namespace App\Http\Controllers;
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Libraries\OAuth\Providers\Google;
|
||||
use Illuminate\Http\Request;
|
||||
use Google_Client;
|
||||
|
||||
class ConnectedAccountController extends BaseController
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ use App\Http\Requests\Credit\UpdateCreditRequest;
|
||||
use App\Http\Requests\Credit\UploadCreditRequest;
|
||||
use App\Jobs\Entity\EmailEntity;
|
||||
use App\Jobs\Invoice\EmailCredit;
|
||||
use App\Models\Account;
|
||||
use App\Models\Client;
|
||||
use App\Models\Credit;
|
||||
use App\Models\Invoice;
|
||||
@ -643,6 +644,9 @@ class CreditController extends BaseController
|
||||
public function upload(UploadCreditRequest $request, Credit $credit)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $credit);
|
||||
|
||||
|
@ -22,6 +22,7 @@ use App\Http\Requests\Expense\ShowExpenseRequest;
|
||||
use App\Http\Requests\Expense\StoreExpenseRequest;
|
||||
use App\Http\Requests\Expense\UpdateExpenseRequest;
|
||||
use App\Http\Requests\Expense\UploadExpenseRequest;
|
||||
use App\Models\Account;
|
||||
use App\Models\Expense;
|
||||
use App\Repositories\ExpenseRepository;
|
||||
use App\Transformers\ExpenseTransformer;
|
||||
@ -565,6 +566,9 @@ class ExpenseController extends BaseController
|
||||
public function upload(UploadExpenseRequest $request, Expense $expense)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $expense);
|
||||
|
||||
|
@ -30,6 +30,7 @@ use App\Jobs\Entity\EmailEntity;
|
||||
use App\Jobs\Invoice\StoreInvoice;
|
||||
use App\Jobs\Invoice\ZipInvoices;
|
||||
use App\Jobs\Util\UnlinkFile;
|
||||
use App\Models\Account;
|
||||
use App\Models\Client;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Quote;
|
||||
@ -906,6 +907,8 @@ class InvoiceController extends BaseController
|
||||
*/
|
||||
public function upload(UploadInvoiceRequest $request, Invoice $invoice)
|
||||
{
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $invoice);
|
||||
|
@ -23,6 +23,7 @@ use App\Http\Requests\Payment\ShowPaymentRequest;
|
||||
use App\Http\Requests\Payment\StorePaymentRequest;
|
||||
use App\Http\Requests\Payment\UpdatePaymentRequest;
|
||||
use App\Http\Requests\Payment\UploadPaymentRequest;
|
||||
use App\Models\Account;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Repositories\PaymentRepository;
|
||||
@ -729,6 +730,9 @@ class PaymentController extends BaseController
|
||||
public function upload(UploadPaymentRequest $request, Payment $payment)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $payment);
|
||||
|
||||
|
@ -20,6 +20,7 @@ use App\Http\Requests\Product\ShowProductRequest;
|
||||
use App\Http\Requests\Product\StoreProductRequest;
|
||||
use App\Http\Requests\Product\UpdateProductRequest;
|
||||
use App\Http\Requests\Product\UploadProductRequest;
|
||||
use App\Models\Account;
|
||||
use App\Models\Product;
|
||||
use App\Repositories\ProductRepository;
|
||||
use App\Transformers\ProductTransformer;
|
||||
@ -534,6 +535,9 @@ class ProductController extends BaseController
|
||||
public function upload(UploadProductRequest $request, Product $product)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $product);
|
||||
|
||||
|
@ -20,6 +20,7 @@ use App\Http\Requests\Project\ShowProjectRequest;
|
||||
use App\Http\Requests\Project\StoreProjectRequest;
|
||||
use App\Http\Requests\Project\UpdateProjectRequest;
|
||||
use App\Http\Requests\Project\UploadProjectRequest;
|
||||
use App\Models\Account;
|
||||
use App\Models\Project;
|
||||
use App\Repositories\ProjectRepository;
|
||||
use App\Transformers\ProjectTransformer;
|
||||
@ -559,6 +560,9 @@ class ProjectController extends BaseController
|
||||
public function upload(UploadProjectRequest $request, Project $project)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $project);
|
||||
|
||||
|
@ -26,6 +26,7 @@ use App\Http\Requests\Quote\StoreQuoteRequest;
|
||||
use App\Http\Requests\Quote\UpdateQuoteRequest;
|
||||
use App\Http\Requests\Quote\UploadQuoteRequest;
|
||||
use App\Jobs\Invoice\ZipInvoices;
|
||||
use App\Models\Account;
|
||||
use App\Models\Client;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Quote;
|
||||
@ -775,6 +776,9 @@ class QuoteController extends BaseController
|
||||
public function upload(UploadQuoteRequest $request, Quote $quote)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $quote);
|
||||
|
||||
|
@ -21,6 +21,7 @@ use App\Http\Requests\RecurringInvoice\ShowRecurringInvoiceRequest;
|
||||
use App\Http\Requests\RecurringInvoice\StoreRecurringInvoiceRequest;
|
||||
use App\Http\Requests\RecurringInvoice\UpdateRecurringInvoiceRequest;
|
||||
use App\Http\Requests\RecurringInvoice\UploadRecurringInvoiceRequest;
|
||||
use App\Models\Account;
|
||||
use App\Models\RecurringInvoice;
|
||||
use App\Repositories\RecurringInvoiceRepository;
|
||||
use App\Transformers\RecurringInvoiceTransformer;
|
||||
@ -738,6 +739,9 @@ class RecurringInvoiceController extends BaseController
|
||||
public function upload(UploadRecurringInvoiceRequest $request, RecurringInvoice $recurring_invoice)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $recurring_invoice);
|
||||
|
||||
|
@ -212,7 +212,7 @@ class SetupController extends Controller
|
||||
public function checkPdf(Request $request)
|
||||
{
|
||||
try {
|
||||
if (config('ninja.phantomjs_key')) {
|
||||
if (config('ninja.phantomjs_pdf_generation')) {
|
||||
return $this->testPhantom();
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ class SetupController extends Controller
|
||||
private function testPhantom()
|
||||
{
|
||||
try {
|
||||
$key = config('ninja.phantomjs_key');
|
||||
$key = config('ninja.phantomjs_pdf_generation');
|
||||
$url = 'https://www.invoiceninja.org/';
|
||||
|
||||
$phantom_url = "https://phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$url}%22,renderType:%22pdf%22%7D";
|
||||
|
@ -22,6 +22,7 @@ use App\Http\Requests\Task\ShowTaskRequest;
|
||||
use App\Http\Requests\Task\StoreTaskRequest;
|
||||
use App\Http\Requests\Task\UpdateTaskRequest;
|
||||
use App\Http\Requests\Task\UploadTaskRequest;
|
||||
use App\Models\Account;
|
||||
use App\Models\Task;
|
||||
use App\Repositories\TaskRepository;
|
||||
use App\Transformers\TaskTransformer;
|
||||
@ -35,8 +36,8 @@ use Illuminate\Http\Response;
|
||||
|
||||
/**
|
||||
* Class TaskController.
|
||||
* @covers App\Http\Controllers\TaskController
|
||||
*/
|
||||
|
||||
class TaskController extends BaseController
|
||||
{
|
||||
use MakesHash;
|
||||
@ -569,6 +570,9 @@ class TaskController extends BaseController
|
||||
public function upload(UploadTaskRequest $request, Task $task)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $task);
|
||||
|
||||
|
@ -24,13 +24,13 @@ class TwoFactorController extends BaseController
|
||||
return response()->json(['message' => '2FA already enabled'], 400);
|
||||
elseif(! $user->phone)
|
||||
return response()->json(['message' => ctrans('texts.set_phone_for_two_factor')], 400);
|
||||
elseif(! $user->confirmed)
|
||||
elseif(! $user->isVerified())
|
||||
return response()->json(['message' => 'Please confirm your account first'], 400);
|
||||
|
||||
$google2fa = new Google2FA();
|
||||
$secret = $google2fa->generateSecretKey();
|
||||
|
||||
$qr_code = $google2fa->getQRCodeGoogleUrl(
|
||||
$qr_code = $google2fa->getQRCodeUrl(
|
||||
config('ninja.app_name'),
|
||||
$user->email,
|
||||
$secret
|
||||
@ -38,7 +38,7 @@ class TwoFactorController extends BaseController
|
||||
|
||||
$data = [
|
||||
'secret' => $secret,
|
||||
'qrCode' => $qrCode,
|
||||
'qrCode' => $qr_code,
|
||||
];
|
||||
|
||||
return response()->json(['data' => $data], 200);
|
||||
|
@ -466,6 +466,9 @@ class UserController extends BaseController
|
||||
*/
|
||||
public function destroy(DestroyUserRequest $request, User $user)
|
||||
{
|
||||
if($user->isOwner())
|
||||
return response()->json(['message', 'Cannot detach owner.'],400);
|
||||
|
||||
/* If the user passes the company user we archive the company user */
|
||||
$user = $this->user_repo->delete($request->all(), $user);
|
||||
|
||||
@ -603,6 +606,9 @@ class UserController extends BaseController
|
||||
*/
|
||||
public function detach(DetachCompanyUserRequest $request, User $user)
|
||||
{
|
||||
if($user->isOwner())
|
||||
return response()->json(['message', 'Cannot detach owner.'],400);
|
||||
|
||||
$company_user = CompanyUser::whereUserId($user->id)
|
||||
->whereCompanyId(auth()->user()->companyId())->first();
|
||||
|
||||
@ -623,8 +629,8 @@ class UserController extends BaseController
|
||||
* Detach an existing user to a company.
|
||||
*
|
||||
* @OA\Post(
|
||||
* path="/api/v1/users/{user}/reconfirm",
|
||||
* operationId="reconfirmUser",
|
||||
* path="/api/v1/users/{user}/invite",
|
||||
* operationId="inviteUser",
|
||||
* tags={"users"},
|
||||
* summary="Reconfirm an existing user to a company",
|
||||
* description="Reconfirm an existing user from a company",
|
||||
@ -666,18 +672,10 @@ class UserController extends BaseController
|
||||
* @param User $user
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function reconfirm(ReconfirmUserRequest $request, User $user)
|
||||
public function invite(ReconfirmUserRequest $request, User $user)
|
||||
{
|
||||
$user->confirmation_code = $this->createDbHash($user->company()->db);
|
||||
$user->save();
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new VerifyUserObject($user, $user->company()))->build());
|
||||
$nmo->company = $user->company();
|
||||
$nmo->to_user = $user;
|
||||
$nmo->settings = $user->company->settings;
|
||||
|
||||
NinjaMailerJob::dispatch($nmo);
|
||||
$user->service()->invite($user->company());
|
||||
|
||||
return response()->json(['message' => ctrans('texts.confirmation_resent')], 200);
|
||||
|
||||
|
@ -22,6 +22,7 @@ use App\Http\Requests\Vendor\ShowVendorRequest;
|
||||
use App\Http\Requests\Vendor\StoreVendorRequest;
|
||||
use App\Http\Requests\Vendor\UpdateVendorRequest;
|
||||
use App\Http\Requests\Vendor\UploadVendorRequest;
|
||||
use App\Models\Account;
|
||||
use App\Models\Vendor;
|
||||
use App\Repositories\VendorRepository;
|
||||
use App\Transformers\VendorTransformer;
|
||||
@ -569,6 +570,9 @@ class VendorController extends BaseController
|
||||
public function upload(UploadVendorRequest $request, Vendor $vendor)
|
||||
{
|
||||
|
||||
if(!$this->checkFeature(Account::FEATURE_DOCUMENTS))
|
||||
return $this->featureFailure();
|
||||
|
||||
if ($request->has('documents'))
|
||||
$this->saveDocuments($request->file('documents'), $vendor);
|
||||
|
||||
|
75
app/Http/Controllers/WebCronController.php
Normal file
75
app/Http/Controllers/WebCronController.php
Normal file
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class WebCronController extends Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @OA\Get(
|
||||
* path="/api/v1/webcron",
|
||||
* operationId="webcron",
|
||||
* tags={"webcron"},
|
||||
* summary="Executes the task scheduler via a webcron service",
|
||||
* description="Executes the task scheduler via a webcron service",
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="Success response",
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
|
||||
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
* description="Validation error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/ValidationError"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response="default",
|
||||
* description="Unexpected Error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
||||
* ),
|
||||
* )
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
if(!config('ninja.webcron_secret'))
|
||||
return response()->json(['message' => 'Web cron has not been configured'], 403);
|
||||
|
||||
if($request->has('secret') && (config('ninja.webcron_secret') == $request->query('secret')))
|
||||
{
|
||||
Artisan::call('schedule:run');
|
||||
|
||||
return response()->json(['message' => 'Executing web cron'], 200);
|
||||
}
|
||||
|
||||
return response()->json(['message' => 'Invalid secret'], 403);
|
||||
|
||||
}
|
||||
}
|
@ -31,12 +31,27 @@ class PasswordProtection
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
|
||||
$error = [
|
||||
'message' => 'Invalid Password',
|
||||
'errors' => new stdClass,
|
||||
];
|
||||
|
||||
if($request->header('X-API-OAUTH-PASSWORD')){
|
||||
$timeout = auth()->user()->company()->default_password_timeout;
|
||||
|
||||
if($timeout == 0)
|
||||
$timeout = null;
|
||||
else
|
||||
$timeout = now()->addMinutes($timeout);
|
||||
|
||||
if (Cache::get(auth()->user()->hashed_id.'_logged_in')) {
|
||||
|
||||
Cache::pull(auth()->user()->hashed_id.'_logged_in');
|
||||
Cache::add(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout);
|
||||
|
||||
return $next($request);
|
||||
|
||||
}elseif( $request->header('X-API-OAUTH-PASSWORD') && strlen($request->header('X-API-OAUTH-PASSWORD')) >=1){
|
||||
|
||||
//user is attempting to reauth with OAuth - check the token value
|
||||
//todo expand this to include all OAuth providers
|
||||
@ -48,51 +63,36 @@ class PasswordProtection
|
||||
|
||||
$query = [
|
||||
'oauth_user_id' => $google->harvestSubField($user),
|
||||
'oauth_provider_id'=> 'google',
|
||||
'oauth_provider_id'=> 'google'
|
||||
];
|
||||
|
||||
/* Cannot allow duplicates! */
|
||||
if ($existing_user = MultiDB::hasUser($query)) {
|
||||
Cache::add(auth()->user()->email.'_logged_in', Str::random(64), now()->addMinutes(30));
|
||||
//If OAuth and user also has a password set - check both
|
||||
if ($existing_user = MultiDB::hasUser($query) && auth()->user()->has_password && Hash::check(auth()->user()->password, $request->header('X-API-PASSWORD'))) {
|
||||
|
||||
Cache::add(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout);
|
||||
return $next($request);
|
||||
}
|
||||
elseif($existing_user = MultiDB::hasUser($query) && !auth()->user()->has_password){
|
||||
|
||||
Cache::add(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout);
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
||||
$error = [
|
||||
'message' => 'Access denied',
|
||||
'errors' => new stdClass,
|
||||
];
|
||||
|
||||
return response()->json($error, 412);
|
||||
|
||||
|
||||
}elseif ($request->header('X-API-PASSWORD')) {
|
||||
}elseif ($request->header('X-API-PASSWORD') && Hash::check($request->header('X-API-PASSWORD'), auth()->user()->password)) {
|
||||
|
||||
//user is attempting to reauth with regular password
|
||||
//
|
||||
if (! Hash::check($request->header('X-API-PASSWORD'), auth()->user()->password)) {
|
||||
return response()->json($error, 403);
|
||||
}
|
||||
|
||||
} elseif (Cache::get(auth()->user()->email.'_logged_in')) {
|
||||
|
||||
Cache::pull(auth()->user()->email.'_logged_in');
|
||||
Cache::add(auth()->user()->email.'_logged_in', Str::random(64), now()->addMinutes(30));
|
||||
Cache::add(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout);
|
||||
|
||||
return $next($request);
|
||||
|
||||
} else {
|
||||
|
||||
$error = [
|
||||
'message' => 'Access denied',
|
||||
'errors' => new stdClass,
|
||||
];
|
||||
|
||||
return response()->json($error, 412);
|
||||
}
|
||||
|
||||
Cache::add(auth()->user()->email.'_logged_in', Str::random(64), now()->addMinutes(30));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
@ -51,8 +51,6 @@ class TokenAuth
|
||||
*/
|
||||
$user->setCompany($company_token->company);
|
||||
|
||||
config(['ninja.company_id' => $company_token->company->id]);
|
||||
|
||||
app('queue')->createPayloadUsing(function () use ($company_token) {
|
||||
return ['db' => $company_token->company->db];
|
||||
});
|
||||
@ -71,6 +69,7 @@ class TokenAuth
|
||||
auth()->login($user, false);
|
||||
|
||||
event(new UserLoggedIn($user, $company_token->company, Ninja::eventVars()));
|
||||
|
||||
} else {
|
||||
$error = [
|
||||
'message' => 'Invalid token',
|
||||
|
@ -17,6 +17,7 @@ use App\Models\Client;
|
||||
use App\Models\RecurringInvoice;
|
||||
use App\Utils\Traits\CleanLineItems;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
|
||||
class StoreRecurringInvoiceRequest extends Request
|
||||
{
|
||||
@ -43,6 +44,7 @@ class StoreRecurringInvoiceRequest extends Request
|
||||
foreach (range(0, $documents) as $index) {
|
||||
$rules['documents.'.$index] = 'file|mimes:png,ai,svg,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx|max:20000';
|
||||
}
|
||||
|
||||
} elseif ($this->input('documents')) {
|
||||
$rules['documents'] = 'file|mimes:png,ai,svg,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx|max:20000';
|
||||
}
|
||||
@ -51,7 +53,7 @@ class StoreRecurringInvoiceRequest extends Request
|
||||
|
||||
$rules['invitations.*.client_contact_id'] = 'distinct';
|
||||
|
||||
$rules['frequency_id'] = 'required|integer';
|
||||
$rules['frequency_id'] = 'required|integer|digits_between:1,12';
|
||||
|
||||
$rules['number'] = new UniqueRecurringInvoiceNumberRule($this->all());
|
||||
|
||||
@ -62,6 +64,16 @@ class StoreRecurringInvoiceRequest extends Request
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
// foreach($this->input('documents') as $document)
|
||||
// {
|
||||
// if($document instanceof UploadedFile){
|
||||
// nlog("i am an uploaded file");
|
||||
// nlog($document);
|
||||
// }
|
||||
// else
|
||||
// nlog($document);
|
||||
// }
|
||||
|
||||
if (array_key_exists('design_id', $input) && is_string($input['design_id'])) {
|
||||
$input['design_id'] = $this->decodePrimaryKey($input['design_id']);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ use App\Http\Requests\Request;
|
||||
use App\Utils\Traits\ChecksEntityStatus;
|
||||
use App\Utils\Traits\CleanLineItems;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
|
||||
class UpdateRecurringInvoiceRequest extends Request
|
||||
{
|
||||
@ -57,6 +58,16 @@ class UpdateRecurringInvoiceRequest extends Request
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
// foreach($this->input('documents') as $document)
|
||||
// {
|
||||
// if($document instanceof UploadedFile){
|
||||
// nlog("i am an uploaded file");
|
||||
// nlog($document);
|
||||
// }
|
||||
// else
|
||||
// nlog($document);
|
||||
// }
|
||||
|
||||
if (array_key_exists('design_id', $input) && is_string($input['design_id'])) {
|
||||
$input['design_id'] = $this->decodePrimaryKey($input['design_id']);
|
||||
}
|
||||
|
@ -23,6 +23,6 @@ class ReconfirmUserRequest extends Request
|
||||
*/
|
||||
public function authorize() : bool
|
||||
{
|
||||
return auth()->user()->Admin();
|
||||
return auth()->user()->isAdmin();
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ class NinjaMailerJob implements ShouldQueue
|
||||
} catch (\Exception $e) {
|
||||
|
||||
nlog("error failed with {$e->getMessage()}");
|
||||
nlog($e);
|
||||
// nlog($e);
|
||||
|
||||
if($this->nmo->entity)
|
||||
$this->entityEmailFailed($e->getMessage());
|
||||
|
@ -65,6 +65,10 @@ class CreateUser
|
||||
$user->email = $this->request['email']; //todo need to remove this in production
|
||||
$user->last_login = now();
|
||||
$user->ip = request()->ip();
|
||||
|
||||
if(Ninja::isSelfHost())
|
||||
$user->email_verified_at = now();
|
||||
|
||||
$user->save();
|
||||
|
||||
$user->companies()->attach($this->company->id, [
|
||||
@ -78,6 +82,7 @@ class CreateUser
|
||||
'settings' => null,
|
||||
]);
|
||||
|
||||
if(!Ninja::isSelfHost())
|
||||
event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars()));
|
||||
|
||||
return $user;
|
||||
|
@ -37,7 +37,7 @@ class MailSentListener implements ShouldQueue
|
||||
public function handle(MessageSent $event)
|
||||
{
|
||||
|
||||
if(property_exists($event->message, 'invitation')){
|
||||
if(property_exists($event->message, 'invitation') && $event->message->invitation){
|
||||
|
||||
MultiDB::setDb($event->message->invitation->company->db);
|
||||
|
||||
@ -45,7 +45,7 @@ class MailSentListener implements ShouldQueue
|
||||
|
||||
$postmark_id = $event->message->getHeaders()->get('x-pm-message-id')->getValue();
|
||||
|
||||
nlog($postmark_id);
|
||||
// nlog($postmark_id);
|
||||
$invitation = $event->message->invitation;
|
||||
$invitation->message_id = $postmark_id;
|
||||
$invitation->save();
|
||||
|
@ -46,24 +46,10 @@ class SendVerificationNotification implements ShouldQueue
|
||||
*/
|
||||
public function handle($event)
|
||||
{
|
||||
|
||||
MultiDB::setDB($event->company->db);
|
||||
|
||||
try {
|
||||
$event->user->service()->invite($event->company);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new VerifyUserObject($event->user, $event->company))->build());
|
||||
$nmo->company = $event->company;
|
||||
$nmo->to_user = $event->user;
|
||||
$nmo->settings = $event->company->settings;
|
||||
|
||||
NinjaMailerJob::dispatch($nmo);
|
||||
|
||||
// $event->user->notify(new VerifyUser($event->user, $event->company));
|
||||
|
||||
Ninja::registerNinjaUser($event->user);
|
||||
|
||||
} catch (Exception $e) {
|
||||
nlog("I couldn't send the email " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -167,17 +167,17 @@ class Account extends BaseModel
|
||||
|
||||
// Enterprise; No Trial allowed; grandfathered for old pro users
|
||||
case self::FEATURE_USERS:// Grandfathered for old Pro users
|
||||
if ($planDetails && $planDetails['trial']) {
|
||||
if ($plan_details && $plan_details['trial']) {
|
||||
// Do they have a non-trial plan?
|
||||
$planDetails = $this->getPlanDetails(false, false);
|
||||
$plan_details = $this->getPlanDetails(false, false);
|
||||
}
|
||||
|
||||
return $self_host || ! empty($planDetails) && ($planDetails['plan'] == self::PLAN_ENTERPRISE);
|
||||
return $self_host || ! empty($plan_details) && ($plan_details['plan'] == self::PLAN_ENTERPRISE);
|
||||
|
||||
// Enterprise; No Trial allowed
|
||||
case self::FEATURE_DOCUMENTS:
|
||||
case self::FEATURE_USER_PERMISSIONS:
|
||||
return $self_host || ! empty($planDetails) && $planDetails['plan'] == self::PLAN_ENTERPRISE && ! $planDetails['trial'];
|
||||
return $self_host || ! empty($plan_details) && $plan_details['plan'] == self::PLAN_ENTERPRISE && ! $plan_details['trial'];
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
@ -86,6 +86,7 @@ class Company extends BaseModel
|
||||
'session_timeout',
|
||||
'oauth_password_required',
|
||||
'invoice_task_datelog',
|
||||
'default_password_timeout',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
@ -88,7 +88,8 @@ class Gateway extends StaticModel
|
||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
|
||||
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable']],
|
||||
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
|
||||
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false]]; //Stripe
|
||||
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],
|
||||
GatewayType::SOFORT => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable']]]; //Stripe
|
||||
break;
|
||||
case 39:
|
||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]]; //Checkout
|
||||
|
@ -17,6 +17,7 @@ use App\Jobs\Mail\NinjaMailerObject;
|
||||
use App\Mail\Admin\ResetPasswordObject;
|
||||
use App\Models\Presenters\UserPresenter;
|
||||
use App\Notifications\ResetPasswordNotification;
|
||||
use App\Services\User\UserService;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\Utils\Traits\UserSessionAttributes;
|
||||
use App\Utils\Traits\UserSettings;
|
||||
@ -398,4 +399,9 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
|
||||
//$this->notify(new ResetPasswordNotification($token));
|
||||
}
|
||||
|
||||
public function service()
|
||||
{
|
||||
return new UserService($this);
|
||||
}
|
||||
}
|
||||
|
@ -74,6 +74,10 @@ class UserRepository extends BaseRepository
|
||||
}
|
||||
|
||||
$user->account_id = $account->id;
|
||||
|
||||
if(strlen($user->password) >=1)
|
||||
$user->has_password = true;
|
||||
|
||||
$user->save();
|
||||
|
||||
if (isset($data['company_user'])) {
|
||||
@ -103,6 +107,9 @@ class UserRepository extends BaseRepository
|
||||
|
||||
public function destroy(array $data, User $user)
|
||||
{
|
||||
if($user->isOwner())
|
||||
return $user;
|
||||
|
||||
if (array_key_exists('company_user', $data)) {
|
||||
$this->forced_includes = 'company_users';
|
||||
|
||||
|
@ -140,7 +140,7 @@ class PaymentMethod
|
||||
|
||||
if ($this->validGatewayForAmount($gateway->fees_and_limits->{$type}, $this->amount) && $gateway->fees_and_limits->{$type}->is_enabled) {
|
||||
|
||||
if($type == GatewayType::BANK_TRANSFER);
|
||||
// if($type == GatewayType::BANK_TRANSFER);
|
||||
|
||||
$this->payment_methods[] = [$gateway->id => $type];
|
||||
}
|
||||
|
52
app/Services/User/UserService.php
Normal file
52
app/Services/User/UserService.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
namespace App\Services\User;
|
||||
|
||||
use App\Jobs\Mail\NinjaMailer;
|
||||
use App\Jobs\Mail\NinjaMailerJob;
|
||||
use App\Jobs\Mail\NinjaMailerObject;
|
||||
use App\Mail\Admin\VerifyUserObject;
|
||||
use App\Models\Company;
|
||||
use App\Models\User;
|
||||
use App\Utils\Ninja;
|
||||
|
||||
class UserService
|
||||
{
|
||||
|
||||
public $user;
|
||||
|
||||
public function __construct(User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
public function invite($company)
|
||||
{
|
||||
try {
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new VerifyUserObject($this->user, $company))->build());
|
||||
$nmo->company = $company;
|
||||
$nmo->to_user = $this->user;
|
||||
$nmo->settings = $company->settings;
|
||||
|
||||
NinjaMailerJob::dispatch($nmo);
|
||||
|
||||
Ninja::registerNinjaUser($this->user);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
nlog("I couldn't send the verification email " . $e->getMessage());
|
||||
}
|
||||
|
||||
return $this->user;
|
||||
}
|
||||
}
|
@ -154,6 +154,7 @@ class CompanyTransformer extends EntityTransformer
|
||||
'expense_amount_is_pretax' =>(bool)true, //@deprecate 1-2-2021
|
||||
'oauth_password_required' => (bool)$company->oauth_password_required,
|
||||
'session_timeout' => (int)$company->session_timeout,
|
||||
'default_password_timeout' => (int) $company->default_password_timeout,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,7 @@ class UserTransformer extends EntityTransformer
|
||||
'oauth_provider_id' => (string) $user->oauth_provider_id,
|
||||
'last_confirmed_email_address' => (string) $user->last_confirmed_email_address ?: '',
|
||||
'google_2fa_secret' => (bool) $user->google_2fa_secret,
|
||||
'has_password' => (bool) $user->has_password,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ class HtmlEngine
|
||||
$data['$client.name'] = &$data['$client_name'];
|
||||
$data['$client.address1'] = &$data['$address1'];
|
||||
$data['$client.address2'] = &$data['$address2'];
|
||||
$data['$client_address'] = ['value' => $this->entity->present()->address() ?: ' ', 'label' => ctrans('texts.address')];
|
||||
$data['$client_address'] = ['value' => $this->client->present()->address() ?: ' ', 'label' => ctrans('texts.address')];
|
||||
$data['$client.address'] = &$data['$client_address'];
|
||||
$data['$client.id_number'] = &$data['$id_number'];
|
||||
$data['$client.vat_number'] = &$data['$vat_number'];
|
||||
@ -271,7 +271,7 @@ class HtmlEngine
|
||||
|
||||
$data['$company.city_state_postal'] = ['value' => $this->company->present()->cityStateZip($this->settings->city, $this->settings->state, $this->settings->postal_code, false) ?: ' ', 'label' => ctrans('texts.city_state_postal')];
|
||||
$data['$company.postal_city_state'] = ['value' => $this->company->present()->cityStateZip($this->settings->city, $this->settings->state, $this->settings->postal_code, true) ?: ' ', 'label' => ctrans('texts.postal_city_state')];
|
||||
$data['$company.name'] = ['value' => $this->company->present()->name() ?: ' ', 'label' => ctrans('texts.company_name')];
|
||||
$data['$company.name'] = ['value' => $this->settings->name ?: ctrans('texts.untitled_account'), 'label' => ctrans('texts.company_name')];
|
||||
$data['$company.address1'] = ['value' => $this->settings->address1 ?: ' ', 'label' => ctrans('texts.address1')];
|
||||
$data['$company.address2'] = ['value' => $this->settings->address2 ?: ' ', 'label' => ctrans('texts.address2')];
|
||||
$data['$company.city'] = ['value' => $this->settings->city ?: ' ', 'label' => ctrans('texts.city')];
|
||||
|
@ -91,6 +91,8 @@ class Phantom
|
||||
|
||||
$instance = Storage::disk(config('filesystems.default'))->put($file_path, $pdf);
|
||||
|
||||
nlog($instance);
|
||||
nlog($file_path);
|
||||
return $file_path;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', ''),
|
||||
'app_version' => '5.1.14',
|
||||
'app_version' => '5.1.16',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', false),
|
||||
@ -29,7 +29,7 @@ return [
|
||||
'hash_salt' => env('HASH_SALT', ''),
|
||||
'currency_converter_api_key' => env('OPENEXCHANGE_APP_ID', ''),
|
||||
'enabled_modules' => 32767,
|
||||
'phantomjs_key' => env('PHANTOMJS_KEY', false),
|
||||
'phantomjs_key' => env('PHANTOMJS_KEY', 'a-demo-key-with-low-quota-per-ip-address'),
|
||||
'phantomjs_secret' => env('PHANTOMJS_SECRET', false),
|
||||
'phantomjs_pdf_generation' => env('PHANTOMJS_PDF_GENERATION', true),
|
||||
'trusted_proxies' => env('TRUSTED_PROXIES', false),
|
||||
@ -141,4 +141,5 @@ return [
|
||||
'snappdf_chromium_path' => env('SNAPPDF_CHROMIUM_PATH', false),
|
||||
'v4_migration_version' => '4.5.31',
|
||||
'flutter_canvas_kit' => env('FLUTTER_CANVAS_KIT', false),
|
||||
'webcron_secret' => env('WEBCRON_SECRET', false),
|
||||
];
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddHasPasswordFieldToUserTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->boolean('has_password')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
42
database/migrations/2021_03_08_205030_add_russian_lang.php
Normal file
42
database/migrations/2021_03_08_205030_add_russian_lang.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Company;
|
||||
use App\Models\Language;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddRussianLang extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
$russian = ['id' => 29, 'name' => 'Russian (Russia)', 'locale' => 'ru_RU'];
|
||||
|
||||
Language::unguard();
|
||||
Language::create($russian);
|
||||
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->integer('default_password_timeout')->default(30);
|
||||
});
|
||||
|
||||
Company::whereNotNull('id')->update(['default_password_timeout' => 30]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -535,7 +535,7 @@ etc1
|
||||
khronos
|
||||
txt
|
||||
vulkan
|
||||
vulkan-deps
|
||||
vulkan-headers
|
||||
wuffs
|
||||
|
||||
Apache License
|
||||
@ -758,36 +758,6 @@ distribution.
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
accessibility
|
||||
|
||||
Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ -1750,40 +1720,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
angle
|
||||
|
||||
Copyright 2021 The ANGLE Project Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
|
||||
Ltd., nor the names of their contributors may be used to endorse
|
||||
or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
angle
|
||||
|
||||
Copyright The ANGLE Project Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -1915,14 +1851,28 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
angle
|
||||
fuchsia_sdk
|
||||
rapidjson
|
||||
khronos
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
Copyright (c) 2007-2016 The Khronos Group Inc.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and/or associated documentation files (the
|
||||
"Materials"), to deal in the Materials without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
permit persons to whom the Materials are furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
--------------------------------------------------------------------------------
|
||||
angle
|
||||
khronos
|
||||
@ -1951,6 +1901,30 @@ MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
angle
|
||||
khronos
|
||||
|
||||
Copyright (c) 2013-2016 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and/or associated documentation files (the
|
||||
"Materials"), to deal in the Materials without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
permit persons to whom the Materials are furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
--------------------------------------------------------------------------------
|
||||
angle
|
||||
khronos
|
||||
|
||||
Copyright (c) 2013-2017 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@ -6308,31 +6282,6 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
draggable_scrollbar
|
||||
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2018 Draggable Scrollbar Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
extended_image
|
||||
|
||||
@ -8541,6 +8490,15 @@ negated the permissions granted in the license. In the spirit of
|
||||
permissive licensing, and of not having licensing issues being an
|
||||
obstacle to adoption, that text has been removed.
|
||||
--------------------------------------------------------------------------------
|
||||
fuchsia_sdk
|
||||
rapidjson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
--------------------------------------------------------------------------------
|
||||
glfw
|
||||
|
||||
Copyright (c) 2002-2006 Marcus Geelnard
|
||||
@ -11974,29 +11932,6 @@ MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
--------------------------------------------------------------------------------
|
||||
khronos
|
||||
|
||||
Copyright (c) 2007-2016 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and/or associated documentation files (the
|
||||
"Materials"), to deal in the Materials without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
permit persons to whom the Materials are furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
--------------------------------------------------------------------------------
|
||||
khronos
|
||||
|
||||
Copyright (c) 2008-2009 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@ -12010,29 +11945,6 @@ the following conditions:
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
--------------------------------------------------------------------------------
|
||||
khronos
|
||||
|
||||
Copyright (c) 2013-2016 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and/or associated documentation files (the
|
||||
"Materials"), to deal in the Materials without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
permit persons to whom the Materials are furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
@ -15918,6 +15830,38 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
skia
|
||||
|
||||
Copyright 2012 Intel Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
skia
|
||||
|
||||
Copyright 2012 The Android Open Source Project
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -16849,38 +16793,6 @@ skia
|
||||
|
||||
Copyright 2021 Google LLC.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
skia
|
||||
|
||||
Copyright 2021 Google, LLC
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
52
public/flutter_service_worker.js
vendored
52
public/flutter_service_worker.js
vendored
@ -3,36 +3,36 @@ const MANIFEST = 'flutter-app-manifest';
|
||||
const TEMP = 'flutter-temp-cache';
|
||||
const CACHE_NAME = 'flutter-app-cache';
|
||||
const RESOURCES = {
|
||||
"main.dart.js": "9642a825d6e3e0331a7b7a8095477684",
|
||||
"favicon.ico": "51636d3a390451561744c42188ccd628",
|
||||
"manifest.json": "77215c1737c7639764e64a192be2f7b8",
|
||||
"icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed",
|
||||
"icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35",
|
||||
"favicon.ico": "51636d3a390451561744c42188ccd628",
|
||||
"assets/NOTICES": "1c2603c5ad0cd648934fe488850b4dea",
|
||||
"assets/fonts/MaterialIcons-Regular.otf": "1288c9e28052e028aba623321f7826ac",
|
||||
"assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f",
|
||||
"assets/AssetManifest.json": "659dcf9d1baf3aed3ab1b9c42112bf8f",
|
||||
"assets/assets/images/payment_types/dinerscard.png": "06d85186ba858c18ab7c9caa42c92024",
|
||||
"assets/assets/images/payment_types/laser.png": "b4e6e93dd35517ac429301119ff05868",
|
||||
"assets/assets/images/payment_types/solo.png": "2030c3ccaccf5d5e87916a62f5b084d6",
|
||||
"assets/assets/images/payment_types/unionpay.png": "7002f52004e0ab8cc0b7450b0208ccb2",
|
||||
"assets/assets/images/payment_types/paypal.png": "8e06c094c1871376dfea1da8088c29d1",
|
||||
"assets/assets/images/payment_types/mastercard.png": "6f6cdc29ee2e22e06b1ac029cb52ef71",
|
||||
"assets/assets/images/payment_types/discover.png": "6c0a386a00307f87db7bea366cca35f5",
|
||||
"assets/assets/images/payment_types/ach.png": "7433f0aff779dc98a649b7a2daf777cf",
|
||||
"assets/assets/images/payment_types/amex.png": "c49a4247984b3732a4af50a3390aa978",
|
||||
"assets/assets/images/payment_types/other.png": "d936e11fa3884b8c9f1bd5c914be8629",
|
||||
"assets/assets/images/payment_types/jcb.png": "07e0942d16c5592118b72e74f2f7198c",
|
||||
"assets/assets/images/payment_types/carteblanche.png": "d936e11fa3884b8c9f1bd5c914be8629",
|
||||
"assets/assets/images/payment_types/maestro.png": "e533b92bfb50339fdbfa79e3dfe81f08",
|
||||
"assets/assets/images/payment_types/switch.png": "4fa11c45327f5fdc20205821b2cfd9cc",
|
||||
"assets/assets/images/payment_types/visa.png": "3ddc4a4d25c946e8ad7e6998f30fd4e3",
|
||||
"assets/assets/images/google-icon.png": "0f118259ce403274f407f5e982e681c3",
|
||||
"assets/NOTICES": "a5e9ede1dfb62a7ca46881980b5a0798",
|
||||
"assets/assets/images/logo.png": "090f69e23311a4b6d851b3880ae52541",
|
||||
"assets/assets/images/payment_types/discover.png": "6c0a386a00307f87db7bea366cca35f5",
|
||||
"assets/assets/images/payment_types/carteblanche.png": "d936e11fa3884b8c9f1bd5c914be8629",
|
||||
"assets/assets/images/payment_types/visa.png": "3ddc4a4d25c946e8ad7e6998f30fd4e3",
|
||||
"assets/assets/images/payment_types/paypal.png": "8e06c094c1871376dfea1da8088c29d1",
|
||||
"assets/assets/images/payment_types/maestro.png": "e533b92bfb50339fdbfa79e3dfe81f08",
|
||||
"assets/assets/images/payment_types/mastercard.png": "6f6cdc29ee2e22e06b1ac029cb52ef71",
|
||||
"assets/assets/images/payment_types/amex.png": "c49a4247984b3732a4af50a3390aa978",
|
||||
"assets/assets/images/payment_types/jcb.png": "07e0942d16c5592118b72e74f2f7198c",
|
||||
"assets/assets/images/payment_types/dinerscard.png": "06d85186ba858c18ab7c9caa42c92024",
|
||||
"assets/assets/images/payment_types/ach.png": "7433f0aff779dc98a649b7a2daf777cf",
|
||||
"assets/assets/images/payment_types/solo.png": "2030c3ccaccf5d5e87916a62f5b084d6",
|
||||
"assets/assets/images/payment_types/other.png": "d936e11fa3884b8c9f1bd5c914be8629",
|
||||
"assets/assets/images/payment_types/laser.png": "b4e6e93dd35517ac429301119ff05868",
|
||||
"assets/assets/images/payment_types/switch.png": "4fa11c45327f5fdc20205821b2cfd9cc",
|
||||
"assets/assets/images/payment_types/unionpay.png": "7002f52004e0ab8cc0b7450b0208ccb2",
|
||||
"assets/assets/images/google-icon.png": "0f118259ce403274f407f5e982e681c3",
|
||||
"assets/fonts/MaterialIcons-Regular.otf": "1288c9e28052e028aba623321f7826ac",
|
||||
"assets/AssetManifest.json": "659dcf9d1baf3aed3ab1b9c42112bf8f",
|
||||
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "3e722fd57a6db80ee119f0e2c230ccff",
|
||||
"assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f",
|
||||
"/": "23224b5e03519aaa87594403d54412cf",
|
||||
"main.dart.js": "5d07ed9b68a49cac769dfb57aac0080c",
|
||||
"version.json": "b7c8971e1ab5b627fd2a4317c52b843e",
|
||||
"manifest.json": "77215c1737c7639764e64a192be2f7b8",
|
||||
"favicon.png": "dca91c54388f52eded692718d5a98b8b",
|
||||
"/": "23224b5e03519aaa87594403d54412cf"
|
||||
"favicon.png": "dca91c54388f52eded692718d5a98b8b"
|
||||
};
|
||||
|
||||
// The application shell files that are downloaded before a service worker can
|
||||
@ -49,7 +49,7 @@ self.addEventListener("install", (event) => {
|
||||
return event.waitUntil(
|
||||
caches.open(TEMP).then((cache) => {
|
||||
return cache.addAll(
|
||||
CORE.map((value) => new Request(value, {'cache': 'reload'})));
|
||||
CORE.map((value) => new Request(value + '?revision=' + RESOURCES[value], {'cache': 'reload'})));
|
||||
})
|
||||
);
|
||||
});
|
||||
|
2
public/js/setup/setup.js
vendored
2
public/js/setup/setup.js
vendored
File diff suppressed because one or more lines are too long
234330
public/main.dart.js
vendored
234330
public/main.dart.js
vendored
File diff suppressed because one or more lines are too long
@ -16,6 +16,6 @@
|
||||
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=85bcae0a646882e56b12",
|
||||
"/js/clients/shared/multiple-downloads.js": "/js/clients/shared/multiple-downloads.js?id=5c35d28cf0a3286e7c45",
|
||||
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=fc3055d6a099f523ea98",
|
||||
"/js/setup/setup.js": "/js/setup/setup.js?id=44bc4a71fc1d3606fc8e",
|
||||
"/js/setup/setup.js": "/js/setup/setup.js?id=8c46629d6d43a29fce69",
|
||||
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
|
||||
}
|
||||
|
11
resources/js/setup/setup.js
vendored
11
resources/js/setup/setup.js
vendored
@ -23,6 +23,8 @@ class Setup {
|
||||
}
|
||||
|
||||
handleDatabaseCheck() {
|
||||
let url = document.querySelector('meta[name=setup-db-check]').content;
|
||||
|
||||
let data = {
|
||||
db_host: document.querySelector('input[name="db_host"]').value,
|
||||
db_port: document.querySelector('input[name="db_port"]').value,
|
||||
@ -36,7 +38,7 @@ class Setup {
|
||||
|
||||
this.checkDbButton.disabled = true;
|
||||
|
||||
Axios.post('/setup/check_db', data)
|
||||
Axios.post(url, data)
|
||||
.then((response) =>
|
||||
this.handleSuccess(this.checkDbAlert, 'mail-wrapper')
|
||||
)
|
||||
@ -46,6 +48,8 @@ class Setup {
|
||||
}
|
||||
|
||||
handleSmtpCheck() {
|
||||
let url = document.querySelector('meta[name=setup-email-check]').content;
|
||||
|
||||
let data = {
|
||||
mail_driver: document.querySelector('select[name="mail_driver"]')
|
||||
.value,
|
||||
@ -71,7 +75,7 @@ class Setup {
|
||||
return (this.checkSmtpButton.disabled = false);
|
||||
}
|
||||
|
||||
Axios.post('/setup/check_mail', data)
|
||||
Axios.post(url, data)
|
||||
.then((response) => {
|
||||
this.handleSuccess(this.checkSmtpAlert, 'account-wrapper');
|
||||
this.handleSuccess(this.checkSmtpAlert, 'submit-wrapper');
|
||||
@ -83,9 +87,10 @@ class Setup {
|
||||
}
|
||||
|
||||
handleTestPdfCheck() {
|
||||
let url = document.querySelector('meta[name=setup-pdf-check]').content;
|
||||
this.checkPdfButton.disabled = true;
|
||||
|
||||
Axios.post('/setup/check_pdf', {})
|
||||
Axios.post(url, {})
|
||||
.then((response) => {
|
||||
try {
|
||||
let win = window.open(response.data.url, '_blank');
|
||||
|
@ -4148,6 +4148,25 @@ $LANG = array(
|
||||
'agree' => 'Agree',
|
||||
|
||||
'pending_approval' => 'Pending Approval',
|
||||
'migration_select_company_label' => 'Select companies to migrate',
|
||||
'force_migration' => 'Force migration',
|
||||
'require_password_with_social_login' => 'Require Password with Social Login',
|
||||
'stay_logged_in' => 'Stay Logged In',
|
||||
'session_about_to_expire' => 'Warning: Your session is about to expire',
|
||||
'count_hours' => ':count Hours',
|
||||
'count_day' => '1 Day',
|
||||
'count_days' => ':count Days',
|
||||
'web_session_timeout' => 'Web Session Timeout',
|
||||
'security_settings' => 'Security Settings',
|
||||
'resend_email' => 'Resend Email',
|
||||
'confirm_your_email_address' => 'Please confirm your email address',
|
||||
'freshbooks' => 'FreshBooks',
|
||||
'invoice2go' => 'Invoice2go',
|
||||
'invoicely' => 'Invoicely',
|
||||
'waveaccounting' => 'Wave Accounting',
|
||||
'zoho' => 'Zoho',
|
||||
'accounting' => 'Accounting',
|
||||
'required_files_missing' => 'Please provide all CSVs.',
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
19
resources/lang/ru_RU/auth.php
Normal file
19
resources/lang/ru_RU/auth.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => 'These credentials do not match our records.',
|
||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||
|
||||
];
|
13
resources/lang/ru_RU/help.php
Normal file
13
resources/lang/ru_RU/help.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$lang = [
|
||||
'client_dashboard' => 'Message to be displayed on clients dashboard',
|
||||
'client_currency' => 'The client currency.',
|
||||
'client_language' => 'The client language.',
|
||||
'client_payment_terms' => 'The client payment terms.',
|
||||
'client_paid_invoice' => 'Message to be displayed on a clients paid invoice screen',
|
||||
'client_unpaid_invoice' => 'Message to be displayed on a clients unpaid invoice screen',
|
||||
'client_unapproved_quote' => 'Message to be displayed on a clients unapproved quote screen',
|
||||
];
|
||||
|
||||
return $lang;
|
19
resources/lang/ru_RU/pagination.php
Normal file
19
resources/lang/ru_RU/pagination.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
|
||||
];
|
22
resources/lang/ru_RU/passwords.php
Normal file
22
resources/lang/ru_RU/passwords.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => 'Passwords must be at least six characters and match the confirmation.',
|
||||
'reset' => 'Your password has been reset!',
|
||||
'sent' => 'We have e-mailed your password reset link!',
|
||||
'token' => 'This password reset token is invalid.',
|
||||
'user' => "We can't find a user with that e-mail address.",
|
||||
|
||||
];
|
4174
resources/lang/ru_RU/texts.php
Normal file
4174
resources/lang/ru_RU/texts.php
Normal file
File diff suppressed because it is too large
Load Diff
146
resources/lang/ru_RU/validation.php
Normal file
146
resources/lang/ru_RU/validation.php
Normal file
@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
|
||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => 'The :attribute must be a date before :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => 'The :attribute must be between :min and :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
'string' => 'The :attribute must be between :min and :max characters.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'confirmed' => 'The :attribute confirmation does not match.',
|
||||
'date' => 'The :attribute is not a valid date.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'different' => 'The :attribute and :other must be different.',
|
||||
'digits' => 'The :attribute must be :digits digits.',
|
||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => 'The :attribute must be a valid email address.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'gt' => [
|
||||
'numeric' => 'The :attribute must be greater than :value.',
|
||||
'file' => 'The :attribute must be greater than :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than :value characters.',
|
||||
'array' => 'The :attribute must have more than :value items.',
|
||||
],
|
||||
'gte' => [
|
||||
'numeric' => 'The :attribute must be greater than or equal :value.',
|
||||
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than or equal :value characters.',
|
||||
'array' => 'The :attribute must have :value items or more.',
|
||||
],
|
||||
'image' => 'The :attribute must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => 'The :attribute must be an integer.',
|
||||
'ip' => 'The :attribute must be a valid IP address.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'lt' => [
|
||||
'numeric' => 'The :attribute must be less than :value.',
|
||||
'file' => 'The :attribute must be less than :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than :value characters.',
|
||||
'array' => 'The :attribute must have less than :value items.',
|
||||
],
|
||||
'lte' => [
|
||||
'numeric' => 'The :attribute must be less than or equal :value.',
|
||||
'file' => 'The :attribute must be less than or equal :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than or equal :value characters.',
|
||||
'array' => 'The :attribute must not have more than :value items.',
|
||||
],
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute may not be greater than :max characters.',
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'The :attribute must be at least :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'The :attribute must be at least :min characters.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'not_regex' => 'The :attribute format is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => 'The :attribute must be :size.',
|
||||
'file' => 'The :attribute must be :size kilobytes.',
|
||||
'string' => 'The :attribute must be :size characters.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
@ -11,73 +11,70 @@
|
||||
<p><img src="{{ $company->present()->logo() }}"></p>
|
||||
|
||||
@if(isset($company) && $company->clients->count() >=1)
|
||||
<p><b>Clients Imported:</b> {{ $company->clients->count() }} </p>
|
||||
<p><b>{{ ctrans('texts.clients') }}:</b> {{ $company->clients->count() }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->products) >=1)
|
||||
<p><b>Products Imported:</b> {{ count($company->products) }} </p>
|
||||
<p><b>{{ ctrans('texts.products') }}:</b> {{ count($company->products) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->invoices) >=1)
|
||||
<p><b>Invoices Imported:</b> {{ count($company->invoices) }} </p>
|
||||
|
||||
<p>To test your PDF generation is working correctly, click <a href="{{$company->invoices->first()->invitations->first()->getLink() }}">here</a>. We've also attempted to attach the PDF to this email.
|
||||
|
||||
<p><b>{{ ctrans('texts.invoices') }}:</b> {{ count($company->invoices) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->payments) >=1)
|
||||
<p><b>Payments Imported:</b> {{ count($company->payments) }} </p>
|
||||
<p><b>{{ ctrans('texts.payments') }}:</b> {{ count($company->payments) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->recurring_invoices) >=1)
|
||||
<p><b>Recurring Invoices Imported:</b> {{ count($company->recurring_invoices) }} </p>
|
||||
<p><b>{{ ctrans('texts.recurring_invoices') }}:</b> {{ count($company->recurring_invoices) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->quotes) >=1)
|
||||
<p><b>Quotes Imported:</b> {{ count($company->quotes) }} </p>
|
||||
<p><b>{{ ctrans('texts.quotes') }}:</b> {{ count($company->quotes) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->credits) >=1)
|
||||
<p><b>Credits Imported:</b> {{ count($company->credits) }} </p>
|
||||
<p><b>{{ ctrans('texts.credits') }}:</b> {{ count($company->credits) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->projects) >=1)
|
||||
<p><b>Projects Imported:</b> {{ count($company->projects) }} </p>
|
||||
<p><b>{{ ctrans('texts.projects') }}:</b> {{ count($company->projects) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->tasks) >=1)
|
||||
<p><b>Tasks Imported:</b> {{ count($company->tasks) }} </p>
|
||||
<p><b>{{ ctrans('texts.tasks') }}:</b> {{ count($company->tasks) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->vendors) >=1)
|
||||
<p><b>Vendors Imported:</b> {{ count($company->vendors) }} </p>
|
||||
<p><b>{{ ctrans('texts.vendors') }}:</b> {{ count($company->vendors) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->expenses) >=1)
|
||||
<p><b>Expenses Imported:</b> {{ count($company->expenses) }} </p>
|
||||
<p><b>{{ ctrans('texts.expenses') }}:</b> {{ count($company->expenses) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->company_gateways) >=1)
|
||||
<p><b>Gateways Imported:</b> {{ count($company->company_gateways) }} </p>
|
||||
<p><b>{{ ctrans('texts.gateways') }}:</b> {{ count($company->company_gateways) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->client_gateway_tokens) >=1)
|
||||
<p><b>Client Gateway Tokens Imported:</b> {{ count($company->client_gateway_tokens) }} </p>
|
||||
<p><b>{{ ctrans('texts.tokens') }}:</b> {{ count($company->client_gateway_tokens) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->tax_rates) >=1)
|
||||
<p><b>Tax Rates Imported:</b> {{ count($company->tax_rates) }} </p>
|
||||
<p><b>{{ ctrans('texts.tax_rates') }}:</b> {{ count($company->tax_rates) }} </p>
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->documents) >=1)
|
||||
<p><b>Documents Imported:</b> {{ count($company->documents) }} </p>
|
||||
<p><b>{{ ctrans('texts.documents') }}:</b> {{ count($company->documents) }} </p>
|
||||
@endif
|
||||
|
||||
<p><b>Data Quality:</b></p>
|
||||
<p> {!! $check_data !!} </p>
|
||||
|
||||
@if(!empty($errors) )
|
||||
<p>The following import errors occurred:</p>
|
||||
<p>{{ ctrans('texts.errors') }}:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
125
resources/views/portal/ninja2020/layout/clean_setup.blade.php
Normal file
125
resources/views/portal/ninja2020/layout/clean_setup.blade.php
Normal file
@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<!-- Error: {{ session('error') }} -->
|
||||
|
||||
@if (config('services.analytics.tracking_id'))
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-122229484-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ config('services.analytics.tracking_id') }}', {'anonymize_ip': true});
|
||||
|
||||
function trackEvent(category, action) {
|
||||
ga('send', 'event', category, action, this.src);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
Vue.config.devtools = true;
|
||||
</script>
|
||||
@else
|
||||
<script>
|
||||
function gtag() {
|
||||
}
|
||||
</script>
|
||||
@endif
|
||||
|
||||
<!-- Title -->
|
||||
@auth()
|
||||
<title>@yield('meta_title', '') — {{ auth('contact')->user()->user->account->isPaid() ? auth('contact')->user()->company->present()->name() : 'Invoice Ninja' }}</title>
|
||||
@endauth
|
||||
|
||||
@guest
|
||||
<title>@yield('meta_title', '') — {{ config('app.name') }}</title>
|
||||
@endguest
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="@yield('meta_description')"/>
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<!-- Scripts -->
|
||||
@if(strpos(Request::url(),'setup') === false)
|
||||
<script src="{{ mix('js/app.js') }}" defer></script>
|
||||
@else
|
||||
<script src="{{ str_replace("setup", "", Request::url())}}js/app.js" defer></script>
|
||||
@endif
|
||||
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.7.x/dist/alpine.min.js" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Styles -->
|
||||
@if(strpos(Request::url(),'setup') === false)
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
|
||||
@else
|
||||
<link href="{{ str_replace("setup", "", Request::url())}}css/app.css" rel="stylesheet">
|
||||
@endif
|
||||
{{-- <link href="{{ mix('favicon.png') }}" rel="shortcut icon" type="image/png"> --}}
|
||||
|
||||
<link rel="canonical" href="{{ config('ninja.app_url') }}/{{ request()->path() }}"/>
|
||||
|
||||
{{-- Feel free to push anything to header using @push('header') --}}
|
||||
@stack('head')
|
||||
|
||||
@if(strpos(Request::url(),'setup'))
|
||||
<meta name="setup-pdf-check" content="{{ str_replace("setup", "", Request::url())}}setup/check_pdf">
|
||||
<meta name="setup-db-check" content="{{ str_replace("setup", "", Request::url())}}setup/check_db">
|
||||
<meta name="setup-email-check" content="{{ str_replace("setup", "", Request::url())}}setup/check_mail">
|
||||
@endif
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
|
||||
</head>
|
||||
|
||||
@include('portal.ninja2020.components.primary-color')
|
||||
|
||||
<body class="antialiased {{ $custom_body_class ?? '' }}">
|
||||
@if(session()->has('message'))
|
||||
<div class="py-1 text-sm text-center text-white bg-primary disposable-alert">
|
||||
{{ session('message') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@yield('body')
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function(){
|
||||
if (! window.cookieconsent) {
|
||||
return;
|
||||
}
|
||||
window.cookieconsent.initialise({
|
||||
"palette": {
|
||||
"popup": {
|
||||
"background": "#000"
|
||||
},
|
||||
"button": {
|
||||
"background": "#f1d600"
|
||||
},
|
||||
},
|
||||
"content": {
|
||||
"href": "https://www.invoiceninja.com/privacy-policy/",
|
||||
"message": "This website uses cookies to ensure you get the best experience on our website.",
|
||||
"dismiss": "Got it!",
|
||||
"link": "Learn more",
|
||||
}
|
||||
})}
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<footer>
|
||||
@yield('footer')
|
||||
@stack('footer')
|
||||
</footer>
|
||||
|
||||
</html>
|
@ -1,4 +1,4 @@
|
||||
<div x-show="open" class="fixed inset-x-0 bottom-0 px-4 pb-4 sm:inset-0 sm:flex sm:items-center sm:justify-center">
|
||||
<div x-show="open" class="fixed inset-x-0 bottom-0 px-4 pb-4 sm:inset-0 sm:flex sm:items-center sm:justify-center" style="display: none;">
|
||||
<div x-show="open" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0"
|
||||
x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-200"
|
||||
x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0"
|
||||
|
@ -1,4 +1,4 @@
|
||||
@extends('portal.ninja2020.layout.clean')
|
||||
@extends('portal.ninja2020.layout.clean_setup')
|
||||
@section('meta_title', ctrans('texts.setup'))
|
||||
|
||||
@section('body')
|
||||
|
@ -164,7 +164,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
||||
Route::delete('users/{user}/detach_from_company', 'UserController@detach')->middleware('password_protected');
|
||||
|
||||
Route::post('users/bulk', 'UserController@bulk')->name('users.bulk')->middleware('password_protected');
|
||||
Route::post('/user/{user}/reconfirm', 'UserController@reconfirm')->middleware('password_protected');
|
||||
Route::post('/users/{user}/invite', 'UserController@invite')->middleware('password_protected');
|
||||
|
||||
Route::resource('webhooks', 'WebhookController');
|
||||
Route::post('webhooks/bulk', 'WebhookController@bulk')->name('webhooks.bulk');
|
||||
@ -182,5 +182,5 @@ Route::match(['get', 'post'], 'payment_webhook/{company_key}/{company_gateway_id
|
||||
|
||||
Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook');
|
||||
Route::get('token_hash_router', 'OneTimeTokenController@router');
|
||||
|
||||
Route::get('webcron', 'WebCronController@index');
|
||||
Route::fallback('BaseController@notFound');
|
||||
|
Loading…
Reference in New Issue
Block a user