Merge pull request #2273 from CihanSenturk/master

wizard company country issue (#2262)
This commit is contained in:
Cüneyt Şentürk 2021-10-04 10:01:10 +03:00 committed by GitHub
commit 877ff643c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,34 @@
<?php
namespace App\Listeners\Update\V21;
use App\Abstracts\Listeners\Update as Listener;
use App\Events\Install\UpdateFinished as Event;
class Version2126 extends Listener
{
const ALIAS = 'core';
const VERSION = '2.1.26';
/**
* Handle the event.
*
* @param $event
*
* @return void
*/
public function handle(Event $event)
{
if ($this->skipThisUpdate($event)) {
return;
}
$country_code = array_search(setting('company.country'), trans('countries'));
if ($country_code) {
setting()->set('company.country', $country_code);
setting()->save();
}
}
}

View File

@ -37,6 +37,7 @@ class Event extends Provider
'App\Listeners\Update\V21\Version2118',
'App\Listeners\Update\V21\Version2124',
'App\Listeners\Update\V21\Version2125',
'App\Listeners\Update\V21\Version2126',
],
'Illuminate\Auth\Events\Login' => [
'App\Listeners\Auth\Login',

View File

@ -86,7 +86,7 @@
<div class="col-6">
<base-input :label="translations.company.country">
<el-select name="country" v-model="company.country" filterable>
<el-select v-model="company.country" filterable>
<template slot="prefix">
<span class="el-input__suffix-inner el-select-icon">
<i :class="'select-icon-position el-input__icon fas fa-globe-americas'"></i>
@ -101,6 +101,8 @@
</el-option>
</el-select>
</base-input>
<input name="country" type="hidden" class="d-none" v-model="company.country"></input>
</div>
<div class="col-6 mb-0">