several changes

This commit is contained in:
naielv
2025-09-09 21:34:27 +02:00
parent 4f3d16326c
commit b069f7db61
6 changed files with 48 additions and 55 deletions

View File

@@ -113,7 +113,7 @@ PAGES.aulas = {
Asunto<br>
<input type="text" id="${field_asunto}" value=""><br><br>
</label>
<input type="hidden" id="${field_autor}" readonly value="${SUB_LOGGED_IN_ID || ""}">
<input type="hidden" id="${field_autor}" readonly value="">
</div>
<label>
Contenido - ¡Incluye el material a solicitar!<br>
@@ -134,7 +134,7 @@ PAGES.aulas = {
document.getElementById(field_asunto).value = data["Asunto"] || "";
document.getElementById(field_contenido).value =
data["Contenido"] || "";
document.getElementById(field_autor).value = data["Solicitante"] || "";
document.getElementById(field_autor).value = data["Solicitante"] || SUB_LOGGED_IN_ID || "";
}
if (typeof data == "string") {
TS_decrypt(data, SECRET, (data) => {
@@ -244,10 +244,10 @@ PAGES.aulas = {
<div style="max-width: 400px;">
<label>
Asunto<br>
<input type="text" id="${field_asunto}" value="${title}"><br><br>
<input type="text" id="${field_asunto}" value=""><br><br>
</label>
<input type="hidden" id="${field_autor}" readonly value="${SUB_LOGGED_IN_ID || ""}">
<input type="hidden" id="${field_fecha}" value="${mid.startsWith("diario-") ? mid.replace("diario-", "") : CurrentISODate()}">
<input type="hidden" id="${field_autor}" readonly value="">
<input type="hidden" id="${field_fecha}" value="">
</div>
<label>
Contenido<br>
@@ -265,11 +265,11 @@ PAGES.aulas = {
.once((data, key) => {
function load_data(data, ENC = "") {
document.getElementById(nameh1).innerText = key;
document.getElementById(field_asunto).value = data["Asunto"] || "";
document.getElementById(field_asunto).value = data["Asunto"] || title || "";
document.getElementById(field_contenido).value =
data["Contenido"] || "";
document.getElementById(field_autor).value = data["Autor"] || "";
document.getElementById(field_fecha).value = data["Fecha"] || CurrentISODate();
document.getElementById(field_autor).value = data["Autor"] || SUB_LOGGED_IN_ID || "";
document.getElementById(field_fecha).value = data["Fecha"] || mid.startsWith("diario-") ? mid.replace("diario-", "") : CurrentISODate();
}
if (typeof data == "string") {
TS_decrypt(data, SECRET, (data) => {

View File

@@ -26,7 +26,7 @@ PAGES.avisos = {
<legend>Valores</legend>
<label>
Fecha<br>
<input readonly disabled type="text" id="${field_fecha}" value="${CurrentISODate()}"><br><br>
<input readonly disabled type="text" id="${field_fecha}" value=""><br><br>
</label>
<label>
Asunto<br>
@@ -45,7 +45,7 @@ PAGES.avisos = {
</label>
<label>
Estado<br>
<input readonly disabled type="text" id="${field_estado}" value="%%">
<input readonly disabled type="text" id="${field_estado}" value="">
<br>
<button id="${btn_leer}">Leido</button>
<button id="${btn_desleer}">No leido</button>
@@ -87,14 +87,14 @@ PAGES.avisos = {
.once((data, key) => {
function load_data(data, ENC = "") {
document.getElementById(nameh1).innerText = key;
document.getElementById(field_fecha).value = data["Fecha"];
document.getElementById(field_fecha).value = data["Fecha"] || CurrentISODate() || "";
document.getElementById(field_asunto).value = data["Asunto"] || "";
document.getElementById(field_mensaje).value =
data["Mensaje"] || "";
document.getElementById(field_origen).value = data["Origen"] || "";
document.getElementById(field_destino).value =
data["Destino"] || "";
document.getElementById(field_estado).value = data["Estado"] || "";
document.getElementById(field_estado).value = data["Estado"] || "%%" || "";
document.getElementById(field_respuesta).value =
data["Respuesta"] || "";

View File

@@ -13,21 +13,21 @@ PAGES.comedor = {
var btn_guardar = safeuuid();
var btn_borrar = safeuuid();
container.innerHTML = `
<h1>Entrada del menú <code id="${nameh1}"></code></h1>
<fieldset style="float: left;">
<legend>Valores</legend>
<label>
Fecha<br>
<input type="date" id="${field_fecha}" value="${CurrentISODate()}"><br><br>
</label>
<label>
Platos<br>
<textarea id="${field_platos}"></textarea><br><br>
</label>
<button class="btn5" id="${btn_guardar}">Guardar</button>
<button class="rojo" id="${btn_borrar}">Borrar</button>
</fieldset>
`;
<h1>Entrada del menú <code id="${nameh1}"></code></h1>
<fieldset style="float: left;">
<legend>Valores</legend>
<label>
Fecha<br>
<input type="date" id="${field_fecha}" value=""><br><br>
</label>
<label>
Platos<br>
<textarea id="${field_platos}"></textarea><br><br>
</label>
<button class="btn5" id="${btn_guardar}">Guardar</button>
<button class="rojo" id="${btn_borrar}">Borrar</button>
</fieldset>
`;
gun
.get(TABLE)
.get("comedor")
@@ -35,7 +35,7 @@ PAGES.comedor = {
.once((data, key) => {
function load_data(data, ENC = "") {
document.getElementById(nameh1).innerText = key;
document.getElementById(field_fecha).value = data["Fecha"];
document.getElementById(field_fecha).value = data["Fecha"] || mid || CurrentISODate();
document.getElementById(field_platos).value =
data["Platos"] || "";
}

View File

@@ -23,7 +23,7 @@ PAGES.notas = {
Asunto<br>
<input type="text" id="${field_asunto}" value=""><br><br>
</label>
<input type="hidden" id="${field_autor}" value="${SUB_LOGGED_IN_ID || ""}">
<input type="hidden" id="${field_autor}" value="">
<div id="${div_actions}"></div>
</div>
<label>
@@ -55,7 +55,7 @@ PAGES.notas = {
document.getElementById(field_asunto).value = data["Asunto"] || "";
document.getElementById(field_contenido).value =
data["Contenido"] || "";
document.getElementById(field_autor).value = data["Autor"] || "";
document.getElementById(field_autor).value = data["Autor"] || SUB_LOGGED_IN_ID || "";
// Persona select
divact.innerHTML = "";

View File

@@ -29,7 +29,7 @@ PAGES.supercafe = {
<legend>Rellenar comanda</legend>
<label style="display: none;">
Fecha<br>
<input readonly disabled type="text" id="${field_fecha}" value="${CurrentISODate()}"><br><br>
<input readonly disabled type="text" id="${field_fecha}" value=""><br><br>
</label>
<label style="display: none;">
Persona<br>