Merge branch 'dev4' of https://git.gamuza.fr/SPIP/gamutable into dev4
This commit is contained in:
commit
0174bb6436
4 changed files with 34 additions and 6 deletions
1
dist/assets/gamutable.9c52d4ff.js
vendored
Normal file
1
dist/assets/gamutable.9c52d4ff.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/gamutable.d4101043.js
vendored
1
dist/assets/gamutable.d4101043.js
vendored
File diff suppressed because one or more lines are too long
2
dist/manifest.json
vendored
2
dist/manifest.json
vendored
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"gamutable.js": {
|
"gamutable.js": {
|
||||||
"file": "assets/gamutable.d4101043.js",
|
"file": "assets/gamutable.9c52d4ff.js",
|
||||||
"src": "gamutable.js",
|
"src": "gamutable.js",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
|
|
|
@ -21,12 +21,23 @@
|
||||||
<i class="fa fa-filter fas"></i>
|
<i class="fa fa-filter fas"></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn var_gamutable"
|
class="btn var_gamutable rouge"
|
||||||
type="button"
|
type="button"
|
||||||
@click.stop="chargerJson()"
|
@click.stop="chargerJson()"
|
||||||
title="Forcer le rechargement"
|
title="Rechargement complet du tableau"
|
||||||
>
|
>
|
||||||
<i class="fa fa-refresh fas fa-sync"></i>
|
<i class="fa fa-refresh fas fa-sync-alt"></i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn var_gamutable"
|
||||||
|
type="button"
|
||||||
|
@click.stop="chargerJson('maj')"
|
||||||
|
:title="
|
||||||
|
'Mise à jour du tableau - dernière version de la base de donnée le : ' +
|
||||||
|
dateMaj
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<i class="fa fa-refresh fas fa-redo-alt"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
@ -482,6 +493,17 @@ onMounted(() => {
|
||||||
//~~~~~~~~~~~~~~~~~~~~~~~~~
|
//~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
// Computed
|
// Computed
|
||||||
//~~~~~~~~~~~~~~~~~~~~~~~~~
|
//~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
const dateMaj = computed(() => {
|
||||||
|
if (maj.value) {
|
||||||
|
const [laDate, lHeure] = maj.value.split(" ");
|
||||||
|
const [annee, mois, jour] = laDate.split("-");
|
||||||
|
const [heure, min, sec] = lHeure.split(":");
|
||||||
|
return `${jour}/${mois}/${annee} à ${heure}h${min}min${sec}sec`;
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const tableau = computed(() => {
|
const tableau = computed(() => {
|
||||||
setPages();
|
setPages();
|
||||||
if (!search.value && !filtreColModif.value) {
|
if (!search.value && !filtreColModif.value) {
|
||||||
|
@ -665,7 +687,13 @@ function gererData(data, id = null) {
|
||||||
if (parseInt(id) > 0) {
|
if (parseInt(id) > 0) {
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
let i = trouver_index(table.value, id);
|
let i = trouver_index(table.value, id);
|
||||||
table.value[i] = data[0];
|
//table.value[i] = data[0];
|
||||||
|
if (i >= 0) {
|
||||||
|
table.value[i] = data[0];
|
||||||
|
} else {
|
||||||
|
table.value.unshift(data[0]);
|
||||||
|
// table.value.push(data[index]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let i = trouver_index(table.value, id);
|
let i = trouver_index(table.value, id);
|
||||||
table.value.splice(i, 1);
|
table.value.splice(i, 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue