diff --git a/application/Api/v1/PreorderApicontroller.php b/application/Api/v1/PreorderApicontroller.php index 99289badb..05e73256b 100644 --- a/application/Api/v1/PreorderApicontroller.php +++ b/application/Api/v1/PreorderApicontroller.php @@ -220,7 +220,7 @@ class PreorderApicontroller extends mfBaseApicontroller { $preorder->cancel_approved = $this->me->id; $preorder->deleted = date('U'); $preorder->deleted_by = $this->me->id; - $preorder->status_id = 15; // 899 - Cancelled + $preorder->status_id = 23; //910 - Cancelled (ohne weitere Begründung) if(!$preorder->save()) { return mfResponse::InternalServerError(); } @@ -639,7 +639,8 @@ class PreorderApicontroller extends mfBaseApicontroller { } $preorder_data['extref'] = (trim($this->post['extref'])) ? trim($this->post['extref']) : null; $preorder_data['technology'] = (trim($this->post['technology'])) ? trim($this->post['technology']) : null; - $preorder_data['patchposition'] = (trim($this->post['patchposition'])) ? trim($this->post['patchposition']) : null; + $preorder_data['equipment_name'] = (trim($this->post['equipment_name'])) ? trim($this->post['equipment_name']) : null; + $preorder_data['equipment_port'] = (trim($this->post['equipment_port'])) ? trim($this->post['equipment_port']) : null; /* * setup price diff --git a/application/Preorder/Preorder.php b/application/Preorder/Preorder.php index e635feeba..570cee685 100644 --- a/application/Preorder/Preorder.php +++ b/application/Preorder/Preorder.php @@ -236,7 +236,8 @@ class Preorder extends mfBaseModel { $a['connectionCount'] = ($this->connection_count) ? (int)$this->connection_count : 1; $a['isAdditionalOrder'] = ($this->is_additional_order) ? true : false; $a['technology'] = ($this->technology) ? $this->technology : null; - $a['patchposition'] = ($this->patchposition) ? $this->patchposition : null; + $a['equipment_name'] = ($this->equipment_name) ? $this->equipment_name: null; + $a['equipment_port'] = ($this->equipment_port) ? $this->equipment_port: null; $a['preorderType'] = $this->type; $a['acceptMarketing'] = ($this->accept_marketing) ? true : false; $a['acceptAgb'] = ($this->accept_agb) ? true : false; diff --git a/application/Preorder/PreorderModel.php b/application/Preorder/PreorderModel.php index e15a18a8b..5a07226d0 100644 --- a/application/Preorder/PreorderModel.php +++ b/application/Preorder/PreorderModel.php @@ -47,7 +47,8 @@ class PreorderModel { public $phone; public $email; public $technology; - public $patchposition; + public $equipment_name; + public $equipment_port; public $is_additional_order; public $shipping_address; public $addon_services; diff --git a/db/migrations/20231009075040_preorder_add_equipment.php b/db/migrations/20231009075040_preorder_add_equipment.php new file mode 100644 index 000000000..eb07e8cec --- /dev/null +++ b/db/migrations/20231009075040_preorder_add_equipment.php @@ -0,0 +1,32 @@ +getEnvironment() == "thetool") { + $table = $this->table("Preorder"); + $table->addColumn("equipment_name", "string", ["null" => true, "default" => null, "limit" => 1024, "after" => "technology"]); + $table->renameColumn("patchposition", "equipment_port"); + $table->update(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + + } + + if($this->getEnvironment() == "addressdb") { + + } + } +} diff --git a/public/docs/preorder-api.yaml b/public/docs/preorder-api.yaml index 4a595ed34..bcc775559 100644 --- a/public/docs/preorder-api.yaml +++ b/public/docs/preorder-api.yaml @@ -544,7 +544,7 @@ paths: description: Zeitpunkt der Anlage der Bestellung in ISO 8601 Format example: "2023-02-01T00:00:00+01:00" created_ts: - type: int + type: integer description: Zeitpunkt der Anlage der Bestellung in Sekunden seit der Unix Epoche example: 1675206000 updated: @@ -553,7 +553,7 @@ paths: description: Zeitpunkt der letzen Bearbeitung der Bestellung in ISO 8601 Format example: "2023-02-01T00:00:00+01:00" updated_ts: - type: int + type: integer description: Zeitpunkt der letzten Bearbeitung der Bestellung in Sekunden seit der Unix Epoche example: 1675206000 '400': @@ -615,7 +615,11 @@ paths: | 260 | ONT picked up or shipped | ONT abgeholt oder versandt | | 300 | ONT installed | ONT in Betrieb | | 500 | Finished | Fertiggestellt | - | 899 | Cancelled | Storniert/Gekündigt | + | 899 | Cancelled | Storniert: Keine Leitungsrechte / Genehmigung | + | 900 | Cancelled | Storniert: Wirtschaftliche Umstände | + | 910 | Cancelled | Storniert: Keine Begründung | + | 920 | Cancelled | Gekündigt durch Kunde | + | 921 | Cancelled | Gekündigt durch ISP | content: application/json: schema: @@ -662,18 +666,26 @@ paths: | 120 | Underground construction planning finished | Tiefbau Planung abgeschlossen | | 130 | Underground construction work assigned | Bauauftrag zugeteilt | | 140 | Conduit at property border | Rohr an Grundstücksgrenze | + | 145 | Installation kit picked up or shipped | Hausanschlusspaket an Kunden übergeben/versandt | | 200 | Conduit in building | Rohr im Gebäude | | 210 | Fiber planning | Leitungsplan in Arbeit | | 220 | Fiber planning finished | Leitungsplan abgeschlossen | | 230 | Fiber installation work assigned | Bauauftrag zugeteilt | | 235 | Fiber on property line | Faser an Grundstücksgrenze | | 240 | Fiber in building | Faser im Gebäude | - | 245 | OTO intalled | Anschlussbox installiert | + | 241 | BEP installed (multi-dwelling) | HÜP installiert (MPH) | + | 242 | Inhouse cabeling finished (multi-dwelling) | Hausverkabelung erledigt (MPH) | + | 244 | BEP installed (single-dwelling) | HÜP installiert (EFH) | + | 245 | OTO installed | Anschlussbox installiert | | 250 | ONT ready | ONT vorbereitet | | 260 | ONT picked up or shipped | ONT abgeholt oder versandt | | 300 | ONT installed | ONT in Betrieb | | 500 | Finished | Fertiggestellt | - | 899 | Cancelled | Storniert/Gekündigt | + | 899 | Cancelled | Storniert: Keine Leitungsrechte / Genehmigung | + | 900 | Cancelled | Storniert: Wirtschaftliche Umstände | + | 910 | Cancelled | Storniert: Keine Begründung | + | 920 | Cancelled | Gekündigt durch Kunde | + | 921 | Cancelled | Gekündigt durch ISP | content: application/json: schema: @@ -734,7 +746,7 @@ components: format: date-time description: ISO 8601 Timestamp timestampInt: - type: int + type: integer description: Timestamp in seconds of the Unix Epoch Zips: type: array @@ -816,15 +828,15 @@ components: description: Hochwert der Zugangskoordinate example: "262389.89" building_unit_count: - type: int64 + type: integer description: Anzahl Wohneinheiten im Gebäude example: 6 gps_lat: - typee: float + type: number description: Breitengrad der GPS-Koordinate (Dezimal) example: 48.517560 gps_long: - typee: float + type: number description: Längengrad der GPS-Koordinate (Dezimal) example: 13.950665 rollout_year: @@ -859,7 +871,7 @@ components: description: OAID der Wohneinheit example: AT-9999-abcdef01.001 num: - type: int64 + type: integer description: Fortlaufende Nummer der Wohneinheit example: 2 block: @@ -936,11 +948,11 @@ components: description: Hochwert der Zugangskoordinate example: "262389.89" building_unit_count: - type: int64 + type: integer description: Anzahl Wohneinheiten im Gebäude example: 6 num: - type: int64 + type: integer description: Fortlaufende Nummer der Wohneinheit example: 2 block: @@ -964,11 +976,11 @@ components: description: Addresszusatz example: im Carport gps_lat: - typee: float + type: number description: Breitengrad der GPS-Koordinate (Dezimal) example: 48.517560 gps_long: - typee: float + type: number description: Längengrad der GPS-Koordinate (Dezimal) example: 13.950665 rollout_year: @@ -1112,7 +1124,7 @@ components: description: Anzahl Anschlüsse bei mehreren Anschlüssen in Mehrfamilienhaus nullable: true isAdditionalOrder: - type: bolean + type: boolean default: false description: wenn es sich um eine Zweitbestellung auf einer Wohneinheit handelt, muss `isAdditonalOrder` auf `true` gestellt werden, damit die Bestellung akzeptiert wird. nullable: true @@ -1122,11 +1134,18 @@ components: description: Bei Provider eingesetzte Technologie (optional, falls für Patchpunkt im POP nötig) example: gpon nullable: true - patchposition: + equipment_name: type: string default: null - description: Patchpunkt im POP (optional) + description: Patchpunkt im POP (Gerätename) nullable: true + example: "swmurau01" + equipment_port: + type: string + default: null + description: Patchpunkt im POP (Portnummer) + nullable: true + example: "b24" acceptMarketing: type: boolean description: Zustimmung Datenspeicherung/-weitergabe @@ -1380,6 +1399,24 @@ components: | provision | Vorsorgeanschluss | | order | Vollanschluss | | reorder | Nachbestellung (nach Bauabschluss) | + technology: + type: string + default: gpon + description: Bei Provider eingesetzte Technologie (optional, falls für Patchpunkt im POP nötig) + example: gpon + nullable: true + equipment_name: + type: string + default: null + description: Patchpunkt im POP (Gerätename) + nullable: true + example: "swmurau01" + equipment_port: + type: string + default: null + description: Patchpunkt im POP (Portnummer) + nullable: true + example: "b24" acceptMarketing: type: boolean description: Zustimmung Datenspeicherung/-weitergabe @@ -1452,7 +1489,7 @@ components: description: Zeitpunkt der Anlage der Bestellung in ISO 8601 Format example: "2023-02-01T00:00:00+01:00" created_ts: - type: int + type: integer description: Zeitpunkt der Anlage der Bestellung in Sekunden seit der Unix Epoche example: 1675206000 updated: @@ -1461,7 +1498,7 @@ components: description: Zeitpunkt der letzen Bearbeitung der Bestellung in ISO 8601 Format example: "2023-02-01T00:00:00+01:00" updated_ts: - type: int + type: integer description: Zeitpunkt der letzten Bearbeitung der Bestellung in Sekunden seit der Unix Epoche example: 1675206000 securitySchemes: