Merge pull request #5113 from turbo124/v5-stable

5.1.23
This commit is contained in:
David Bomba 2021-03-13 17:56:03 +11:00 committed by GitHub
commit 2ebba998cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 480 additions and 475 deletions

View File

@ -1 +1 @@
5.1.22
5.1.23

View File

@ -213,13 +213,13 @@ class InvoiceController extends BaseController
$invoice = $this->invoice_repo->save($request->all(), InvoiceFactory::create(auth()->user()->company()->id, auth()->user()->id));
event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars()));
$invoice = $invoice->service()
->fillDefaults()
->triggeredActions($request)
->save();
event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars()));
return $this->itemResponse($invoice);
}

View File

@ -145,12 +145,12 @@ class SetupController extends Controller
/* Make sure no stale connections are cached */
DB::purge('db-ninja-01');
/* Run migrations */
Artisan::call('optimize');
Artisan::call('migrate', ['--force' => true]);
Artisan::call('db:seed', ['--force' => true]);
Storage::disk('local')->delete('test.pdf');
/* Create the first account. */
@ -166,6 +166,7 @@ class SetupController extends Controller
} catch (Exception $e) {
nlog($e->getMessage());
info($e->getMessage());
return redirect()
->back()

View File

@ -83,10 +83,10 @@ class InvoiceController extends BaseController
$invoice = $this->invoice_repo->save($request->all(), InvoiceFactory::create($company->id, $company->owner()->id));
event(new InvoiceWasCreated($invoice, $company, Ninja::eventVars()));
$invoice = $invoice->service()->triggeredActions($request)->save();
event(new InvoiceWasCreated($invoice, $company, Ninja::eventVars()));
return $this->itemResponse($invoice);
}
}

View File

@ -60,7 +60,10 @@ class CreateAccount
private function create()
{
$sp794f3f = Account::create($this->request);
Account::reguard();
$sp794f3f = new Account();
$sp794f3f->fill($this->request);
$sp794f3f->referral_code = Str::random(32);
if (! $sp794f3f->key) {

View File

@ -58,6 +58,7 @@ class CreateCompany
$company->db = config('database.default');
$company->enabled_modules = config('ninja.enabled_modules');
$company->subdomain = isset($this->request['subdomain']) ? $this->request['subdomain'] : '';
$company->custom_fields = new \stdClass;
$company->save();
return $company;

View File

@ -33,7 +33,7 @@ trait Uploadable
if ($file) {
$path = UploadAvatar::dispatchNow($file, $company->company_key);
$path = str_replace(config("ninja.app_url"), "", $path);
//$path = str_replace(config("ninja.app_url"), "", $path);
info("the path {$path}");

View File

@ -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.22',
'app_version' => '5.1.23',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),

920
package-lock.json generated

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -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=5962ec6bcebeaac71d1b",
"/js/setup/setup.js": "/js/setup/setup.js?id=8d454e7090f119552a6c",
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
}

View File

@ -96,8 +96,8 @@ class Setup {
Axios.post(url, {})
.then((response) => {
try {
let win = window.open(response.data.url, '_blank');
win.focus();
//let win = window.open(response.data.url, '_blank');
//win.focus();
return this.handleSuccess(
this.checkPdfAlert,
@ -105,7 +105,7 @@ class Setup {
);
} catch (error) {
this.handleSuccess(this.checkPdfAlert, 'database-wrapper');
this.checkPdfAlert.textContent = `Success! You can preview test PDF here: ${response.data.url}`;
this.checkPdfAlert.textContent = `Success! PDF was generated succesfully.`;
}
})
.catch((error) => {