Merge pull request #8813 from turbo124/v5-develop

v5.7.15
This commit is contained in:
David Bomba 2023-09-20 13:22:35 +10:00 committed by GitHub
commit c560c34aae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 19 deletions

View File

@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v1 uses: actions/checkout@v1
with: with:
ref: v5-develop ref: v5-develop
- name: Copy .env file - name: Copy .env file
run: | run: |
cp .env.example .env cp .env.example .env
@ -46,7 +46,15 @@ jobs:
git checkout main git checkout main
npm i npm i
npm run build npm run build
cp -r dist/react/* ../public/react
for file in dist/react/* ; do
filename=$(basename -- "$file")
extension="${filename##*.}"
filename="${filename%.*}"
version=${{ github.event.release.tag_name }}
cp $file ../public/react/$filename"."$version"."$extension
done
mkdir -p ../public/tinymce_6.4.2/tinymce/js/ mkdir -p ../public/tinymce_6.4.2/tinymce/js/
cp -r node_modules/tinymce ../public/tinymce_6.4.2/tinymce/js/ cp -r node_modules/tinymce ../public/tinymce_6.4.2/tinymce/js/
cd .. cd ..

View File

@ -1 +1 @@
5.7.14 5.7.15

View File

@ -61,6 +61,8 @@ class CreateTestData extends Command
protected $invoice_repo; protected $invoice_repo;
protected $count;
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -12,7 +12,6 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class ReactBuilder extends Command class ReactBuilder extends Command
{ {
@ -48,13 +47,11 @@ class ReactBuilder extends Command
public function handle() public function handle()
{ {
$includes = ''; $includes = '';
Storage::makeDirectory(public_path('react'));
$directoryIterator = new \RecursiveDirectoryIterator(public_path('react'), \RecursiveDirectoryIterator::SKIP_DOTS); $directoryIterator = new \RecursiveDirectoryIterator(public_path('react'), \RecursiveDirectoryIterator::SKIP_DOTS);
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) { foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
if ($file->getExtension() == 'js') { if ($file->getExtension() == 'js' && stripos($file->getFileName(), config('ninja.app_version')) !== false) {
if (str_contains($file->getFileName(), 'index-')) { if (str_contains($file->getFileName(), 'index-')) {
$includes .= '<script type="module" crossorigin src="/react/'.$file->getFileName().'"></script>'."\n"; $includes .= '<script type="module" crossorigin src="/react/'.$file->getFileName().'"></script>'."\n";
} else { } else {
@ -62,7 +59,7 @@ class ReactBuilder extends Command
} }
} }
if (str_contains($file->getFileName(), '.css')) { if (str_contains($file->getFileName(), '.css' && stripos($file->getFileName(), config('ninja.app_version')) !== false)) {
$includes .= '<link rel="stylesheet" href="/react/'.$file->getFileName().'">'."\n"; $includes .= '<link rel="stylesheet" href="/react/'.$file->getFileName().'">'."\n";
} }
} }

View File

@ -418,6 +418,8 @@ class LoginController extends BaseController
->setReturnType(Model\User::class) ->setReturnType(Model\User::class)
->execute(); ->execute();
nlog($user);
if ($user) { if ($user) {
$account = request()->input('account'); $account = request()->input('account');
@ -437,15 +439,15 @@ class LoginController extends BaseController
} }
//If this is a result user/email combo - lets add their OAuth details details //If this is a result user/email combo - lets add their OAuth details details
if ($existing_login_user = MultiDB::hasUser(['email' => $email])) { // if ($existing_login_user = MultiDB::hasUser(['email' => $email])) {
if (!$existing_login_user->account) { // if (!$existing_login_user->account) {
return response()->json(['message' => 'User exists, but not attached to any companies! Orphaned user!'], 400); // return response()->json(['message' => 'User exists, but not attached to any companies! Orphaned user!'], 400);
} // }
Auth::login($existing_login_user, true); // Auth::login($existing_login_user, true);
return $this->existingLoginUser($user->getId(), 'microsoft'); // return $this->existingLoginUser($user->getId(), 'microsoft');
} // }
// Signup! // Signup!

View File

@ -15,8 +15,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => env('APP_VERSION','5.7.14'), 'app_version' => env('APP_VERSION','5.7.15'),
'app_tag' => env('APP_TAG','5.7.14'), 'app_tag' => env('APP_TAG','5.7.15'),
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''), 'api_secret' => env('API_SECRET', ''),

View File

@ -94,8 +94,8 @@
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500"> <td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500">
<input type="checkbox" class="form-checkbox cursor-pointer" onchange="appendToElement('multiple-downloads', '{{ $document->hashed_id }}')" /> <input type="checkbox" class="form-checkbox cursor-pointer" onchange="appendToElement('multiple-downloads', '{{ $document->hashed_id }}')" />
</td> </td>
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500"> <td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500 truncate">
{{ Illuminate\Support\Str::limit($document->name, 40) }} {{ $document->name }}
</td> </td>
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500"> <td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500">