fehler begin
This commit is contained in:
parent
9f156a8d63
commit
1a415347c8
Binary file not shown.
@ -3,7 +3,7 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
import cherrypy
|
import cherrypy
|
||||||
from .database import KatfehlerDatabase_cl, KatursacheDatabase_cl, FehlerDatabase_cl
|
from .database import KatfehlerDatabase_cl, KatursacheDatabase_cl, FehlerDatabase_cl, KomponenteDatabase_cl, QsMitarbeiterDatabase_cl, SwEntwicklerDatabase_cl
|
||||||
# Method-Dispatching!
|
# Method-Dispatching!
|
||||||
|
|
||||||
# Übersicht Anforderungen / Methoden
|
# Übersicht Anforderungen / Methoden
|
||||||
@ -252,6 +252,11 @@ class Fehler_cl(object):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
self.db_o = FehlerDatabase_cl()
|
self.db_o = FehlerDatabase_cl()
|
||||||
|
self.dbKomponente_o = KomponenteDatabase_cl()
|
||||||
|
self.dbQsMitarbeiter_o = QsMitarbeiterDatabase_cl()
|
||||||
|
self.dbSwEntwickler_o = SwEntwicklerDatabase_cl()
|
||||||
|
self.dbKatFehler_o = KatfehlerDatabase_cl()
|
||||||
|
self.dbKatUrsache_o = KatursacheDatabase_cl()
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
def GET(self, id = None):
|
def GET(self, id = None):
|
||||||
@ -268,6 +273,12 @@ class Fehler_cl(object):
|
|||||||
if data_o != None:
|
if data_o != None:
|
||||||
retVal_o['data'] = adjustId_p(id, data_o)
|
retVal_o['data'] = adjustId_p(id, data_o)
|
||||||
|
|
||||||
|
retVal_o['komponente'] = self.dbKomponente_o.read_px()
|
||||||
|
retVal_o['qsmitarbeiter'] = self.dbQsMitarbeiter_o.read_px()
|
||||||
|
retVal_o['swentwickler'] = self.dbSwEntwickler_o.read_px()
|
||||||
|
retVal_o['katfehler'] = self.dbKatFehler_o.read_px()
|
||||||
|
retVal_o['katursache'] = self.dbKatUrsache_o.read_px()
|
||||||
|
|
||||||
return retVal_o
|
return retVal_o
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
@ -287,7 +298,13 @@ class Fehler_cl(object):
|
|||||||
id_s = data_opl["id_s"]
|
id_s = data_opl["id_s"]
|
||||||
data_o = {
|
data_o = {
|
||||||
'name': data_opl["name_s"],
|
'name': data_opl["name_s"],
|
||||||
'id': data_opl["id_s"]
|
'id': data_opl["id_s"],
|
||||||
|
'komponente-id': data_opl["komponente-id_s"],
|
||||||
|
'katfehler-id': data_opl["katfehler-id_s"],
|
||||||
|
'katursache-id': data_opl["katursache-id_s"],
|
||||||
|
'qsmitarbeiter-id': data_opl["qsmitarbeiter-id_s"],
|
||||||
|
'swentwickler-id': data_opl["swentwickler-id_s"],
|
||||||
|
'status': data_opl["status_s"]
|
||||||
}
|
}
|
||||||
# Update-Operation
|
# Update-Operation
|
||||||
retVal_o['id'] = id_s
|
retVal_o['id'] = id_s
|
||||||
@ -310,7 +327,14 @@ class Fehler_cl(object):
|
|||||||
# hier müsste man prüfen, ob die Daten korrekt vorliegen!
|
# hier müsste man prüfen, ob die Daten korrekt vorliegen!
|
||||||
|
|
||||||
data_o = {
|
data_o = {
|
||||||
'name': data_opl["name_s"]
|
'name': data_opl["name_s"],
|
||||||
|
'id': data_opl["id_s"],
|
||||||
|
'komponente-id': data_opl["komponente-id_s"],
|
||||||
|
'katfehler-id': data_opl["katfehler-id_s"],
|
||||||
|
'katursache-id': data_opl["katursache-id_s"],
|
||||||
|
'qsmitarbeiter-id': data_opl["qsmitarbeiter-id_s"],
|
||||||
|
'swentwickler-id': data_opl["swentwickler-id_s"],
|
||||||
|
'status': data_opl["status_s"]
|
||||||
}
|
}
|
||||||
# Create-Operation
|
# Create-Operation
|
||||||
id_s = self.db_o.create_px(data_o)
|
id_s = self.db_o.create_px(data_o)
|
||||||
|
@ -39,6 +39,11 @@ APP.Application_cl = class {
|
|||||||
this.listKatUrsache_o = new APP.ListView_cl('katursache', '/katursache/', 'katursachelist.tpl');
|
this.listKatUrsache_o = new APP.ListView_cl('katursache', '/katursache/', 'katursachelist.tpl');
|
||||||
this.detailKatUrsache_o = new APP.DetailView_cl('katursache', '/katursache/', 'katursachedetail.tpl');
|
this.detailKatUrsache_o = new APP.DetailView_cl('katursache', '/katursache/', 'katursachedetail.tpl');
|
||||||
|
|
||||||
|
this.listFehler_o = new APP.ListView_cl('fehler', '/fehler/', 'fehlerlist.tpl');
|
||||||
|
this.detailFehler_o = new APP.DetailView_cl('fehler', '/fehler/', 'fehlerdetail.tpl');
|
||||||
|
this.detailFehlerQs_o = new APP.DetailView_cl('fehler', '/fehler/', 'fehlerqsdetail.tpl');
|
||||||
|
this.detailFehlerSw_o = new APP.DetailView_cl('fehler', '/fehler/', 'fehlerswdetail.tpl');
|
||||||
|
|
||||||
// this.listSources_o = new APP.ListView_cl('source', '/source/', 'sourceslist.tpl');
|
// this.listSources_o = new APP.ListView_cl('source', '/source/', 'sourceslist.tpl');
|
||||||
// this.detailSources_o = new APP.SourceDetailView_cl('source', '/source/', 'sourcedetail.tpl');
|
// this.detailSources_o = new APP.SourceDetailView_cl('source', '/source/', 'sourcedetail.tpl');
|
||||||
// this.listEvaluated_o = new APP.ListView_cl('evaluated', '/evaluated/', 'evaluatedlist.tpl');
|
// this.listEvaluated_o = new APP.ListView_cl('evaluated', '/evaluated/', 'evaluatedlist.tpl');
|
||||||
@ -125,6 +130,25 @@ APP.Application_cl = class {
|
|||||||
// Detailformular im Content-Bereich anzeigen
|
// Detailformular im Content-Bereich anzeigen
|
||||||
self_opl.setContent_p(self_opl.detailKatUrsache_o, data_apl[1]);
|
self_opl.setContent_p(self_opl.detailKatUrsache_o, data_apl[1]);
|
||||||
break;
|
break;
|
||||||
|
case 'fehler':
|
||||||
|
self_opl.setContent_p(self_opl.listFehler_o, data_apl[1]);
|
||||||
|
break;
|
||||||
|
case 'fehler.add':
|
||||||
|
// (leeres) Detailformular im Content-Bereich anzeigen
|
||||||
|
self_opl.setContent_p(self_opl.detailFehler_o, data_apl[1]);
|
||||||
|
break;
|
||||||
|
case 'fehler.edit':
|
||||||
|
// Detailformular im Content-Bereich anzeigen
|
||||||
|
self_opl.setContent_p(self_opl.detailFehler_o, data_apl[1]);
|
||||||
|
break;
|
||||||
|
case 'fehler.editqs':
|
||||||
|
// Detailformular im Content-Bereich anzeigen
|
||||||
|
self_opl.setContent_p(self_opl.detailFehlerQs_o, data_apl[1]);
|
||||||
|
break;
|
||||||
|
case 'fehler.editsw':
|
||||||
|
// Detailformular im Content-Bereich anzeigen
|
||||||
|
self_opl.setContent_p(self_opl.detailFehlerSw_o, data_apl[1]);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.warn('[Application_cl] unbekannte app-Notification: '+data_apl[0]);
|
console.warn('[Application_cl] unbekannte app-Notification: '+data_apl[0]);
|
||||||
break;
|
break;
|
||||||
|
BIN
Praktikum3/bt/templates/.DS_Store
vendored
BIN
Praktikum3/bt/templates/.DS_Store
vendored
Binary file not shown.
20
Praktikum3/bt/templates/fehlerdetail.tpl
Normal file
20
Praktikum3/bt/templates/fehlerdetail.tpl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<!-- Template -->
|
||||||
|
<form id="idForm" class="clContent">
|
||||||
|
<h2 id="idContentHeader" class="clContentHeader">
|
||||||
|
Pflege Fehlerkategorien
|
||||||
|
</h2>
|
||||||
|
<div id="idContentArea" class="clContentArea">
|
||||||
|
|
||||||
|
<input type="hidden" value="#context.data.id#" id="id_s" name="id_s" />
|
||||||
|
<div class="clFormRow">
|
||||||
|
<label for="name_s">Name <span class="clRequired"></span></label>
|
||||||
|
<input type="text" value="#context.data.name#" id="name_s" name="name_s" autofocus required />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="idButtonArea" class="clButtonArea">
|
||||||
|
<button data-action="back" class="clButton">Zurück</button>
|
||||||
|
<button data-action="save" class="clButton">Speichern</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<!-- EOF -->
|
27
Praktikum3/bt/templates/fehlerlist.tpl
Executable file
27
Praktikum3/bt/templates/fehlerlist.tpl
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
<!-- Template -->
|
||||||
|
<div id="idListContent" class="clContent">
|
||||||
|
<h2 id="idContentHeader" class="clContentHeader">
|
||||||
|
Pflege SW-Mitarbeiter
|
||||||
|
</h2>
|
||||||
|
<div id="idContentArea" class="clContentArea">
|
||||||
|
<table id="idList">
|
||||||
|
<tr class="listheader"><th>Name</th><th>ID</th><th>Komponente-ID</th><th>(KatFehler-ID)</th><th>(KatUrsache-ID)</th><th>(QS)</th><th>(SW)</th><th>Status</th></tr>
|
||||||
|
@var rows_o = context['data'];@
|
||||||
|
@for var key_s in rows_o@
|
||||||
|
<tr id='#key_s#'>
|
||||||
|
@var row_o = rows_o[key_s];@
|
||||||
|
<td>#row_o['name']#</td><td>#row_o['id']#</td><td>#row_o['komponente-id']#</td><td>#row_o['katfehler-id']#</td><td>#row_o['katursache-id']#</td><td>#row_o['qsmitarbeiter-id']#</td><td>#row_o['swentwickler-id']#</td><td>#row_o['status']#</td>
|
||||||
|
</tr>
|
||||||
|
@endfor@
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div id="idButtonArea" class="clButtonArea">
|
||||||
|
<button data-action="add" class="clButton">Hinzufügen</button>
|
||||||
|
<button data-action="edit" class="clButton">Bearbeiten</button>
|
||||||
|
<button data-action="editqs" class="clButton">Bearbeiten QS</button>
|
||||||
|
<button data-action="editsw" class="clButton">Bearbeiten SW</button>
|
||||||
|
<button data-action="delete" class="clButton">(Löschen)</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- EOF -->
|
20
Praktikum3/bt/templates/fehlerqsdetail.tpl
Normal file
20
Praktikum3/bt/templates/fehlerqsdetail.tpl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<!-- Template -->
|
||||||
|
<form id="idForm" class="clContent">
|
||||||
|
<h2 id="idContentHeader" class="clContentHeader">
|
||||||
|
Pflege Fehlerkategorien
|
||||||
|
</h2>
|
||||||
|
<div id="idContentArea" class="clContentArea">
|
||||||
|
|
||||||
|
<input type="hidden" value="#context.data.id#" id="id_s" name="id_s" />
|
||||||
|
<div class="clFormRow">
|
||||||
|
<label for="name_s">Name <span class="clRequired"></span></label>
|
||||||
|
<input type="text" value="#context.data.name#" id="name_s" name="name_s" autofocus required />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="idButtonArea" class="clButtonArea">
|
||||||
|
<button data-action="back" class="clButton">Zurück</button>
|
||||||
|
<button data-action="save" class="clButton">Speichern</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<!-- EOF -->
|
20
Praktikum3/bt/templates/fehlerswdetail.tpl
Normal file
20
Praktikum3/bt/templates/fehlerswdetail.tpl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<!-- Template -->
|
||||||
|
<form id="idForm" class="clContent">
|
||||||
|
<h2 id="idContentHeader" class="clContentHeader">
|
||||||
|
Pflege Fehlerkategorien
|
||||||
|
</h2>
|
||||||
|
<div id="idContentArea" class="clContentArea">
|
||||||
|
|
||||||
|
<input type="hidden" value="#context.data.id#" id="id_s" name="id_s" />
|
||||||
|
<div class="clFormRow">
|
||||||
|
<label for="name_s">Name <span class="clRequired"></span></label>
|
||||||
|
<input type="text" value="#context.data.name#" id="name_s" name="name_s" autofocus required />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="idButtonArea" class="clButtonArea">
|
||||||
|
<button data-action="back" class="clButton">Zurück</button>
|
||||||
|
<button data-action="save" class="clButton">Speichern</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<!-- EOF -->
|
Loading…
x
Reference in New Issue
Block a user