refactor: Rename project order file and clean up file structure
- Rename project_order.json to order_project.json for consistency with order_ads.json naming convention - Update all references in ProjectService and ProjectsController
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@ Thumbs.db
|
|||||||
# Dependencies
|
# Dependencies
|
||||||
node_modules/
|
node_modules/
|
||||||
vendor/
|
vendor/
|
||||||
|
ai/
|
||||||
|
|
||||||
# Environment files
|
# Environment files
|
||||||
.env
|
.env
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ class ProjectsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ignore special files
|
// Ignore special files
|
||||||
if (in_array($project, ['project_order.json', 'logins.json'])) {
|
if (in_array($project, ['order_project.json', 'logins.json'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class ProjectService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save project order to project_order.json
|
* Save project order to order_project.json
|
||||||
*/
|
*/
|
||||||
public static function saveProjectOrder($clientDir, $orderData) {
|
public static function saveProjectOrder($clientDir, $orderData) {
|
||||||
$base = realpath(__DIR__ . FileSystemService::getAreaPath() . '/' . $clientDir);
|
$base = realpath(__DIR__ . FileSystemService::getAreaPath() . '/' . $clientDir);
|
||||||
@@ -75,7 +75,7 @@ class ProjectService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save new order
|
// Save new order
|
||||||
$projectOrderFile = $base . '/project_order.json';
|
$projectOrderFile = $base . '/order_project.json';
|
||||||
$result = file_put_contents($projectOrderFile, json_encode($orderData['order'], JSON_PRETTY_PRINT));
|
$result = file_put_contents($projectOrderFile, json_encode($orderData['order'], JSON_PRETTY_PRINT));
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
@@ -83,7 +83,7 @@ class ProjectService {
|
|||||||
'success' => false,
|
'success' => false,
|
||||||
'error' => [
|
'error' => [
|
||||||
'code' => 'WRITE_ERROR',
|
'code' => 'WRITE_ERROR',
|
||||||
'message' => 'Fehler beim Speichern der project_order.json.'
|
'message' => 'Fehler beim Speichern der order_project.json.'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -149,7 +149,7 @@ class ProjectService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static function loadProjectOrder($basePath) {
|
private static function loadProjectOrder($basePath) {
|
||||||
$projectOrderFile = $basePath . '/project_order.json';
|
$projectOrderFile = $basePath . '/order_project.json';
|
||||||
$projectOrder = [];
|
$projectOrder = [];
|
||||||
|
|
||||||
if (file_exists($projectOrderFile)) {
|
if (file_exists($projectOrderFile)) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Der `area/` Ordner enthält alle Projektdaten und Media-Dateien für die AdsPrev
|
|||||||
area/
|
area/
|
||||||
├── logins.json # Login-Konfiguration für Clients
|
├── logins.json # Login-Konfiguration für Clients
|
||||||
├── [Client-Name]/ # Pro Client ein Ordner
|
├── [Client-Name]/ # Pro Client ein Ordner
|
||||||
│ ├── project_order.json # Reihenfolge der Projekte für den Client
|
│ ├── order_project.json # Reihenfolge der Projekte für den Client
|
||||||
│ └── [Projekt-Name]/ # Pro Projekt ein Ordner
|
│ └── [Projekt-Name]/ # Pro Projekt ein Ordner
|
||||||
│ ├── index.php # Optional: Custom PHP für das Projekt
|
│ ├── index.php # Optional: Custom PHP für das Projekt
|
||||||
│ ├── ads/ # Werbemittel-Ordner
|
│ ├── ads/ # Werbemittel-Ordner
|
||||||
@@ -51,12 +51,12 @@ Definiert die verfügbaren Clients und deren Zugriffsdaten:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `area/[Client]/project_order.json`
|
### `area/[Client]/order_project.json`
|
||||||
Definiert die Reihenfolge der Projekte für einen Client:
|
Definiert die Reihenfolge der Projekte für einen Client:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"project_order": [
|
"order_project": [
|
||||||
"Projekt1",
|
"Projekt1",
|
||||||
"Projekt2",
|
"Projekt2",
|
||||||
"Projekt3"
|
"Projekt3"
|
||||||
@@ -82,7 +82,7 @@ logo_image: "logo.png"
|
|||||||
area/
|
area/
|
||||||
├── logins.json
|
├── logins.json
|
||||||
├── Paramount/
|
├── Paramount/
|
||||||
│ ├── project_order.json
|
│ ├── order_project.json
|
||||||
│ ├── Mission_Impossible_7/
|
│ ├── Mission_Impossible_7/
|
||||||
│ │ ├── ads/
|
│ │ ├── ads/
|
||||||
│ │ │ ├── Kinobanner/
|
│ │ │ ├── Kinobanner/
|
||||||
@@ -139,7 +139,7 @@ area/
|
|||||||
1. ✅ `area/` Ordner im Projekt-Root erstellen
|
1. ✅ `area/` Ordner im Projekt-Root erstellen
|
||||||
2. ✅ `logins.json` mit Client-Daten anlegen
|
2. ✅ `logins.json` mit Client-Daten anlegen
|
||||||
3. ✅ Client-Ordner erstellen
|
3. ✅ Client-Ordner erstellen
|
||||||
4. ✅ `project_order.json` für jeden Client
|
4. ✅ `order_project.json` für jeden Client
|
||||||
5. ✅ Projekt-Ordner mit `setup/` Verzeichnis
|
5. ✅ Projekt-Ordner mit `setup/` Verzeichnis
|
||||||
6. ✅ `ads/` Struktur nach Kampagnen organisieren
|
6. ✅ `ads/` Struktur nach Kampagnen organisieren
|
||||||
7. ✅ Media-Dateien hochladen und testen
|
7. ✅ Media-Dateien hochladen und testen
|
||||||
@@ -70,7 +70,7 @@ public_html/ (oder htdocs/)
|
|||||||
├── area/ # Client Project Files
|
├── area/ # Client Project Files
|
||||||
│ ├── Paramount/
|
│ ├── Paramount/
|
||||||
│ ├── Studiocanal/
|
│ ├── Studiocanal/
|
||||||
│ └── project_order.json
|
│ └── order_project.json
|
||||||
├── api/ # PHP Backend
|
├── api/ # PHP Backend
|
||||||
├── storage/ # User Data (needs write permissions!)
|
├── storage/ # User Data (needs write permissions!)
|
||||||
│ └── data/
|
│ └── data/
|
||||||
Reference in New Issue
Block a user