/** * @param string $ConsumerAcronym * @param string $ConsumerName * * @return Stage */ public static function frontendConsumer($ConsumerAcronym, $ConsumerName) { $Stage = new Stage('Mandanten'); $tblConsumerAll = Consumer::useService()->getConsumerAll(); $Stage->setContent(new TableData($tblConsumerAll, new Title('Bestehende Mandanten'), array('Acronym' => 'Mandanten-Kürzel', 'Name' => 'Mandanten-Name')) . Consumer::useService()->createConsumer(new Form(new FormGroup(new FormRow(array(new FormColumn(new TextField('ConsumerAcronym', 'Kürzel des Mandanten', 'Kürzel des Mandanten'), 4), new FormColumn(new TextField('ConsumerName', 'Name des Mandanten', 'Name des Mandanten'), 8))), new \SPHERE\Common\Frontend\Form\Repository\Title('Mandant anlegen')), new Primary('Hinzufügen')), $ConsumerAcronym, $ConsumerName)); return $Stage; }
/** * @param TblPerson $tblPerson * @param array $Meta * * @return Stage */ public function frontendMeta(TblPerson $tblPerson = null, $Meta = array()) { $Stage = new Stage(); $Stage->setMessage(new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.')); $tblCompanyAllSchool = Group::useService()->getCompanyAllByGroup(Group::useService()->getGroupByMetaTable('SCHOOL')); array_push($tblCompanyAllSchool, new TblCompany()); if (null !== $tblPerson) { $Global = $this->getGlobal(); if (!isset($Global->POST['Meta'])) { /** @var TblProspect $tblProspect */ $tblProspect = Prospect::useService()->getProspectByPerson($tblPerson); if ($tblProspect) { $Global->POST['Meta']['Remark'] = $tblProspect->getRemark(); /** @var TblProspectAppointment $tblProspectAppointment */ $tblProspectAppointment = $tblProspect->getTblProspectAppointment(); if ($tblProspectAppointment) { $Global->POST['Meta']['Appointment']['ReservationDate'] = $tblProspectAppointment->getReservationDate(); $Global->POST['Meta']['Appointment']['InterviewDate'] = $tblProspectAppointment->getInterviewDate(); $Global->POST['Meta']['Appointment']['TrialDate'] = $tblProspectAppointment->getTrialDate(); } /** @var TblProspectReservation $tblProspectReservation */ $tblProspectReservation = $tblProspect->getTblProspectReservation(); if ($tblProspectReservation) { $Global->POST['Meta']['Reservation']['Year'] = $tblProspectReservation->getReservationYear(); $Global->POST['Meta']['Reservation']['Division'] = $tblProspectReservation->getReservationDivision(); $Global->POST['Meta']['Reservation']['SchoolOptionA'] = $tblProspectReservation->getServiceTblCompanyOptionA() ? $tblProspectReservation->getServiceTblCompanyOptionA()->getId() : 0; $Global->POST['Meta']['Reservation']['SchoolOptionB'] = $tblProspectReservation->getServiceTblCompanyOptionB() ? $tblProspectReservation->getServiceTblCompanyOptionB()->getId() : 0; } $Global->savePost(); } } } $Stage->setContent(Prospect::useService()->createMeta((new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(array(new Panel('Termine', array(new DatePicker('Meta[Appointment][ReservationDate]', 'Eingangsdatum', 'Eingangsdatum', new Calendar()), new DatePicker('Meta[Appointment][InterviewDate]', 'Aufnahmegespräch', 'Aufnahmegespräch', new Calendar()), new DatePicker('Meta[Appointment][TrialDate]', 'Schnuppertag', 'Schnuppertag', new Calendar())), Panel::PANEL_TYPE_INFO)), 3), new FormColumn(array(new Panel('Voranmeldung für', array(new TextField('Meta[Reservation][Year]', 'Schuljahr', 'Schuljahr'), new TextField('Meta[Reservation][Division]', 'Klassenstufe', 'Klassenstufe'), new SelectBox('Meta[Reservation][SchoolOptionA]', 'Schule: Option 1', array('{{ Name }} {{ Description }}' => $tblCompanyAllSchool), new Education()), new SelectBox('Meta[Reservation][SchoolOptionB]', 'Schule: Option 2', array('{{ Name }} {{ Description }}' => $tblCompanyAllSchool), new Education())), Panel::PANEL_TYPE_INFO)), 4), new FormColumn(array(new Panel('Sonstiges', array(new TextArea('Meta[Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO)), 5)))))), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.'), $tblPerson, $Meta)); return $Stage; }
/** * @return Stage */ public function frontendMeta(TblPerson $tblPerson = null, $Meta = array()) { $Stage = new Stage(); $Stage->setMessage(new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.')); $Stage->setContent((new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new DatePicker('Meta[ReservationDate]', 'Eingangsdatum', 'Eingangsdatum', new Calendar()), 4), new FormColumn(new DatePicker('Meta[InterviewDate]', 'Aufnahmegespräch', 'Aufnahmegespräch', new Calendar()), 4), new FormColumn(new DatePicker('Meta[TrialDate]', 'Schnuppertag', 'Schnuppertag', new Calendar()), 4)))), new Title('Termine')), new FormGroup(array(new FormRow(array(new FormColumn(new TextField('Meta[ReservationYear]', 'Schuljahr', 'Schuljahr'), 6), new FormColumn(new TextField('Meta[ReservationDivision]', 'Klassenstufe', 'Klassenstufe'), 6)))), new Title('Voranmeldung', 'für')), new FormGroup(array(new FormRow(array(new FormColumn(array(new TextArea('Meta[Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())))))), new Title('Sonstiges'))), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.')); return $Stage; }
/** * @param Stage $Stage */ private function menuButton(Stage $Stage) { $Stage->addButton(new Standard('Rollen', new Link\Route(__NAMESPACE__ . '/Role'), new TagList(), array(), 'Zusammenstellung von Berechtigungen')); $Stage->addButton(new Standard('Zugriffslevel', new Link\Route(__NAMESPACE__ . '/Level'), new Tag(), array(), 'Gruppen von Privilegien')); $Stage->addButton(new Standard('Privilegien', new Link\Route(__NAMESPACE__ . '/Privilege'), new TileBig(), array(), 'Gruppen von Rechten')); $Stage->addButton(new Standard('Rechte', new Link\Route(__NAMESPACE__ . '/Right'), new TileList(), array(), 'Geschützte Routen')); }
/** * @param null|string $CredentialKey * * @return Stage */ public function frontendYubiKey($CredentialKey) { $Stage = new Stage('Hardware-Schlüssel', 'YubiKey'); $tblTokenAll = Token::useService()->getTokenAll(); if ($tblTokenAll) { array_walk($tblTokenAll, function (TblToken &$tblToken) { /** @noinspection PhpUndefinedFieldInspection */ $tblToken->Name = strtoupper($tblToken->getIdentifier()); strtoupper($tblToken->getIdentifier()); if ($tblToken->getSerial() % 2 != 0) { /** @noinspection PhpUndefinedFieldInspection */ $tblToken->Number = '0' . $tblToken->getSerial(); } else { /** @noinspection PhpUndefinedFieldInspection */ $tblToken->Number = $tblToken->getSerial(); } /** @noinspection PhpUndefinedFieldInspection */ $tblToken->Number = substr($tblToken->Number, 0, 4) . ' ' . substr($tblToken->Number, 4, 4); /** @noinspection PhpUndefinedFieldInspection */ $tblToken->Option = new Danger('Löschen', '/Platform/Gatekeeper/Authorization/Access/PrivilegeGrantRight', new Remove(), array('Id' => $tblToken->getId()), 'Löschen'); }); } $Stage->setContent(($tblTokenAll ? new TableData($tblTokenAll, new Title('Bestehende Hardware-Schlüssel'), array('Name' => 'Name', 'Number' => 'Seriennummer')) : new Warning('Keine Hardware-Schlüssel vorhanden')) . Token::useService()->createToken(new Form(new FormGroup(new FormRow(new FormColumn(new PasswordField('CredentialKey', 'YubiKey', 'YubiKey'))), new \SPHERE\Common\Frontend\Form\Repository\Title('Hardware-Schlüssel anlegen')), new Primary('Hinzufügen')), $CredentialKey)); return $Stage; }
/** * @return Stage */ public function frontendDashboard() { $Stage = new Stage('Dashboard', 'System'); $Value = 100 / disk_total_space(__DIR__) * disk_free_space(__DIR__); Main::getDispatcher()->registerWidget('System', new Panel('Festplattenkapazität', array('<div class="progress" style="margin-bottom: 0;"> <div class="progress-bar progress-bar-success" style="width: ' . $Value . '%"></div> <div class="progress-bar progress-bar-danger" style="width: ' . (100 - $Value) . '%"></div> </div>', 'Gesamt: ' . number_format(disk_total_space(__DIR__), 0, ',', '.'), 'Frei: ' . number_format(disk_free_space(__DIR__), 0, ',', '.'))), 2, 2); $free = shell_exec('free'); $free = (string) trim($free); $free_arr = explode("\n", $free); $mem = explode(" ", $free_arr[1]); $mem = array_filter($mem); $mem = array_merge($mem); $Value = $mem[2] / $mem[1] * 100; Main::getDispatcher()->registerWidget('System', new Panel('Speicherkapazität', array('<div class="progress" style="margin-bottom: 0;"> <div class="progress-bar progress-bar-success" style="width: ' . $Value . '%"></div> <div class="progress-bar progress-bar-danger" style="width: ' . (100 - $Value) . '%"></div> </div>', 'Gesamt: ' . number_format($mem[1], 0, ',', '.'), 'Frei: ' . number_format($mem[2], 0, ',', '.'))), 2, 2); $load = sys_getloadavg(); Main::getDispatcher()->registerWidget('System', new Panel('Rechenkapazität', array('<div class="progress" style="margin-bottom: 0;"> <div class="progress-bar progress-bar-success" style="width: ' . 50 * (2 - $load[0]) . '%"></div> <div class="progress-bar progress-bar-danger" style="width: ' . 50 * $load[0] . '%"></div> </div>', 'Genutzt: ' . number_format($load[0], 5, ',', '.'), 'Frei: ' . number_format(2 - $load[0], 5, ',', '.'))), 2, 2); $Stage->setContent(Main::getDispatcher()->fetchDashboard('System')); return $Stage; }
/** * @param TblPerson $tblPerson * @param array $Meta * * @return Stage */ public function frontendMeta(TblPerson $tblPerson = null, $Meta = array()) { $Stage = new Stage(); $Stage->setMessage(new Warning(new Danger(new \SPHERE\Common\Frontend\Icon\Repository\Warning() . ' Speichern der Schülerakte in aktueller Demo-Version noch nicht möglich')) . new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.')); $Stage->setContent((new Form(array($this->formGroupTransfer($tblPerson, $Meta), $this->formGroupGeneral($tblPerson, $Meta), $this->formGroupSubject($tblPerson, $Meta), $this->formGroupIntegration($tblPerson, $Meta)), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.')); return $Stage; }
/** * @param TblPerson $tblPerson * @param array $Meta * * @return Stage */ public function frontendMeta(TblPerson $tblPerson = null, $Meta = array()) { $Stage = new Stage(); $Stage->setMessage(new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.')); if (null !== $tblPerson) { $Global = $this->getGlobal(); if (!isset($Global->POST['Meta'])) { /** @var TblCommon $tblCommon */ $tblCommon = Common::useService()->getCommonByPerson($tblPerson); if ($tblCommon) { $Global->POST['Meta']['Remark'] = $tblCommon->getRemark(); /** @var TblCommonBirthDates $tblCommonBirthDates */ $tblCommonBirthDates = $tblCommon->getTblCommonBirthDates(); if ($tblCommonBirthDates) { $Global->POST['Meta']['BirthDates']['Birthday'] = $tblCommonBirthDates->getBirthday(); $Global->POST['Meta']['BirthDates']['Birthplace'] = $tblCommonBirthDates->getBirthplace(); $Global->POST['Meta']['BirthDates']['Gender'] = $tblCommonBirthDates->getGender(); } /** @var TblCommonInformation $tblCommonInformation */ $tblCommonInformation = $tblCommon->getTblCommonInformation(); if ($tblCommonInformation) { $Global->POST['Meta']['Information']['Nationality'] = $tblCommonInformation->getNationality(); $Global->POST['Meta']['Information']['Denomination'] = $tblCommonInformation->getDenomination(); $Global->POST['Meta']['Information']['IsAssistance'] = $tblCommonInformation->getIsAssistance(); $Global->POST['Meta']['Information']['AssistanceActivity'] = $tblCommonInformation->getAssistanceActivity(); } $Global->savePost(); } } } $Stage->setContent(Common::useService()->createMeta((new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(array(new Panel('Geburtsdaten', array(new DatePicker('Meta[BirthDates][Birthday]', 'Geburtstag', 'Geburtstag', new Calendar()), new AutoCompleter('Meta[BirthDates][Birthplace]', 'Geburtsort', 'Geburtsort', array(), new MapMarker()), new SelectBox('Meta[BirthDates][Gender]', 'Geschlecht', array(TblCommonBirthDates::VALUE_GENDER_NULL => '', TblCommonBirthDates::VALUE_GENDER_MALE => 'Männlich', TblCommonBirthDates::VALUE_GENDER_FEMALE => 'Weiblich'), new Child())), Panel::PANEL_TYPE_INFO), new Panel('Sonstiges', array(new TextArea('Meta[Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO)), 6), new FormColumn(array(new Panel('Informationen', array(new AutoCompleter('Meta[Information][Nationality]', 'Staatsangehörigkeit', 'Staatsangehörigkeit', array(), new Nameplate()), new AutoCompleter('Meta[Information][Denomination]', 'Konfession', 'Konfession', array(), new TempleChurch()), new SelectBox('Meta[Information][IsAssistance]', 'Mitarbeitsbereitschaft', array(TblCommonInformation::VALUE_IS_ASSISTANCE_NULL => '', TblCommonInformation::VALUE_IS_ASSISTANCE_YES => 'Ja', TblCommonInformation::VALUE_IS_ASSISTANCE_NO => 'Nein'), new Sheriff()), new TextArea('Meta[Information][AssistanceActivity]', 'Mitarbeitsbereitschaft - Tätigkeiten', 'Mitarbeitsbereitschaft - Tätigkeiten', new Pencil())), Panel::PANEL_TYPE_INFO)), 6)))))), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.'), $tblPerson, $Meta)); return $Stage; }
public function frontendUpload() { $Stage = new Stage('Upload', 'Form-Test'); $this->getDebugger()->screenDump($this->getUpload('FileUpload', __DIR__)->validateMaxSize('5M')->validateMimeType('image/png')->doUpload()); $Stage->setContent((new Form(new FormGroup(new FormRow(new FormColumn(array(new FileUpload('FileUpload', 'FileUpload', 'FileUpload')))))))->appendFormButton(new Primary('Hochladen', new Upload()))); return $Stage; }
public function frontendGroup($Id = false) { $Stage = new Stage('Firmensuche', 'nach Firmengruppe'); $tblGroup = Group::useService()->getGroupById($Id); if ($tblGroup) { $Stage->setMessage(new PullClear(new Bold($tblGroup->getName()) . ' ' . new Small($tblGroup->getDescription())) . new PullClear(new Danger(new Italic(nl2br($tblGroup->getRemark()))))); } else { $Stage->setMessage('Bitte wählen Sie eine Firmengruppe'); } $tblGroupAll = Group::useService()->getGroupAll(); /** @noinspection PhpUnusedParameterInspection */ array_walk($tblGroupAll, function (TblGroup &$tblGroup, $Index, Stage $Stage) { $Stage->addButton(new Standard($tblGroup->getName(), new Link\Route(__NAMESPACE__ . '/Group'), null, array('Id' => $tblGroup->getId()), $tblGroup->getDescription())); }, $Stage); if ($tblGroup) { $Stage->setMessage(new PullClear(new Bold($tblGroup->getName()) . ' ' . new Small($tblGroup->getDescription())) . new PullClear(new Danger(new Italic(nl2br($tblGroup->getRemark()))))); $tblCompanyAll = Group::useService()->getCompanyAllByGroup($tblGroup); } else { $Stage->setMessage('Bitte wählen Sie eine Firmengruppe'); $tblCompanyAll = Group::useService()->getCompanyAllHavingNoGroup(); } if ($tblCompanyAll) { array_walk($tblCompanyAll, function (TblCompany &$tblCompany) { $tblCompany->Option = new Standard('', '/Corporation/Company', new Pencil(), array('Id' => $tblCompany->getId()), 'Bearbeiten'); }); $Layout = array(new LayoutRow(new LayoutColumn(new TableData($tblCompanyAll, null, array('Id' => '#', 'Name' => 'Firmenname', 'Option' => 'Optionen'))))); if (!$tblGroup) { array_unshift($Layout, new LayoutRow(new LayoutColumn(new DangerMessage('Folgende Firmen sind keiner Gruppe zugewiesen')))); } $Stage->setContent(new Layout(new LayoutGroup($Layout))); } return $Stage; }
/** * @param TblPerson $tblPerson * @param array $Meta * * @return Stage */ public function frontendMeta(TblPerson $tblPerson = null, $Meta = array()) { $Stage = new Stage(); $Stage->setMessage(new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.')); $Stage->setContent((new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new Panel('Berufliches', array(new AutoCompleter('Meta[Occupation]', 'Beruf', 'Beruf', array(), new MapMarker()), new AutoCompleter('Meta[Employment]', 'Arbeitsstelle', 'Arbeitsstelle', array(), new Nameplate())), Panel::PANEL_TYPE_INFO), 6), new FormColumn(new Panel('Sonstiges', array(new TextArea('Meta[Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO), 6)))))), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.')); return $Stage; }
/** * @return Stage */ public function frontendMyAccount() { $Stage = new Stage('Profil', 'Mein Benutzerkonto'); $tblAccount = Account::useService()->getAccountBySession(); $Stage->setMessage('[' . $tblAccount->getServiceTblConsumer()->getAcronym() . '] ' . $tblAccount->getServiceTblConsumer()->getName()); $Stage->setContent($tblAccount->getUsername()); return $Stage; }
/** * @return Stage */ public function frontendMeta(TblPerson $tblPerson = null, $Meta = array()) { $Stage = new Stage(); $tblCompanyAllSchool = Group::useService()->getCompanyAllByGroup(Group::useService()->getGroupByMetaTable('SCHOOL')); array_push($tblCompanyAllSchool, new TblCompany()); $Stage->setMessage(new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.')); $Stage->setContent((new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new Panel(new Hospital() . ' Krankenakte', array(new TextArea('Meta[MedicalRecord][Disease]', 'Krankheiten / Allergien', 'Krankheiten / Allergien', new Heart()), new TextArea('Meta[MedicalRecord][Medication]', 'Mediakamente', 'Mediakamente', new Medicine()), new SelectBox('Meta[MedicalRecord][AttendingDoctor]', 'Behandelnder Arzt', array(), new Stethoscope()), new SelectBox('Meta[MedicalRecord][InsuranceState]', 'Versicherungsstatus', array(0 => '', 1 => 'Pflicht', 2 => 'Freiwillig', 3 => 'Privat', 4 => 'Familie Vater', 5 => 'Familie Mutter'), new Lock()), new AutoCompleter('Meta[MedicalRecord][Insurance]', 'Krankenkasse', 'Krankenkasse', array(), new Shield())), Panel::PANEL_TYPE_DANGER), 3), new FormColumn(new Panel('Schulbeförderung', array(new TextField('Meta[Transport][Route]', 'Buslinie', 'Buslinie', new Bus()), new TextField('Meta[Transport][Station][Entrance]', 'Einstiegshaltestelle', 'Einstiegshaltestelle', new StopSign()), new TextField('Meta[Transport][Station][Exit]', 'Ausstiegshaltestelle', 'Ausstiegshaltestelle', new StopSign()), new TextArea('Meta[Transport][Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO), 3), new FormColumn(array(new Panel('Sonstiges', array(new DatePicker('Meta[Additional][BaptismDate]', 'Taufdatum', 'Taufdatum', new TempleChurch()), new TextField('Meta[Additional][BaptismLocation]', 'Taufort', 'Taufort', new MapMarker()), new TextField('Meta[Additional][Locker][Number]', 'Schließfachnummer', 'Schließfachnummer', new Lock()), new TextField('Meta[Additional][Locker][Location]', 'Schließfach Standort', 'Schließfach Standort', new MapMarker()), new TextField('Meta[Additional][Locker][Key]', 'Schlüssel Nummer', 'Schlüssel Nummer', new Key())), Panel::PANEL_TYPE_INFO)), 3), new FormColumn(array(new Panel('Erlaubnis zur Nutzung des Schüler-Fotos', array(new CheckBox('Meta[PicturePermission][Internal]', 'Schulschriften', 1), new CheckBox('Meta[PicturePermission][External]', 'Veröffentlichungen', 1), new CheckBox('Meta[PicturePermission][Internet]', 'Internetpräsenz', 1), new CheckBox('Meta[PicturePermission][Facebook]', 'Facebookseite', 1), new CheckBox('Meta[PicturePermission][Press]', 'Druckpresse', 1), new CheckBox('Meta[PicturePermission][Multimedia]', 'Ton/Video/Film', 1), new CheckBox('Meta[PicturePermission][Promotion]', 'Werbung in eigener Sache', 1)), Panel::PANEL_TYPE_INFO)), 3))), new FormRow(array(new FormColumn(new Panel('Integration 1', array(new CheckBox('Meta[Integration][CoachingRequired]', 'Förderbedarf', 1), new Aspect('Förderschwerpunkte:'), new CheckBox('Meta[Integration][PracticeModule][1]', 'Schwerpunkt A', 1), new CheckBox('Meta[Integration][PracticeModule][2]', 'Schwerpunkt B', 1), new CheckBox('Meta[Integration][PracticeModule][3]', 'Schwerpunkt C', 1), new Aspect('Teilleistungsstörungen:'), new CheckBox('Meta[Integration][Disorder][1]', 'Störung A', 1), new CheckBox('Meta[Integration][Disorder][2]', 'Störung B', 1), new CheckBox('Meta[Integration][Disorder][3]', 'Störung C', 1), new CheckBox('Meta[Integration][Disorder][4]', 'Störung D', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Störung E', 1)), Panel::PANEL_TYPE_INFO), 4), new FormColumn(new Panel('Integration 2', array(new DatePicker('Meta[Integration][CoachingCounselDate]', 'Förderantrag Beratung', 'Förderantrag Beratung', new Calendar()), new DatePicker('Meta[Integration][CoachingRequestDate]', 'Förderantrag', 'Förderantrag', new Calendar()), new DatePicker('Meta[Integration][CoachingDecisionDate]', 'Förderbescheid SBA', 'Förderbescheid SBA', new Calendar())), Panel::PANEL_TYPE_INFO), 4), new FormColumn(new Panel('Integration 3', array(new SelectBox('Meta[Integration][3]', 'Förderschule', array('Name' => $tblCompanyAllSchool), new Education()), new SelectBox('Meta[Integration][3]', 'Schulbegleitung', array(), new Person()), new NumberField('Meta[Integration][3]', 'Stundenbedarf pro Woche', 'Stundenbedarf pro Woche', new Clock()), new TextArea('Meta[Integration][Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO), 4))), new FormRow(array(new FormColumn(array(new Panel('Ersteinschulung', array(new SelectBox('Meta[Transfer][1]', 'Schule', array('Name' => $tblCompanyAllSchool)), new DatePicker('Meta[Transfer][2]', 'Datum', 'Datum', new Calendar()), new TextArea('Meta[Transfer][1]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO)), 4), new FormColumn(array(new Panel('Schülertransfer - Aufnahme', array(new SelectBox('Meta[Transfer][0]', 'Letzte Schulart', array()), new SelectBox('Meta[Transfer][1]', 'Abgebende Schule', array('Name' => $tblCompanyAllSchool)), new DatePicker('Meta[Transfer][2]', 'Datum', 'Datum', new Calendar())), Panel::PANEL_TYPE_INFO)), 4), new FormColumn(array(new Panel('Schülertransfer - Aufnahme', array(new SelectBox('Meta[Transfer][0]', 'Letzte Schulart', array()), new SelectBox('Meta[Transfer][1]', 'Abgebende Schule', array('Name' => $tblCompanyAllSchool)), new DatePicker('Meta[Transfer][2]', 'Datum', 'Datum', new Calendar())), Panel::PANEL_TYPE_INFO)), 4))), new FormRow(array(new FormColumn(array(new Panel('Schülertransfer - Schulverlauf', array(new TextArea('Meta[Transfer][1]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO)))))))), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.')); return $Stage; }
/** * @return Stage */ public function frontendShutdown() { $Stage = new Stage('Betriebsstörung', 'Fehler in der Anwendung'); $Stage->setMessage('<strong>Problem:</strong> Nach Aufruf der Anwendung arbeitet diese nicht wie erwartet'); $Stage->setContent(($this->getRequest()->getPathInfo() != '/Platform/Assistance/Error/Shutdown' ? new Danger(new \SPHERE\Common\Frontend\Icon\Repository\Warning() . '<samp>' . $this->getRequest()->getPathInfo() . '</samp>') : '') . (($Error = error_get_last()) ? new Warning(new \SPHERE\Common\Frontend\Icon\Repository\Info() . '<samp>' . $Error['message'] . '<br/>' . $Error['file'] . ':' . $Error['line'] . '</samp>') : '') . '<h2><small>Mögliche Ursachen</small></h2>' . new Info('Dieser Bereich der Anwendung wird eventuell gerade gewartet') . new Danger('Die Anwendung hat erkannt, dass das System nicht fehlerfrei arbeiten kann') . new Danger('Die interne Kommunikation der Anwendung mit weiteren, notwendigen Resourcen zum Beispiel Programmen kann gestört sein') . '<h2><small> Mögliche Lösungen </small></h2> ' . new Info('Versuchen Sie die Anwendung zu einem späteren Zeitpunkt erneut aufzurufen') . new Success('Bitte wenden Sie sich an den Support damit das Problem schnellstmöglich behoben werden kann')); if ($this->getRequest()->getPathInfo() != '/Platform/Assistance/Error') { $Stage->addButton(new Primary('Fehlerbericht senden', '/Platform/Assistance/Support/Ticket', null, array('TicketSubject' => urlencode('Fehler in der Anwendung'), 'TicketMessage' => urlencode($this->getRequest()->getPathInfo() . ': ' . $Error['message'] . '<br/>' . $Error['file'] . ':' . $Error['line'])))); } return $Stage; }
public function frontendScoreTypeRemove($Id) { $Stage = new Stage('Zensurtyp', 'Entfernen'); if ($ScoreType = ScoreType::useService()->getScoreTypeById($Id)) { $Stage->setContent(ScoreType::useService()->removeScoreType($ScoreType)); } else { $Stage->setContent(new Danger('Der Zensurentyp konnte nicht gelöscht werden') . new Redirect('/Education/Graduation/ScoreType', 2)); } return $Stage; }
/** * @return Stage */ public function frontendProtocol() { $Stage = new Stage('Protokoll', 'Aktivit?ten'); $ProtocolList = Protocol::useService()->getProtocolAll(); // foreach($ProtocolList as $Key => &$Protocol) // { // $Protocol->Editor = 0; // } $Stage->setContent(new TableData($ProtocolList, null, array('Id' => '#', 'Editor' => 'Editor', 'Origin' => 'Origin', 'Commit' => 'Commit'), array("order" => array(array(0, 'desc')), "columnDefs" => array(array("orderable" => false, "targets" => 1), array("orderable" => false, "targets" => 2), array("orderable" => false, "targets" => 3))))); return $Stage; }
/** * @param bool $Clear * * @return Stage */ public function frontendCache($Clear = false) { $Stage = new Stage('Cache', 'Status'); $Stage->addButton(new Standard('Cache löschen', '/Platform/System/Cache', null, array('Clear' => true), 'Cache leeren')); $Stage->addButton(new External('phpMemcachedAdmin', $this->getRequest()->getPathBase() . '/UnitTest/Console/phpMemcachedAdmin-1.2.2')); if ($Clear) { (new CacheType(new ApcUser(), true))->getCache()->clearCache(); (new CacheType(new Apcu(), true))->getCache()->clearCache(); (new CacheType(new Memcached(), true))->getCache()->clearCache(); (new CacheType(new OpCache(), true))->getCache()->clearCache(); (new CacheType(new TwigCache(), true))->getCache()->clearCache(); } $Stage->setContent(new Layout(array(new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new Memcached(), true))->getCache()))), new Title('Memcached')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new Apcu(), true))->getCache()))), new Title('APCu')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new Memory(), true))->getCache()))), new Title('Memory')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new OpCache(), true))->getCache()))), new Title('Zend OpCache')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new TwigCache(), true))->getCache()))), new Title('Twig'))))); return $Stage; }
/** * @param null|array $Environment * * @return Stage */ public function frontendArchive($Environment = null) { $Stage = new Stage('Archivierung'); $Archive = false; if ($Environment) { if ($Environment['Consumer']) { $tblConsumer = Consumer::useService()->getConsumerById($Environment['Consumer']); $Archive = Archive::useService()->getArchiveAllByConsumer($tblConsumer); } else { $Archive = Archive::useService()->getArchiveAll(); } } if ($Archive) { array_walk($Archive, function (TblArchive &$Element) { $Entry = array(new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(new Muted('Eintrag:'), 3), new LayoutColumn($Element->getId(), 9))))), new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(new Muted('Mandant:'), 3), new LayoutColumn($Element->getConsumerAcronym() . ' ' . $Element->getConsumerName(), 9))))), new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(new Muted('Datenbank:'), 3), new LayoutColumn($Element->getArchiveDatabase(), 9))))), new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(new Muted('Zeitpunkt:'), 3), new LayoutColumn(date('d.m.Y H:i:s ', $Element->getArchiveTimestamp()), 9)))))); /** @var TblArchive $Element */ $Element = Archive::useService()->fixArchive($Element); switch ($Element->getArchiveType()) { case TblArchive::ARCHIVE_TYPE_CREATE: $Entry[] = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(new Muted('Typ:'), 3), new LayoutColumn('Create', 9))))); break; case TblArchive::ARCHIVE_TYPE_UPDATE: $Entry[] = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(new Muted('Typ:'), 3), new LayoutColumn('Update', 9))))); break; default: $Entry[] = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(new Muted('Typ:'), 3), new LayoutColumn('-NA-', 9))))); break; } $Element->Entry = new Listing($Entry); $Element->Payload = $this->prepareOutput(unserialize($Element->Entity)); }); } else { $Archive = array(); } $Stage->setContent('<style>.list-group{ margin-bottom: 0; } .list-group .list-group-item{ padding: 2px 3px }</style>' . new Layout(array(new LayoutGroup(array(new LayoutRow(new LayoutColumn($this->formArchive()->appendFormButton(new Primary('Filtern', new Search()))))), new Title('Archiv', 'Filter')), new LayoutGroup(array(new LayoutRow(new LayoutColumn(' <div class="form-group"> <label>Volltextsuche</label> <div class="input-group"> <span class="input-group-addon">' . new Search() . '</span> <textarea name="GlobalSearch" class="form-control" rows="2"></textarea> </div> </div> ' . '<script> Client.Use("ModTable", function() { var Search = jQuery(\'input[type="search"]\'); Search.parent().hide(); var GlobalSearch = jQuery(\'textarea[name="GlobalSearch"]\').on("keyup",function(){ Search.val( jQuery(this).val() ).trigger("keyup"); }); }); </script>')), new LayoutRow(new LayoutColumn(new TableData($Archive, null, array('Entry' => 'Eintrag', 'Payload' => 'Daten'), array("autoWidth" => true, "order" => array(array(0, 'desc')), "stateSave" => false))))), new Title('Filter', 'Ergebnis'))))); return $Stage; }
/** * @param TblPerson $tblPerson * @param array $Meta * * @return Stage */ public function frontendMeta(TblPerson $tblPerson = null, $Meta = array()) { $Stage = new Stage(); $Stage->setMessage(new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.')); if (null !== $tblPerson) { $Global = $this->getGlobal(); if (!isset($Global->POST['Meta'])) { /** @var TblCustody $tblCustody */ $tblCustody = Custody::useService()->getCustodyByPerson($tblPerson); if ($tblCustody) { $Global->POST['Meta']['Remark'] = $tblCustody->getRemark(); $Global->POST['Meta']['Occupation'] = $tblCustody->getOccupation(); $Global->POST['Meta']['Employment'] = $tblCustody->getEmployment(); $Global->savePost(); } } } $Stage->setContent(Custody::useService()->createMeta((new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new Panel('Berufliches', array(new AutoCompleter('Meta[Occupation]', 'Beruf', 'Beruf', array(), new MapMarker()), new AutoCompleter('Meta[Employment]', 'Arbeitsstelle', 'Arbeitsstelle', array(), new Nameplate())), Panel::PANEL_TYPE_INFO), 6), new FormColumn(new Panel('Sonstiges', array(new TextArea('Meta[Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO), 6)))))), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.'), $tblPerson, $Meta)); return $Stage; }
/** * @return Stage */ public function frontendPayment() { $Stage = new Stage(); $Stage->setTitle('Zahlungen'); $Stage->setDescription('Importierte'); $paymentList = Balance::useService()->entityPaymentAll(); if ($paymentList) { array_walk($paymentList, function (TblPayment &$tblPayment) { $tblInvoice = $tblPayment->getTblBalance()->getServiceBillingInvoice(); if ($tblInvoice) { $tblPayment->InvoiceNumber = $tblInvoice->getNumber(); $tblPayment->InvoiceDate = $tblInvoice->getInvoiceDate(); $tblPayment->DebtorFullName = $tblInvoice->getDebtorFullName(); $tblPayment->DebtorNumber = $tblInvoice->getDebtorNumber(); $tblPayment->ValueString = $tblPayment->getValueString(); } }); } $Stage->setContent(new TableData($paymentList, null, array('InvoiceNumber' => 'Rechnungs-Nr.', 'InvoiceDate' => 'Rechnungsdatum', 'Date' => 'Zahlungseingangsdatum', 'DebtorFullName' => 'Debitor', 'DebtorNumber' => 'Debitorennummer', 'ValueString' => 'Betrag'))); return $Stage; }
/** * @return Stage */ public static function frontendAccount() { $Stage = new Stage('Benutzerkonnten'); $tblAccount = Account::useService()->getAccountBySession(); if ($tblAccount) { $isSystem = Account::useService()->hasAuthorization($tblAccount, Access::useService()->getRoleByName('Administrator')); } else { $isSystem = false; } $tblConsumer = Consumer::useService()->getConsumerBySession(); // Token $tblTokenAll = Token::useService()->getTokenAll(); array_walk($tblTokenAll, function (TblToken &$tblToken) { if (Account::useService()->getAccountAllByToken($tblToken)) { $tblToken = false; } else { $tblToken = new RadioBox('Account[Token]', implode(' ', str_split($tblToken->getSerial(), 4)), $tblToken->getId()); } }); $tblTokenAll = array_filter($tblTokenAll); array_unshift($tblTokenAll, new RadioBox('Account[Token]', new \SPHERE\Common\Frontend\Text\Repository\Danger('KEIN Hardware-Token'), null)); // Identification $tblIdentificationAll = Account::useService()->getIdentificationAll(); /** @noinspection PhpUnusedParameterInspection */ array_walk($tblIdentificationAll, function (TblIdentification &$tblIdentification, $Index, $isSystem) { if ($tblIdentification->getName() == 'System' && !$isSystem) { $tblIdentification = false; } else { $tblIdentification = new RadioBox('Account[Identification]', $tblIdentification->getDescription(), $tblIdentification->getId()); } }, $isSystem); $tblIdentificationAll = array_filter($tblIdentificationAll); // Role $tblRoleAll = Access::useService()->getRoleAll(); /** @noinspection PhpUnusedParameterInspection */ array_walk($tblRoleAll, function (TblRole &$tblRole, $Index, $isSystem) { if ($tblRole->getName() == 'Administrator' && !$isSystem) { $tblRole = false; } else { $tblRole = new CheckBox('Account[Role][' . $tblRole->getId() . ']', $tblRole->getName(), $tblRole->getId()); } }, $isSystem); $tblRoleAll = array_filter($tblRoleAll); // Account $tblAccountAll = Account::useService()->getAccountAll(); array_walk($tblAccountAll, function (TblAccount &$tblAccount) { /** @noinspection PhpUndefinedFieldInspection */ $tblAccount->Option = new Danger('Löschen', '/Platform/Gatekeeper/Authorization/Account/Destroy', new Remove(), array('Id' => $tblAccount->getId()), 'Löschen'); }); $Stage->setContent(($tblAccountAll ? new TableData($tblAccountAll, new Title('Bestehende Benutzerkonnten'), array('Username' => 'Benutzername')) : new Warning('Keine Benutzerkonnten vorhanden')) . new Form(array(new FormGroup(array(new FormRow(array(new FormColumn((new TextField('Account[Name]', 'Benutzername', 'Benutzername', new Person()))->setPrefixValue($tblConsumer->getAcronym()), 4), new FormColumn(new PasswordField('Account[Password]', 'Passwort', 'Passwort', new Lock()), 4), new FormColumn(new PasswordField('Account[PasswordSafety]', 'Passwort wiederholen', 'Passwort wiederholen', new Repeat()), 4)))), new \SPHERE\Common\Frontend\Form\Repository\Title('Benutzerkonnto anlegen')), new FormGroup(array(new FormRow(array(new FormColumn(array(new Panel('Authentifizierungstyp', $tblIdentificationAll)), 4), new FormColumn(array(new Panel('Berechtigungsstufe', $tblRoleAll)), 4), new FormColumn(array(new Panel('Hardware-Token', $tblTokenAll)), 4)))), new \SPHERE\Common\Frontend\Form\Repository\Title('Berechtigungen zuweisen'))), new Primary('Hinzufügen'))); return $Stage; }
/** * @return Stage */ public function frontendMyAccount() { $Stage = new Stage('Mein Benutzerkonto', 'Profil'); $tblAccount = Account::useService()->getAccountBySession(); $tblPersonAll = Account::useService()->getPersonAllByAccount($tblAccount); if ($tblPersonAll) { array_walk($tblPersonAll, function (TblPerson &$tblPerson) { $tblPerson = $tblPerson->getFullName(); }); } $tblAuthorizationAll = Account::useService()->getAuthorizationAllByAccount($tblAccount); if ($tblAuthorizationAll) { array_walk($tblAuthorizationAll, function (TblAuthorization &$tblAuthorization) { $tblAuthorization = $tblAuthorization->getServiceTblRole()->getName(); }); } $Person = new LayoutGroup(new LayoutRow(new LayoutColumn(new Panel('Informationen zur Person', !empty($tblPersonAll) ? new Listing($tblPersonAll) : new Danger(new Exclamation() . new Small(' Keine Person angeben')))))); $Authentication = new LayoutGroup(new LayoutRow(new LayoutColumn(new Panel('Authentication', $tblAccount->getServiceTblIdentification() ? $tblAccount->getServiceTblIdentification()->getDescription() : '')))); $Authorization = new LayoutGroup(new LayoutRow(new LayoutColumn(new Panel('Berechtigungen', !empty($tblAuthorizationAll) ? $tblAuthorizationAll : array(new Danger(new Exclamation() . new Small(' Keine Berechtigungen vergeben'))))))); $Token = new LayoutGroup(new LayoutRow(new LayoutColumn(new Panel('Hardware-Schlüssel', array($tblAccount->getServiceTblToken() ? substr($tblAccount->getServiceTblToken()->getSerial(), 0, 4) . ' ' . substr($tblAccount->getServiceTblToken()->getSerial(), 4, 4) : new Muted(new Small('Kein Hardware-Schlüssel vergeben'))))))); $Account = new Layout(array($Person, $Authentication, $Authorization, $Token)); $Stage->setContent(new Layout(array(new LayoutGroup(new LayoutRow(new LayoutColumn(new Panel('Benutzerkonto: ' . $tblAccount->getUsername(), $Account, Panel::PANEL_TYPE_DEFAULT, new Standard('Passwort ändern', new Route(__NAMESPACE__ . '/Password'))))), new Title('Benutzerkonto', 'Informationen')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Panel($tblAccount->getServiceTblConsumer()->getName() . ' [' . $tblAccount->getServiceTblConsumer()->getAcronym() . ']', array('TODO: Anzeigen von Schulen, Schulträger, Vörderverein', 'TODO: Anzeigen von zugehörigen Adressen, Telefonnummern, Personen'), Panel::PANEL_TYPE_DEFAULT, new Standard('Mandant ändern', new Route(__NAMESPACE__ . '/Consumer'))))), new Title('Mandant', 'Informationen'))))); return $Stage; }
/** * @param bool|false|string $TabActive * * @param null|int $Id * @param null|array $Person * @param null|array $Meta * * @return Stage */ public function frontendPerson($TabActive = 'Common', $Id = null, $Person = null, $Meta = null) { $Stage = new Stage('Personen', 'Datenblatt'); if (!$Id) { $BasicTable = Person::useService()->createPerson($this->formPerson()->appendFormButton(new Primary('Grunddaten anlegen'))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert'), $Person); $Stage->setContent(new Layout(array(new LayoutGroup(new LayoutRow(new LayoutColumn($BasicTable)), new Title(new PersonParent() . ' Grunddaten', 'der Person'))))); } else { $tblPerson = Person::useService()->getPersonById($Id); $Global = $this->getGlobal(); if (!isset($Global->POST['Person'])) { $Global->POST['Person']['Salutation'] = $tblPerson->getTblSalutation()->getId(); $Global->POST['Person']['Title'] = $tblPerson->getTitle(); $Global->POST['Person']['FirstName'] = $tblPerson->getFirstName(); $Global->POST['Person']['SecondName'] = $tblPerson->getSecondName(); $Global->POST['Person']['LastName'] = $tblPerson->getLastName(); $tblGroupAll = Group::useService()->getGroupAllByPerson($tblPerson); if (!empty($tblGroupAll)) { /** @var TblGroup $tblGroup */ foreach ((array) $tblGroupAll as $tblGroup) { $Global->POST['Person']['Group'][$tblGroup->getId()] = $tblGroup->getId(); } } $Global->savePost(); } $BasicTable = Person::useService()->updatePerson($this->formPerson()->appendFormButton(new Primary('Grunddaten speichern'))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert'), $tblPerson, $Person); $MetaTabs = Group::useService()->getGroupAllByPerson($tblPerson); // Sort by Name usort($MetaTabs, function (TblGroup $ObjectA, TblGroup $ObjectB) { return strnatcmp($ObjectA->getName(), $ObjectB->getName()); }); // Create Tabs /** @noinspection PhpUnusedParameterInspection */ array_walk($MetaTabs, function (TblGroup &$tblGroup, $Index, TblPerson $tblPerson) { switch (strtoupper($tblGroup->getMetaTable())) { case 'COMMON': $tblGroup = new LayoutTab('Personendaten', $tblGroup->getMetaTable(), array('Id' => $tblPerson->getId())); break; case 'PROSPECT': $tblGroup = new LayoutTab('Interessent', $tblGroup->getMetaTable(), array('Id' => $tblPerson->getId())); break; case 'STUDENT': $tblGroup = new LayoutTab('Schülerakte', $tblGroup->getMetaTable(), array('Id' => $tblPerson->getId())); break; case 'CUSTODY': $tblGroup = new LayoutTab('Sorgerechtdaten', $tblGroup->getMetaTable(), array('Id' => $tblPerson->getId())); break; default: $tblGroup = false; } }, $tblPerson); /** @var LayoutTab[] $MetaTabs */ $MetaTabs = array_filter($MetaTabs); // Folded ? if (!empty($MetaTabs)) { if (!$TabActive || $TabActive == '#') { array_unshift($MetaTabs, new LayoutTab(' ' . new ChevronRight() . ' ', '#', array('Id' => $tblPerson->getId()))); $MetaTabs[0]->setActive(); } else { if ($TabActive == 'Common') { array_unshift($MetaTabs, new LayoutTab(' ' . new ChevronUp() . ' ', '#', array('Id' => $tblPerson->getId()))); $MetaTabs[1]->setActive(); } else { array_unshift($MetaTabs, new LayoutTab(' ' . new ChevronUp() . ' ', '#', array('Id' => $tblPerson->getId()))); } } } switch (strtoupper($TabActive)) { case 'COMMON': $MetaTable = Common::useFrontend()->frontendMeta($tblPerson, $Meta); break; case 'PROSPECT': $MetaTable = Prospect::useFrontend()->frontendMeta($tblPerson, $Meta); break; case 'STUDENT': $MetaTable = Student::useFrontend()->frontendMeta($tblPerson, $Meta); break; case 'CUSTODY': $MetaTable = Custody::useFrontend()->frontendMeta($tblPerson, $Meta); break; default: if (!empty($MetaTabs)) { $MetaTable = new Well(new Muted('Bitte wählen Sie eine Rubrik')); } else { $MetaTable = new Well(new Warning('Keine Informationen verfügbar')); } } $Stage->setContent(new Layout(array(new LayoutGroup(new LayoutRow(new LayoutColumn(array(new Panel(new PersonIcon() . ' Person', $tblPerson->getFullName(), Panel::PANEL_TYPE_SUCCESS), $BasicTable))), new Title(new PersonParent() . ' Grunddaten', 'der Person')), new LayoutGroup(array(new LayoutRow(new LayoutColumn(new LayoutTabs($MetaTabs))), new LayoutRow(new LayoutColumn($MetaTable))), new Title(new Tag() . ' Informationen', 'zur Person')), new LayoutGroup(array(new LayoutRow(new LayoutColumn(Address::useFrontend()->frontendLayoutPerson($tblPerson)))), (new Title(new TagList() . ' Adressdaten', 'der Person'))->addButton(new Standard('Adresse hinzufügen', '/People/Person/Address/Create', new ChevronDown(), array('Id' => $tblPerson->getId())))), new LayoutGroup(array(new LayoutRow(new LayoutColumn(Phone::useFrontend()->frontendLayoutPerson($tblPerson) . Mail::useFrontend()->frontendLayoutPerson($tblPerson)))), (new Title(new TagList() . ' Kontaktdaten', 'der Person'))->addButton(new Standard('Telefonnummer hinzufügen', '/People/Person/Phone/Create', new ChevronDown(), array('Id' => $tblPerson->getId())))->addButton(new Standard('E-Mail Adresse hinzufügen', '/People/Person/Mail/Create', new ChevronDown(), array('Id' => $tblPerson->getId())))), new LayoutGroup(array(new LayoutRow(new LayoutColumn(array(Relationship::useFrontend()->frontendLayoutPerson($tblPerson), Relationship::useFrontend()->frontendLayoutCompany($tblPerson))))), (new Title(new TagList() . ' Beziehungen', 'zu Personen und Firmen'))->addButton(new Standard('Personenbeziehung hinzufügen', '/People/Person/Relationship/Create', new ChevronDown(), array('Id' => $tblPerson->getId())))->addButton(new Standard('Firmenbeziehung hinzufügen', '/Corporation/Company/Relationship/Create', new ChevronDown(), array('Id' => $tblPerson->getId()))))))); } return $Stage; }
/** * @param int $Id * @param bool $Confirm * * @return Stage */ public function frontendDestroyToPerson($Id, $Confirm = false) { $Stage = new Stage('E-Mail Adresse', 'Löschen'); if ($Id) { $tblToPerson = Mail::useService()->getMailToPersonById($Id); $tblPerson = $tblToPerson->getServiceTblPerson(); if (!$Confirm) { $Stage->setContent(new Layout(new LayoutGroup(new LayoutRow(new LayoutColumn(array(new Panel(new PersonIcon() . ' Person', $tblPerson->getFullName(), Panel::PANEL_TYPE_SUCCESS, new Standard('Zurück zur Person', '/People/Person', new ChevronLeft(), array('Id' => $tblPerson->getId()))), new Panel(new Question() . ' Diese E-Mail Adresse wirklich löschen?', array($tblToPerson->getTblType()->getName() . ' ' . $tblToPerson->getTblType()->getDescription(), $tblToPerson->getTblMail()->getAddress(), new Muted(new Small($tblToPerson->getRemark()))), Panel::PANEL_TYPE_DANGER, new Standard('Ja', '/People/Person/Mail/Destroy', new Ok(), array('Id' => $Id, 'Confirm' => true)) . new Standard('Nein', '/People/Person', new Disable(), array('Id' => $tblPerson->getId()))))))))); } else { $Stage->setContent(new Layout(new LayoutGroup(array(new LayoutRow(new LayoutColumn(array(Mail::useService()->removeMailToPerson($tblToPerson) ? new Success('Die E-Mail Adresse wurde gelöscht') : new Danger('Die E-Mail Adresse konnte nicht gelöscht werden'), new Redirect('/People/Person', 1, array('Id' => $tblPerson->getId()))))))))); } } else { $Stage->setContent(new Layout(new LayoutGroup(array(new LayoutRow(new LayoutColumn(array(new Danger('Die E-Mail Adresse konnte nicht gefunden werden'), new Redirect('/People/Search/Group')))))))); } return $Stage; }
/** * @return Stage */ public function frontendDashboard() { $Stage = new Stage('Dashboard', 'Import'); $Stage->setContent(Main::getDispatcher()->fetchDashboard('Import')); return $Stage; }
/** * @param int $Id * @param bool $Confirm * * @return Stage */ public function frontendDestroyToken($Id, $Confirm = false) { $Stage = new Stage('Hardware-Schlüssel', 'Löschen'); if ($Id) { $tblToken = Token::useService()->getTokenById($Id); $tblAccountAll = $tblToken->getAccountAllByToken(); if (empty($tblAccountAll)) { if (!$Confirm) { $Serial = $tblToken->getSerial(); $Serial = substr($Serial, 0, 4) . ' ' . substr($Serial, 4, 4); $Stage->setContent(new Layout(new LayoutGroup(new LayoutRow(new LayoutColumn(array(new Panel(new YubiKey() . ' Hardware-Schlüssel', array($Serial, strtoupper($tblToken->getIdentifier())), Panel::PANEL_TYPE_SUCCESS), new Panel(new Question() . ' Diesen Hardware-Schlüssel wirklich löschen?', array(), Panel::PANEL_TYPE_DANGER, new Standard('Ja', '/Setting/Authorization/Token/Destroy', new Ok(), array('Id' => $Id, 'Confirm' => true)) . new Standard('Nein', '/Setting/Authorization/Token', new Disable())))))))); } else { $Stage->setContent(new Layout(new LayoutGroup(array(new LayoutRow(new LayoutColumn(array(Token::useService()->destroyToken($tblToken) ? new Success('Der Hardware-Schlüssel wurde gelöscht') : new Danger('Der Hardware-Schlüssel konnte nicht gelöscht werden'), new Redirect('/Setting/Authorization/Token', 1)))))))); } } else { $Stage->setContent(new Layout(new LayoutGroup(array(new LayoutRow(new LayoutColumn(array(new Danger('Der Hardware-Schlüssel kann nicht gelöscht werden'), new Redirect('/Setting/Authorization/Token')))))))); } } else { $Stage->setContent(new Layout(new LayoutGroup(array(new LayoutRow(new LayoutColumn(array(new Danger('Der Hardware-Schlüssel konnte nicht gefunden werden'), new Redirect('/Setting/Authorization/Token')))))))); } return $Stage; }
/** * @param $tblItemId * @param $tblAccountId * * @return Stage */ public function frontendItemAccountAdd($tblItemId, $tblAccountId) { $Stage = new Stage(); $Stage->setTitle('Artikel'); $Stage->setDescription('FIBU-Konto Hinzufügen'); $tblItem = Item::useService()->entityItemById($tblItemId); $tblAccount = Account::useService()->entityAccountById($tblAccountId); if (!empty($tblItemId) && !empty($tblAccountId)) { $Stage->setContent(Item::useService()->executeAddItemAccount($tblItem, $tblAccount)); } return $Stage; }
/** * @param $Id * * @return Stage */ public function frontendInvoiceItemRemove($Id) { $Stage = new Stage(); $Stage->setTitle('Rechnung'); $Stage->setDescription('Artikel Entfernen'); $tblInvoiceItem = Invoice::useService()->entityInvoiceItemById($Id); $Stage->setContent(Invoice::useService()->executeRemoveInvoiceItem($tblInvoiceItem)); return $Stage; }
/** * @param $Id * * @return Stage */ public function frontendPictureDelete($Id) { $Stage = new Stage(); $Stage->setTitle('Bild'); $Stage->setDescription('entfernen'); $tblTestPicture = Test::useService()->getTestPictureById($Id); $Stage->setContent(Test::useService()->deleteTblTestPicture($tblTestPicture)); return $Stage; }
/** * @param Stage $Stage */ private function menuButton(Stage $Stage) { $Stage->addButton(new Standard('Status', new Link\Route(__NAMESPACE__), null, array(), 'Datenbankverbindungen')); $Stage->addButton(new Standard('Simulation', new Link\Route(__NAMESPACE__ . '/Setup/Simulation'), null, array(), 'Anzeige von Strukturänderungen')); $Stage->addButton(new Standard('Durchführung', new Link\Route(__NAMESPACE__ . '/Setup/Execution'), null, array(), 'Durchführen von Strukturänderungen und einspielen zugehöriger Daten')); $Stage->addButton(new External('phpMyAdmin', $this->getRequest()->getPathBase() . '/UnitTest/Console/phpMyAdmin-4.3.12')); }