changing the editProfil Modal from an Accordion to a select

This commit is contained in:
SimonGschnell
2024-01-08 15:19:18 +01:00
parent e479a7aa49
commit 5b597dbc31
10 changed files with 227 additions and 124 deletions
+3 -1
View File
@@ -49,6 +49,8 @@ require_once('dbupdate_3.4/29835_uhstat1_erfassung_der_uhstat1_daten_ueber_das_b
require_once('dbupdate_3.4/33714_erhoehter_studienbeitrag_fuer_drittsaatenangehoerig.php');
require_once('dbupdate_3.4/25999_C4_ma0594.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -221,7 +223,7 @@ $tabellen=array(
"public.tbl_benutzerfunktion" => array("benutzerfunktion_id","fachbereich_kurzbz","uid","oe_kurzbz","funktion_kurzbz","semester", "datum_von","datum_bis", "updateamum","updatevon","insertamum","insertvon","ext_id","bezeichnung","wochenstunden"),
"public.tbl_benutzergruppe" => array("uid","gruppe_kurzbz","studiensemester_kurzbz","updateamum","updatevon","insertamum","insertvon","ext_id"),
"public.tbl_bewerbungstermine" => array("bewerbungstermin_id","studiengang_kz","studiensemester_kurzbz","beginn","ende","nachfrist","nachfrist_ende","anmerkung", "insertamum", "insertvon", "updateamum", "updatevon","studienplan_id","nationengruppe_kurzbz"),
"public.tbl_cis_profil_update" => array("uid","profil_changes","change_timestamp"),
"public.tbl_cis_profil_update" => array("profil_update_id","uid","requested_change","change_timestamp"),
"public.tbl_buchungstyp" => array("buchungstyp_kurzbz","beschreibung","standardbetrag","standardtext","aktiv","credit_points"),
"public.tbl_dokument" => array("dokument_kurzbz","bezeichnung","ext_id","bezeichnung_mehrsprachig","dokumentbeschreibung_mehrsprachig","ausstellungsdetails"),
"public.tbl_dokumentprestudent" => array("dokument_kurzbz","prestudent_id","mitarbeiter_uid","datum","updateamum","updatevon","insertamum","insertvon","ext_id"),
+41 -7
View File
@@ -1,17 +1,29 @@
<?php
if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_cis_profil_update LIMIT 1"))
{
$qry = "CREATE TABLE public.tbl_cis_profil_update (
profil_update_id INTEGER NOT NULL,
uid VARCHAR(32) NOT NULL,
profil_changes jsonb NOT NULL,
requested_change jsonb NOT NULL,
change_timestamp TIMESTAMP NOT NULL,
CONSTRAINT tbl_cis_profil_update_pk PRIMARY KEY(uid),
CONSTRAINT tbl_cis_profil_update_pk PRIMARY KEY(profil_update_id),
CONSTRAINT tbl_cis_profil_update_fk FOREIGN KEY(uid) REFERENCES public.tbl_benutzer(uid)
);
CREATE SEQUENCE public.tbl_cis_profil_update_id_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.tbl_cis_profil_update ALTER COLUMN profil_update_id SET DEFAULT nextval('public.tbl_cis_profil_update_id_seq');
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_cis_profil_update TO vilesci;
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_cis_profil_update TO web;";
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_cis_profil_update TO web;
GRANT SELECT, UPDATE ON public.tbl_cis_profil_update_id_seq TO vilesci;
GRANT SELECT, UPDATE ON public.tbl_cis_profil_update_id_seq TO web;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_cis_profil_update: '.$db->db_last_error().'</strong><br>';
@@ -19,13 +31,35 @@
echo '<br>public.tbl_cis_profil_update: table created';
}
/* else{
$qry = "DROP TABLE public.tbl_cis_profil_update;";
if(!$db->db_query($qry))
echo '<strong> was not able to delete public.tbl_cis_profil_update: '.$db->db_last_error().'</strong><br>';
else
echo '<br>public.tbl_cis_profil_update: table deleted';
} */
if($db->db_num_rows($result)==0)
/* if($db->db_num_rows($result)==0)
{
$qry = "INSERT INTO public.tbl_cis_profil_update(uid, profil_changes, change_timestamp) VALUES('ma0594', '{\"test\":\"data\"}', NOW());";
$qry = "INSERT INTO public.tbl_cis_profil_update(uid, profil_data, profil_changes, change_timestamp) VALUES('ma0594','{\"test\":\"data\"}', NOW());";
if(!$db->db_query($qry))
echo '<strong>Prüfungstyp: '.$db->db_last_error().'</strong><br>';
else
echo '<br>test eintrag in public.tbl_cis_profil_update hinzugefügt';
}
} */
//! was used to add an extra column to the table after the table was already created
/*
if(!$result = @$db->db_query("SELECT profil_data FROM public.tbl_cis_profil_update LIMIT 1"))
{
$qry = "ALTER TABLE public.tbl_cis_profil_update ADD COLUMN profil_data jsonb;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_cis_profil_update: '.$db->db_last_error().'</strong><br>';
else
echo '<br>public.tbl_cis_profil_update: Spalte profil_data hinzugefuegt';
} */