Merge branch 'develop' into trunk

This commit is contained in:
Jérémy Munsch 2022-08-31 12:48:54 +02:00
commit 03a0957404
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
4 changed files with 30 additions and 32 deletions

View file

@ -29,4 +29,6 @@ MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=noreply-sw@ldc.fr
MAIL_FROM_NAME="${APP_NAME}"
MAIL_LIST_SERVICEWEB=equipe.web@ldc.fr
MAIL_ADMIN=equipe.web@ldc.fr
MAIL_ADMIN=equipe.web@ldc.fr
LDC_STATUS_CHECKER_API_KEY=

View file

@ -251,7 +251,7 @@ class Invoice extends Model
static::creating(function (self $model) {
$model->ref = \sprintf(
'%s_%s_%s',
Carbon::now()->isoFormat('YYYY'),
Carbon::now()->isoFormat('YYYY-MM'),
Str::padLeft((Invoice::whereYear('created_at', Carbon::now()->isoFormat('YYYY'))
->whereMonth('created_at', Carbon::now()->isoFormat('MM'))
->count() + 1) ?: 1, 4, '0'),

View file

@ -7,12 +7,12 @@
label="label"
:options="labels"
>
<template #option="{ option }: { option: SelectModel }">
<template #option="{ label, color }: { label: string, color: string }">
<span
class="py-1 px-2"
:style="`background-color: ${(option as SelectModel).color};color: ${invertColor((option as SelectModel).color, true)};`"
:style="`background-color: ${color};color: ${invertColor(color, true)};`"
>
{{ String(option.label) }}
{{ String(label) }}
</span>
</template>
<template #no-options>
@ -44,14 +44,14 @@ export default defineComponent({
const json = String(this.$attrs.json ?? "{}"),
data = JSON.parse(json);
this.name = data.name;
for (let label of data.value ?? []) {
for (const label of data.value ?? []) {
this.selectedLabels.push({
label: label.name,
value: label.id,
color: label.color,
});
}
for (let label of data.labels) {
for (const label of data.labels) {
this.labels.push({
label: label.name,
value: label.id,

View file

@ -276,31 +276,27 @@
:searchable="true"
@input="setSelected"
>
<li
slot="list-footer"
class="pagination"
>
<button
@click.prevent="
$event.preventDefault();
page -= 1;
"
:disabled="!hasPrevPage"
class="btn btn-sm btn-primary mt-2 mb-2 ms-2 me-2"
<template #list-footer>
<li
class="pagination"
v-if="data.length"
>
Précédent
</button>
<button
@click.prevent="
$event.preventDefault();
page += 1;
"
:disabled="!hasNextPage"
class="btn btn-sm btn-primary mt-2 mb-2"
>
Suivant
</button>
</li>
<button
@click.prevent="page -= 1"
:disabled="!hasPrevPage"
class="btn btn-sm btn-primary mt-2 mb-2 ms-2 me-2"
>
{{ __("précédent") }}
</button>
<button
@click.prevent="page += 1"
:disabled="!hasNextPage"
class="btn btn-sm btn-primary mt-2 mb-2"
>
{{ __("suivant") }}
</button>
</li>
</template>
</VueSelect>
</div>
<div class="form-group mb-3">
@ -733,7 +729,7 @@ export default defineComponent({
value: "",
},
currentModale: Modale = {
id: this.schedules[userid][slotkey][day as any]["id"],
id: this.schedules[userid][slotkey][day as any]["id"] ?? this.__("Nouveau"),
userid: userid,
slot: slotkey,
day: day,