Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1f473a1c8d
|
|
@ -48,8 +48,9 @@ public function resolutionBasis(Request $request){
|
|||
$resolution['department_id'] = $entry['Department_ID'];
|
||||
$resolution['resolution_id'] = $entry['Resolution_ID'];
|
||||
$resolution['resolutionbasis'] = $entry['ResolutionBasis'];
|
||||
$resolution['foreign_id'] = $entry['ID'];
|
||||
|
||||
$res = Resolutionbasis::where('contract_id', $resolution['contract_id'])->first();
|
||||
$res = Resolutionbasis::where('foreign_id', $resolution['foreign_id'])->first();
|
||||
if($res == null){
|
||||
Resolutionbasis::create($resolution);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,11 +74,19 @@ public function setup()
|
|||
], function() {
|
||||
return Country::all()->pluck('name', 'id')->toArray();
|
||||
}, function($values) {
|
||||
//$values = is_array($values)?$values:array($values);
|
||||
foreach (json_decode($values) as $key => $value) {
|
||||
$this->crud->query = $this->crud->query->whereHas('countries', function ($query) use ($value) {
|
||||
$query->where('country_id', $value);
|
||||
});
|
||||
if(!is_array($values)){
|
||||
foreach (json_decode($values) as $key => $value) {
|
||||
$this->crud->query = $this->crud->query->whereHas('countries', function ($query) use ($value) {
|
||||
$query->where('country_id', $value);
|
||||
});
|
||||
}
|
||||
}
|
||||
else{
|
||||
foreach ($values as $key => $value) {
|
||||
$this->crud->query = $this->crud->query->whereHas('countries', function ($query) use ($value) {
|
||||
$query->where('country_id', $value);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('resolutionbasis', function (Blueprint $table) {
|
||||
$table->bigInteger('foreign_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('resolutionbasis', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
<div class="card">
|
||||
<a href="{{backpack_url('application')}}?state=new" class="text-dark" style="text-decoration: none">
|
||||
<div class="card-body">
|
||||
<div class="text-value">{{ App\Models\Application::where('accepted_by', null)->orWhere('accepted_by', '')->where('state', 'applied')->count() }} <small>@lang('app.dashboard.new')</small></div>
|
||||
<div class="text-value">{{ App\Models\Application::where('state', 'new')->orWhere('state', 'New')->count() }} <small>@lang('app.dashboard.new')</small></div>
|
||||
<div class="progress progress-xs my-2">
|
||||
<div class="progress-bar bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div><small class="text-muted">@lang('app.dashboard.new_applications')</small>
|
||||
|
|
|
|||
Loading…
Reference in New Issue