customers.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <button type="button" class="btn btn-info" ng-click="save()">
  2. <span class="glyphicon glyphicon-floppy-disk"></span> Speichern
  3. </button>
  4. <br/><br/>
  5. <form role="form">
  6. <table class="table table-bordered table-striped" style="width: auto;">
  7. <tr>
  8. <th style="width: 230px;">Kunde</th>
  9. <th style="width: 130px;">Aktiv</th>
  10. <th style="width: 180px;">System</th>
  11. <th style="width: 140px;">Start</th>
  12. <th style="width: 140px;">Ende</th>
  13. <th style="width: 190px;">Erster Bericht</th>
  14. <th style="width: 130px;">Arbeitstage</th>
  15. <th style="width: 250px;">Bundesland</th>
  16. <th style="width: 100px;">PLZ</th>
  17. <th style="width: 200px;">Ort</th>
  18. <th style="width: 220px;">Optionen</th>
  19. </tr>
  20. <tr>
  21. <td><input ng-model="Filter.kunde"/></td>
  22. <td>
  23. <div class="dropdown">
  24. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{domain.aktiv[Filter.aktiv]||'alle'}}&nbsp;<b class="caret"></b></a>
  25. <ul class="dropdown-menu" role="menu">
  26. <li><a ng-click="Filter.aktiv=''">alle</a></li>
  27. <li class="divider"></li>
  28. <li ng-repeat="(key,val) in domain.aktiv"><a ng-click="Filter.aktiv=key">{{val}}</a></li>
  29. </ul>
  30. </div>
  31. </td>
  32. <td>
  33. <div class="dropdown">
  34. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{Filter.system||'alle'}}&nbsp;<b class="caret"></b></a>
  35. <ul class="dropdown-menu" role="menu">
  36. <li><a ng-click="Filter.system=''">alle</a></li>
  37. <li class="divider"></li>
  38. <li ng-repeat="val in domain.system"><a ng-click="Filter.system=val">{{val}}</a></li>
  39. </ul>
  40. </div>
  41. </td>
  42. <td></td>
  43. <td></td>
  44. <td></td>
  45. <td>
  46. <div class="dropdown">
  47. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{Filter.woche||'alle'}}&nbsp;<b class="caret"></b></a>
  48. <ul class="dropdown-menu" role="menu">
  49. <li><a ng-click="Filter.woche=''">alle</a></li>
  50. <li class="divider"></li>
  51. <li ng-repeat="val in domain.woche"><a ng-click="Filter.woche=val">{{val}}</a></li>
  52. </ul>
  53. </div>
  54. </td>
  55. <td>
  56. <div class="dropdown">
  57. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{domain.bundesland[Filter.bundesland]||'alle'}}&nbsp;<b class="caret"></b></a>
  58. <ul class="dropdown-menu" role="menu">
  59. <li><a ng-click="Filter.bundesland=''">alle</a></li>
  60. <li class="divider"></li>
  61. <li ng-repeat="(key,val) in domain.bundesland"><a ng-click="Filter.bundesland=key">{{val}}</a></li>
  62. </ul>
  63. </div>
  64. </td>
  65. <td></td>
  66. <td></td>
  67. <td></td>
  68. </tr>
  69. <tr ng-repeat="zeile in kunden | filter:Filter">
  70. <td><strong>{{zeile.kunde}}</strong></td>
  71. <td><select class="form-control" ng-model="zeile.aktiv" ng-options="k as v for (k,v) in domain.aktiv"></select></td>
  72. <td>
  73. <div class="input-group">
  74. <div class="input-group-addon label-{{zeile.system}}">{{firstChar(zeile.system)}}</div>
  75. <select class="form-control" ng-model="zeile.system" ng-options="v for v in domain.system"></select>
  76. </div>
  77. </td>
  78. <td><input class="form-control" type="time" ng-model="zeile.start_soll"/></td>
  79. <td><input class="form-control" type="time" ng-model="zeile.ende_soll"/></td>
  80. <td><input class="form-control" type="date" ng-model="zeile.erster_status"/></td>
  81. <td><select class="form-control" ng-model="zeile.woche" ng-options="v for v in domain.woche"></select></td>
  82. <td>
  83. <div class="input-group">
  84. <div class="input-group-addon">{{zeile.bundesland}}</div>
  85. <select class="form-control" ng-model="zeile.bundesland" ng-options="k as v for (k,v) in domain.bundesland"></select>
  86. </div>
  87. </td>
  88. <td><input class="form-control" ng-model="zeile.plz"/></td>
  89. <td><input class="form-control" ng-model="zeile.ort"/></td>
  90. <td>
  91. <a ng-href="#/overview/{{zeile.kunde}}/all/all"><button type="button" class="btn btn-default" title="Fehlermeldungen"><span class="glyphicon glyphicon-exclamation-sign"></span></button></a>
  92. <a ng-href="#/stats/{{zeile.kunde}}"><button type="button" class="btn btn-default" title="Statistik"><span class="glyphicon glyphicon-stats"></span></button></a>
  93. <a ng-href="#/config/{{zeile.kunde}}/current"><button type="button" class="btn btn-default" title="Konfiguration"><span class="glyphicon glyphicon-list-alt"></span></button></a>
  94. <a><button type="button" class="btn btn-default" title="Kalender"><span class="glyphicon glyphicon-calendar"></span></button></a>
  95. </td>
  96. </tr>
  97. </table>
  98. </form>
  99. <!-- Modal -->
  100. <div class="modal fade" id="fehler-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  101. <div class="modal-dialog">
  102. <div class="modal-content">
  103. <div class="modal-header">
  104. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  105. <h4 class="modal-title" id="myModalLabel">Fehlerbericht {{current.kunde}} - {{current.datum}}</h4>
  106. </div>
  107. <div class="modal-body">
  108. <pre>
  109. {{current.fehler.logdatei}}
  110. </pre>
  111. <div class="logdatei" ng-repeat="e in current.fehler.fehlerbericht">
  112. <p class="modell" ng-class="{'rot':e.ErrorLevel < 3}">{{e.Type}}: {{e.Name}}</p>
  113. <p class="dateiname">
  114. Dateiname: {{e.Filename}}<br />
  115. Stand: {{dateFormat(e.Modified)}} ({{e.LastChangedDays}} Tage)
  116. </p>
  117. <div ng-show="e.Errors.length > 0">
  118. <ul class="fehler" ng-show="e.Type=='Modell'">
  119. <li ng-repeat="error in e.Errors"><a href="http://wiki.global-cube.de/{{error.Number}}">{{error.Number}}</a>:
  120. ({{error.Level}}) {{error.Message}}</li>
  121. </ul>
  122. <ul class="fehler" ng-show="e.Type=='WebCreator'">
  123. <li ng-repeat="error in e.Errors"><a href="http://wiki.global-cube.de/{{error.Number}}">{{error.Number}}</a>:
  124. ({{error.Level}}) {{error.Message}}</li>
  125. </ul>
  126. <table class="ft" ng-show="e.Type=='Portal'||e.Type=='Versand'">
  127. <tbody ng-repeat="error in e.Errors">
  128. <tr>
  129. <td rowspan="5" class="number">{{$index+1}}
  130. <td>Datei:</td>
  131. <td>{{error.Filename}}</td>
  132. </tr>
  133. <tr>
  134. <td>Stand:</td>
  135. <td>{{error.Modified}}</td>
  136. </tr>
  137. <tr>
  138. <td>Benutzer:</td>
  139. <td>{{error.User}}</td>
  140. </tr>
  141. <tr>
  142. <td>Bericht:</td>
  143. <td>{{error.Report}} (Schicht {{error.Layer}})</td>
  144. </tr>
  145. <tr class="strich">
  146. <td>Empfänger:</td>
  147. <td>{{error.MailTo}}</td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. </div>
  152. </div>
  153. <table class="table table-hover table-bordered">
  154. <tr>
  155. <th>Benutzer</th>
  156. <td>
  157. <input type="text" ng-model="current.fehler.benutzer" />
  158. </td>
  159. </tr>
  160. <tr>
  161. <th>Kommentar</th>
  162. <td>
  163. <label>
  164. <textarea cols="40" rows="5">{{current.fehler.kommentar}}</textarea>
  165. </label>
  166. </td>
  167. </tr>
  168. <tr>
  169. <th>Anzahl Fehler</th>
  170. <td>
  171. <label>
  172. <input type="text" ng-model="current.fehler.anzahl"/>
  173. </label>
  174. </td>
  175. </tr>
  176. <tr>
  177. <th>Bearbeitungsstand</th>
  178. <td>
  179. <label>
  180. <select ng-model="current.fehler.bearbeitet" ng-options="k as v for (k,v) in domain.bearbeitet"></select>
  181. </label>
  182. </td>
  183. </tr>
  184. </table>
  185. </div>
  186. <div class="modal-footer">
  187. <button type="button" class="btn btn-primary" ng-click="saveComments()" data-dismiss="modal">Speichern</button>
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. <style>
  193. .table tbody tr td {
  194. vertical-align: middle;
  195. }
  196. .label-0 {
  197. background-color: #aaaaaa;
  198. }
  199. .label-1 {
  200. background-color: #bbbb00;
  201. }
  202. .label-2 {
  203. background-color: #bb8800;
  204. }
  205. .label-3 {
  206. background-color: #bb0000;
  207. }
  208. table.ft {
  209. border: 1px solid #888;
  210. }
  211. table.ft td {
  212. padding: 3px 5px;
  213. margin: 2px;
  214. background-color: #ddd;
  215. }
  216. .logdatei {
  217. margin: 10px 5px 20px 5px;
  218. padding: 0 20px 10px 20px;
  219. background-color: #eee;
  220. border: 1px solid #888;
  221. }
  222. .modell {
  223. font-weight: bold;
  224. background-color: #ccc;
  225. padding: 10px;
  226. margin: 0 -20px;
  227. }
  228. .rot {
  229. background-color: #e88;
  230. }
  231. .number {
  232. font-weight: bold;
  233. background-color: #ccc;
  234. border: 1px solid #888888;
  235. }
  236. .strich {
  237. border-bottom: 1px solid #888888;
  238. }
  239. </style>