Merge branch 'trunk'

This commit is contained in:
Jérémy Munsch 2022-11-04 17:04:58 +01:00
commit 6523875860
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
2 changed files with 10 additions and 3 deletions

View file

@ -6,6 +6,7 @@ use App\Enums\Invoice\TaskType;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str;
use Kwaadpepper\CrudPolicies\Enums\CrudAction;
use Kwaadpepper\CrudPolicies\Enums\CrudType;
@ -255,7 +256,7 @@ class Invoice extends Model
Str::padLeft((Invoice::whereYear('created_at', Carbon::now()->isoFormat('YYYY'))
->whereMonth('created_at', Carbon::now()->isoFormat('MM'))
->count() + 1) ?: 1, 4, '0'),
Str::substr(Str::upper(Str::slug(User::query()->inRandomOrder()->first()->name)), 0, 1)
Str::substr(Str::upper(Str::slug(Auth::user()->name)), 0, 1)
);
$model->total_days = collect($model->tasks)
/** @var null|float $previous */

View file

@ -729,7 +729,9 @@ export default defineComponent({
value: "",
},
currentModale: Modale = {
id: this.schedules[userid][slotkey][day as any]["id"] ?? this.__("Nouveau"),
id:
this.schedules[userid][slotkey][day as any]["id"] ??
this.__("Nouveau"),
userid: userid,
slot: slotkey,
day: day,
@ -871,7 +873,11 @@ export default defineComponent({
if (search !== false && search !== null) {
this.searchText = search;
}
route += "?page=" + this.page;
if (route.indexOf("?") < 0) {
route += "?page=" + this.page;
} else {
route += "&page=" + this.page;
}
route += "&s=" + this.searchText;
this.loading = true;
axios