Skip to content

Commit 4ec4fdf

Browse files
author
Papoteur
authored
Merge branch 'master' into i18n2
2 parents 598ad5c + 6990a52 commit 4ec4fdf

File tree

12 files changed

+453
-446
lines changed

12 files changed

+453
-446
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ APP_LOCALE=fr
99
APP_TIMEZONE=Europe/Paris
1010

1111
LOG_CHANNEL=stack
12+
LOG_DEPRECATIONS_CHANNEL=null
13+
LOG_LEVEL=debug
1214

1315
DB_CONNECTION=mysql
1416
DB_HOST=127.0.0.1
@@ -22,10 +24,13 @@ OPS_SECRET="Your Consumer Secret Key"
2224

2325
BROADCAST_DRIVER=log
2426
CACHE_DRIVER=file
27+
FILESYSTEM_DISK=local
2528
QUEUE_CONNECTION=sync
2629
SESSION_DRIVER=file
2730
SESSION_LIFETIME=120
2831

32+
MEMCACHED_HOST=127.0.0.1
33+
2934
REDIS_HOST=127.0.0.1
3035
REDIS_PASSWORD=null
3136
REDIS_PORT=6379

app/Http/Controllers/EventNameController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public function index(Request $request)
2323
$ename = $ename->where('name', 'like', $Name.'%');
2424
}
2525

26-
$enameslist = $ename->get();
26+
$enameslist = $ename->paginate(21);
27+
$enameslist->appends($request->input())->links();
2728

2829
return view('eventname.index', compact('enameslist'));
2930
}

app/Matter.php

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function publication()
124124
public function grant()
125125
{
126126
return $this->hasOne(\App\Event::class)
127-
->whereCode('GRT')->withDefault();
127+
->whereIn('code', ['GRT', 'REG'])->withDefault();
128128
}
129129

130130
public function registration()
@@ -242,8 +242,8 @@ public static function filter($sortkey = 'id', $sortdir = 'desc', $multi_filter
242242
'fil.detail AS FilNo',
243243
'pub.event_date AS Published',
244244
'pub.detail AS PubNo',
245-
'grt.event_date AS Granted',
246-
'grt.detail AS GrtNo',
245+
DB::raw("COALESCE(grt.event_date, reg.event_date) AS Granted"),
246+
DB::raw("COALESCE(grt.detail, reg.detail) AS GrtNo"),
247247
'matter.id',
248248
'matter.container_id',
249249
'matter.parent_id',
@@ -256,21 +256,21 @@ public static function filter($sortkey = 'id', $sortdir = 'desc', $multi_filter
256256
->join('matter_category', 'matter.category_code', 'matter_category.code')
257257
->leftJoin(
258258
DB::raw('matter_actor_lnk clilnk
259-
JOIN actor cli ON cli.id = clilnk.actor_id'),
259+
JOIN actor cli ON cli.id = clilnk.actor_id'),
260260
function ($join) {
261261
$join->on('matter.id', 'clilnk.matter_id')->where('clilnk.role', 'CLI');
262262
}
263263
)
264264
->leftJoin(DB::raw('matter_actor_lnk cliclnk
265-
JOIN actor clic ON clic.id = cliclnk.actor_id'), function ($join) {
265+
JOIN actor clic ON clic.id = cliclnk.actor_id'), function ($join) {
266266
$join->on('matter.container_id', 'cliclnk.matter_id')->where([
267267
['cliclnk.role', 'CLI'],
268268
['cliclnk.shared', 1],
269269
]);
270270
})
271271
->leftJoin(
272272
DB::raw('matter_actor_lnk agtlnk
273-
JOIN actor agt ON agt.id = agtlnk.actor_id'),
273+
JOIN actor agt ON agt.id = agtlnk.actor_id'),
274274
function ($join) {
275275
$join->on('matter.id', 'agtlnk.matter_id')->where([
276276
['agtlnk.role', 'AGT'],
@@ -279,22 +279,22 @@ function ($join) {
279279
}
280280
)
281281
->leftJoin(DB::raw('matter_actor_lnk agtclnk
282-
JOIN actor agtc ON agtc.id = agtclnk.actor_id'), function ($join) {
282+
JOIN actor agtc ON agtc.id = agtclnk.actor_id'), function ($join) {
283283
$join->on('matter.container_id', 'agtclnk.matter_id')->where([
284284
['agtclnk.role', 'AGT'],
285285
['agtclnk.shared', 1],
286286
]);
287287
})
288288
->leftJoin(
289289
DB::raw('matter_actor_lnk applnk
290-
JOIN actor app ON app.id = applnk.actor_id'),
290+
JOIN actor app ON app.id = applnk.actor_id'),
291291
function ($join) {
292292
$join->on(DB::raw('ifnull(matter.container_id, matter.id)'), 'applnk.matter_id')->where('applnk.role', 'APP');
293293
}
294294
)
295295
->leftJoin(
296296
DB::raw('matter_actor_lnk dellnk
297-
JOIN actor del ON del.id = dellnk.actor_id'),
297+
JOIN actor del ON del.id = dellnk.actor_id'),
298298
function ($join) {
299299
$join->on(DB::raw('ifnull(matter.container_id, matter.id)'), 'dellnk.matter_id')->where('dellnk.role', 'DEL');
300300
}
@@ -308,11 +308,14 @@ function ($join) {
308308
->leftJoin('event AS grt', function ($join) {
309309
$join->on('matter.id', 'grt.matter_id')->where('grt.code', 'GRT');
310310
})
311+
->leftJoin('event AS reg', function ($join) {
312+
$join->on('matter.id', 'reg.matter_id')->where('reg.code', 'REG');
313+
})
311314
->leftJoin(DB::raw('event status
312-
JOIN event_name ON event_name.code = status.code AND event_name.status_event = 1'), 'matter.id', 'status.matter_id')
315+
JOIN event_name ON event_name.code = status.code AND event_name.status_event = 1'), 'matter.id', 'status.matter_id')
313316
->leftJoin(
314317
DB::raw('event e2
315-
JOIN event_name en2 ON e2.code=en2.code AND en2.status_event = 1'),
318+
JOIN event_name en2 ON e2.code = en2.code AND en2.status_event = 1'),
316319
function ($join) {
317320
$join->on('status.matter_id', 'e2.matter_id')->whereColumn('status.event_date', '<', 'e2.event_date');
318321
}
@@ -423,10 +426,12 @@ function ($join) {
423426
$query->where('pub.detail', 'LIKE', "$value%");
424427
break;
425428
case 'Granted':
426-
$query->where('grt.event_date', 'LIKE', "$value%");
429+
$query->where('grt.event_date', 'LIKE', "$value%")
430+
->orWhere('reg.event_date', 'LIKE', "$value%");
427431
break;
428432
case 'GrtNo':
429-
$query->where('grt.detail', 'LIKE', "$value%");
433+
$query->where('grt.detail', 'LIKE', "$value%")
434+
->orWhere('reg.detail', 'LIKE', "$value%");
430435
break;
431436
case 'responsible':
432437
$query->whereRaw("'$value' IN (matter.responsible, del.login)");

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"laminas/laminas-escaper": "^2.7",
1717
"laravel/framework": "^10.0",
1818
"laravel/ui": "^4.2",
19-
"phpoffice/phpword": "^0.18.0"
19+
"phpoffice/phpword": "^1.2.0"
2020
},
2121
"require-dev": {
2222
"laravel/tinker": "^2.5",

0 commit comments

Comments
 (0)