update
This commit is contained in:
3
.env
3
.env
@@ -16,3 +16,6 @@ DB_CHARSET=utf8mb4
|
|||||||
INTEGRATIONS_SECRET=nB3sTkXAbBLqA2Ent74R9Mi1118bAbWa
|
INTEGRATIONS_SECRET=nB3sTkXAbBLqA2Ent74R9Mi1118bAbWa
|
||||||
|
|
||||||
pracownia.key=9554daf4bbcbbb5e72a2b48ee7d6a7f20262713d72484b781460e2c772d813fc
|
pracownia.key=9554daf4bbcbbb5e72a2b48ee7d6a7f20262713d72484b781460e2c772d813fc
|
||||||
|
|
||||||
|
login=jacek.pyziak@project-pro.pl
|
||||||
|
password=ProjectPro2025!
|
||||||
1
.playwright-mcp/console-2026-03-26T22-55-27-422Z.log
Normal file
1
.playwright-mcp/console-2026-03-26T22-55-27-422Z.log
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[ 508ms] [ERROR] Failed to load resource: the server responded with a status of 404 () @ https://orderpro.projectpro.pl/favicon.ico:0
|
||||||
190
.vscode/ftp-kr.sync.cache.json
vendored
190
.vscode/ftp-kr.sync.cache.json
vendored
@@ -380,8 +380,8 @@
|
|||||||
},
|
},
|
||||||
"cron.php": {
|
"cron.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 4212,
|
"size": 796,
|
||||||
"lmtime": 1772997988131,
|
"lmtime": 1774474838216,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"debug_allegro_offer_image.php": {
|
"debug_allegro_offer_image.php": {
|
||||||
@@ -965,8 +965,8 @@
|
|||||||
"DOCS": {
|
"DOCS": {
|
||||||
"ARCHITECTURE.md": {
|
"ARCHITECTURE.md": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 33394,
|
"size": 35120,
|
||||||
"lmtime": 1774285995231,
|
"lmtime": 1774475884811,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"DB_SCHEMA.md": {
|
"DB_SCHEMA.md": {
|
||||||
@@ -995,14 +995,14 @@
|
|||||||
},
|
},
|
||||||
"TECH_CHANGELOG.md": {
|
"TECH_CHANGELOG.md": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 51132,
|
"size": 57304,
|
||||||
"lmtime": 1774286010490,
|
"lmtime": 1774475891183,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"todo.md": {
|
"todo.md": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 3510,
|
"size": 3512,
|
||||||
"lmtime": 1774296458106,
|
"lmtime": 1774474971584,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2250,8 +2250,8 @@
|
|||||||
"css": {
|
"css": {
|
||||||
"app.css": {
|
"app.css": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 53388,
|
"size": 43993,
|
||||||
"lmtime": 1774304255719,
|
"lmtime": 1774474931663,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"app.css.map": {
|
"app.css.map": {
|
||||||
@@ -2262,8 +2262,8 @@
|
|||||||
},
|
},
|
||||||
"login.css": {
|
"login.css": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 5308,
|
"size": 5996,
|
||||||
"lmtime": 1773008638575,
|
"lmtime": 1774474932148,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"login.css.map": {
|
"login.css.map": {
|
||||||
@@ -2284,17 +2284,17 @@
|
|||||||
"img": {},
|
"img": {},
|
||||||
"js": {
|
"js": {
|
||||||
"modules": {
|
"modules": {
|
||||||
|
"automation-form.js": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 7251,
|
||||||
|
"lmtime": 1774475530521,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
"jquery-alerts.js": {
|
"jquery-alerts.js": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 5768,
|
"size": 5768,
|
||||||
"lmtime": 1771873304132,
|
"lmtime": 1771873304132,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
|
||||||
"automation-form.js": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 5053,
|
|
||||||
"lmtime": 1773789606719,
|
|
||||||
"modified": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2382,6 +2382,12 @@
|
|||||||
"lmtime": 1773789611848,
|
"lmtime": 1773789611848,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
|
"_delivery-status-mappings.scss": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 212,
|
||||||
|
"lmtime": 1774304202952,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
"_delivery-status.scss": {
|
"_delivery-status.scss": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 802,
|
"size": 802,
|
||||||
@@ -2396,8 +2402,8 @@
|
|||||||
},
|
},
|
||||||
"_printing.scss": {
|
"_printing.scss": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 939,
|
"size": 1115,
|
||||||
"lmtime": 0,
|
"lmtime": 1774474924746,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"_shipment-presets.scss": {
|
"_shipment-presets.scss": {
|
||||||
@@ -2405,12 +2411,6 @@
|
|||||||
"size": 2629,
|
"size": 2629,
|
||||||
"lmtime": 1774219643850,
|
"lmtime": 1774219643850,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
|
||||||
"_delivery-status-mappings.scss": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 212,
|
|
||||||
"lmtime": 1774304202952,
|
|
||||||
"modified": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"shared": {
|
"shared": {
|
||||||
@@ -2491,9 +2491,9 @@
|
|||||||
},
|
},
|
||||||
"list.php": {
|
"list.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 3380,
|
"size": 1603,
|
||||||
"lmtime": 1773004094862,
|
"lmtime": 1774473665048,
|
||||||
"modified": true
|
"modified": false
|
||||||
},
|
},
|
||||||
"partials": {
|
"partials": {
|
||||||
"email-send-modal.php": {
|
"email-send-modal.php": {
|
||||||
@@ -2511,8 +2511,8 @@
|
|||||||
},
|
},
|
||||||
"show.php": {
|
"show.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 39716,
|
"size": 40747,
|
||||||
"lmtime": 1774295938464,
|
"lmtime": 1774474658482,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2630,8 +2630,8 @@
|
|||||||
},
|
},
|
||||||
"printing.php": {
|
"printing.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 8683,
|
"size": 10591,
|
||||||
"lmtime": 0,
|
"lmtime": 1774475356232,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"products.php": {
|
"products.php": {
|
||||||
@@ -2670,16 +2670,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"automation": {
|
"automation": {
|
||||||
"index.php": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 3962,
|
|
||||||
"lmtime": 1773789562003,
|
|
||||||
"modified": false
|
|
||||||
},
|
|
||||||
"form.php": {
|
"form.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 7536,
|
"size": 12406,
|
||||||
"lmtime": 1773789588610,
|
"lmtime": 1774475517368,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
|
"index.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 4020,
|
||||||
|
"lmtime": 1774474734632,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2688,8 +2688,8 @@
|
|||||||
"routes": {
|
"routes": {
|
||||||
"web.php": {
|
"web.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 24661,
|
"size": 24767,
|
||||||
"lmtime": 1774305148776,
|
"lmtime": 1774475608068,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2744,9 +2744,23 @@
|
|||||||
"Core": {
|
"Core": {
|
||||||
"Application.php": {
|
"Application.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 8679,
|
"size": 9588,
|
||||||
"lmtime": 1772997978216,
|
"lmtime": 1774474842256,
|
||||||
"modified": true
|
"modified": false
|
||||||
|
},
|
||||||
|
"Constants": {
|
||||||
|
"IntegrationSources.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 263,
|
||||||
|
"lmtime": 1773397435140,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
|
"RedirectPaths.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 643,
|
||||||
|
"lmtime": 1773397436702,
|
||||||
|
"modified": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Database": {
|
"Database": {
|
||||||
"ConnectionFactory.php": {
|
"ConnectionFactory.php": {
|
||||||
@@ -2871,20 +2885,6 @@
|
|||||||
"lmtime": 1771460443424,
|
"lmtime": 1771460443424,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"Constants": {
|
|
||||||
"IntegrationSources.php": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 263,
|
|
||||||
"lmtime": 1773397435140,
|
|
||||||
"modified": false
|
|
||||||
},
|
|
||||||
"RedirectPaths.php": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 643,
|
|
||||||
"lmtime": 1773397436702,
|
|
||||||
"modified": false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Modules": {
|
"Modules": {
|
||||||
@@ -2949,8 +2949,8 @@
|
|||||||
},
|
},
|
||||||
"CronHandlerFactory.php": {
|
"CronHandlerFactory.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 5705,
|
"size": 7691,
|
||||||
"lmtime": 1774293819740,
|
"lmtime": 1774475612061,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"CronJobProcessor.php": {
|
"CronJobProcessor.php": {
|
||||||
@@ -2991,8 +2991,8 @@
|
|||||||
},
|
},
|
||||||
"ShipmentTrackingHandler.php": {
|
"ShipmentTrackingHandler.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1602,
|
"size": 3332,
|
||||||
"lmtime": 1774294151963,
|
"lmtime": 1774474758047,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"ShopProOfferTitlesRefreshHandler.php": {
|
"ShopProOfferTitlesRefreshHandler.php": {
|
||||||
@@ -3095,14 +3095,14 @@
|
|||||||
},
|
},
|
||||||
"OrdersController.php": {
|
"OrdersController.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 33392,
|
"size": 33087,
|
||||||
"lmtime": 1774216760398,
|
"lmtime": 1774473628426,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"OrdersRepository.php": {
|
"OrdersRepository.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 32265,
|
"size": 34109,
|
||||||
"lmtime": 1774216750636,
|
"lmtime": 1774474648512,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"OrderStatusSyncService.php": {
|
"OrderStatusSyncService.php": {
|
||||||
@@ -3227,14 +3227,14 @@
|
|||||||
},
|
},
|
||||||
"AllegroOrderImportService.php": {
|
"AllegroOrderImportService.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 29642,
|
"size": 30679,
|
||||||
"lmtime": 1773397494713,
|
"lmtime": 1774474628606,
|
||||||
"modified": true
|
"modified": false
|
||||||
},
|
},
|
||||||
"AllegroOrdersSyncService.php": {
|
"AllegroOrdersSyncService.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 8112,
|
"size": 8127,
|
||||||
"lmtime": 1773396210179,
|
"lmtime": 1774474632492,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"AllegroOrderSyncStateRepository.php": {
|
"AllegroOrderSyncStateRepository.php": {
|
||||||
@@ -3263,9 +3263,9 @@
|
|||||||
},
|
},
|
||||||
"AllegroStatusSyncService.php": {
|
"AllegroStatusSyncService.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 3870,
|
"size": 3885,
|
||||||
"lmtime": 1773397499705,
|
"lmtime": 1774474635936,
|
||||||
"modified": true
|
"modified": false
|
||||||
},
|
},
|
||||||
"AllegroTokenManager.php": {
|
"AllegroTokenManager.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
@@ -3401,8 +3401,8 @@
|
|||||||
},
|
},
|
||||||
"PrintSettingsController.php": {
|
"PrintSettingsController.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 3404,
|
"size": 4210,
|
||||||
"lmtime": 0,
|
"lmtime": 1774474891200,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"ReceiptConfigController.php": {
|
"ReceiptConfigController.php": {
|
||||||
@@ -3611,8 +3611,8 @@
|
|||||||
"Automation": {
|
"Automation": {
|
||||||
"AutomationController.php": {
|
"AutomationController.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 11363,
|
"size": 14859,
|
||||||
"lmtime": 1773789536055,
|
"lmtime": 1774475481168,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"AutomationRepository.php": {
|
"AutomationRepository.php": {
|
||||||
@@ -3623,8 +3623,34 @@
|
|||||||
},
|
},
|
||||||
"AutomationService.php": {
|
"AutomationService.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 5382,
|
"size": 22368,
|
||||||
"lmtime": 1773790173434,
|
"lmtime": 1774475866269,
|
||||||
|
"modified": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Printing": {
|
||||||
|
"ApiKeyMiddleware.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 1077,
|
||||||
|
"lmtime": 0,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
|
"PrintApiController.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 5405,
|
||||||
|
"lmtime": 1774473708117,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
|
"PrintApiKeyRepository.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 2143,
|
||||||
|
"lmtime": 0,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
|
"PrintJobRepository.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 4696,
|
||||||
|
"lmtime": 1774474858944,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
delivery-tab-bug.png
Normal file
BIN
delivery-tab-bug.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 121 KiB |
@@ -54,6 +54,11 @@ $eventLabels = [
|
|||||||
</td>
|
</td>
|
||||||
<td style="white-space:nowrap">
|
<td style="white-space:nowrap">
|
||||||
<a href="/settings/automation/edit?id=<?= (int) ($rule['id'] ?? 0) ?>" class="btn btn--sm btn--secondary">Edytuj</a>
|
<a href="/settings/automation/edit?id=<?= (int) ($rule['id'] ?? 0) ?>" class="btn btn--sm btn--secondary">Edytuj</a>
|
||||||
|
<form action="/settings/automation/duplicate" method="post" style="display:inline">
|
||||||
|
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
||||||
|
<input type="hidden" name="id" value="<?= (int) ($rule['id'] ?? 0) ?>">
|
||||||
|
<button type="submit" class="btn btn--sm btn--secondary">Duplikuj</button>
|
||||||
|
</form>
|
||||||
<form action="/settings/automation/toggle" method="post" style="display:inline">
|
<form action="/settings/automation/toggle" method="post" style="display:inline">
|
||||||
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
||||||
<input type="hidden" name="id" value="<?= (int) ($rule['id'] ?? 0) ?>">
|
<input type="hidden" name="id" value="<?= (int) ($rule['id'] ?? 0) ?>">
|
||||||
|
|||||||
@@ -74,27 +74,21 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</summary>
|
</summary>
|
||||||
<div class="sidebar__group-links">
|
<div class="sidebar__group-links">
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'users' ? ' is-active' : '' ?>" href="/settings/users">
|
|
||||||
<?= $e($t('navigation.users')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'database' ? ' is-active' : '' ?>" href="/settings/database">
|
|
||||||
<?= $e($t('navigation.database')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'statuses' ? ' is-active' : '' ?>" href="/settings/statuses">
|
|
||||||
<?= $e($t('navigation.statuses')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'cron' ? ' is-active' : '' ?>" href="/settings/cron">
|
|
||||||
<?= $e($t('navigation.cron')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && in_array($currentSettings, ['integrations', 'allegro', 'apaczka', 'inpost', 'shoppro'], true) ? ' is-active' : '' ?>" href="/settings/integrations">
|
|
||||||
<?= $e($t('navigation.integrations')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'company' ? ' is-active' : '' ?>" href="/settings/company">
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'company' ? ' is-active' : '' ?>" href="/settings/company">
|
||||||
<?= $e($t('navigation.company')) ?>
|
<?= $e($t('navigation.company')) ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'accounting' ? ' is-active' : '' ?>" href="/settings/accounting">
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'accounting' ? ' is-active' : '' ?>" href="/settings/accounting">
|
||||||
<?= $e($t('navigation.accounting')) ?>
|
<?= $e($t('navigation.accounting')) ?>
|
||||||
</a>
|
</a>
|
||||||
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'users' ? ' is-active' : '' ?>" href="/settings/users">
|
||||||
|
<?= $e($t('navigation.users')) ?>
|
||||||
|
</a>
|
||||||
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && in_array($currentSettings, ['integrations', 'allegro', 'apaczka', 'inpost', 'shoppro'], true) ? ' is-active' : '' ?>" href="/settings/integrations">
|
||||||
|
<?= $e($t('navigation.integrations')) ?>
|
||||||
|
</a>
|
||||||
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'statuses' ? ' is-active' : '' ?>" href="/settings/statuses">
|
||||||
|
<?= $e($t('navigation.statuses')) ?>
|
||||||
|
</a>
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'email-mailboxes' ? ' is-active' : '' ?>" href="/settings/email-mailboxes">
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'email-mailboxes' ? ' is-active' : '' ?>" href="/settings/email-mailboxes">
|
||||||
Skrzynki pocztowe
|
Skrzynki pocztowe
|
||||||
</a>
|
</a>
|
||||||
@@ -104,12 +98,18 @@
|
|||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'automation' ? ' is-active' : '' ?>" href="/settings/automation">
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'automation' ? ' is-active' : '' ?>" href="/settings/automation">
|
||||||
Zadania automatyczne
|
Zadania automatyczne
|
||||||
</a>
|
</a>
|
||||||
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'cron' ? ' is-active' : '' ?>" href="/settings/cron">
|
||||||
|
<?= $e($t('navigation.cron')) ?>
|
||||||
|
</a>
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'printing' ? ' is-active' : '' ?>" href="/settings/printing">
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'printing' ? ' is-active' : '' ?>" href="/settings/printing">
|
||||||
Drukowanie
|
Drukowanie
|
||||||
</a>
|
</a>
|
||||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'delivery-status-mappings' ? ' is-active' : '' ?>" href="/settings/delivery-status-mappings">
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'delivery-status-mappings' ? ' is-active' : '' ?>" href="/settings/delivery-status-mappings">
|
||||||
Mapowanie statusów dostawy
|
Mapowanie statusów dostawy
|
||||||
</a>
|
</a>
|
||||||
|
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'database' ? ' is-active' : '' ?>" href="/settings/database">
|
||||||
|
<?= $e($t('navigation.database')) ?>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@@ -362,8 +362,8 @@ $orderproStatuses = is_array($orderproStatuses ?? null) ? $orderproStatuses : []
|
|||||||
<input type="hidden" name="allegro_service_name[]" class="dm-hidden-service-name" value="<?= $e($currentServiceName) ?>">
|
<input type="hidden" name="allegro_service_name[]" class="dm-hidden-service-name" value="<?= $e($currentServiceName) ?>">
|
||||||
|
|
||||||
<?php // Allegro searchable select ?>
|
<?php // Allegro searchable select ?>
|
||||||
<div class="dm-allegro-panel dm-searchable-select" data-current-id="<?= $e(($currentCarrier === 'allegro' || $currentCarrier === 'inpost') ? $currentMethodId : '') ?>" data-current-name="<?= $e(($currentCarrier === 'allegro' || $currentCarrier === 'inpost') ? $currentServiceName : '') ?>" style="<?= ($currentCarrier !== 'allegro' && $currentCarrier !== 'inpost') ? 'display:none' : '' ?>">
|
<div class="dm-allegro-panel dm-searchable-select" data-current-id="<?= $e($currentCarrier === 'allegro' ? $currentMethodId : '') ?>" data-current-name="<?= $e($currentCarrier === 'allegro' ? $currentServiceName : '') ?>" style="<?= $currentCarrier !== 'allegro' ? 'display:none' : '' ?>">
|
||||||
<input type="text" class="form-control dm-search-input" placeholder="<?= $e($t('settings.allegro.delivery.fields.search_placeholder')) ?>" value="<?= $e(($currentCarrier === 'allegro' || $currentCarrier === 'inpost') ? $currentServiceName : '') ?>" autocomplete="off">
|
<input type="text" class="form-control dm-search-input" placeholder="<?= $e($t('settings.allegro.delivery.fields.search_placeholder')) ?>" value="<?= $e($currentCarrier === 'allegro' ? $currentServiceName : '') ?>" autocomplete="off">
|
||||||
<div class="searchable-select__dropdown dm-dropdown">
|
<div class="searchable-select__dropdown dm-dropdown">
|
||||||
<div class="searchable-select__option dm-option-clear" data-value="" data-label="" data-credentials-id="" data-carrier-id="">
|
<div class="searchable-select__option dm-option-clear" data-value="" data-label="" data-credentials-id="" data-carrier-id="">
|
||||||
<em class="muted">-- <?= $e($t('settings.allegro.delivery.fields.no_mapping')) ?> --</em>
|
<em class="muted">-- <?= $e($t('settings.allegro.delivery.fields.no_mapping')) ?> --</em>
|
||||||
@@ -559,7 +559,8 @@ $orderproStatuses = is_array($orderproStatuses ?? null) ? $orderproStatuses : []
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll('.dm-inpost-select, .dm-apaczka-select').forEach(function (selectEl) {
|
// Filter only for Apaczka (many services); InPost has few options
|
||||||
|
document.querySelectorAll('.dm-apaczka-select').forEach(function (selectEl) {
|
||||||
attachSelectFilter(selectEl);
|
attachSelectFilter(selectEl);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ $attachmentTypes = is_array($attachmentTypes ?? null) ? $attachmentTypes : [];
|
|||||||
</td>
|
</td>
|
||||||
<td style="white-space:nowrap">
|
<td style="white-space:nowrap">
|
||||||
<a href="/settings/email-templates?edit=<?= (int) ($tpl['id'] ?? 0) ?>" class="btn btn--sm btn--secondary">Edytuj</a>
|
<a href="/settings/email-templates?edit=<?= (int) ($tpl['id'] ?? 0) ?>" class="btn btn--sm btn--secondary">Edytuj</a>
|
||||||
|
<form action="/settings/email-templates/duplicate" method="post" style="display:inline">
|
||||||
|
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
||||||
|
<input type="hidden" name="id" value="<?= (int) ($tpl['id'] ?? 0) ?>">
|
||||||
|
<button type="submit" class="btn btn--sm btn--secondary">Duplikuj</button>
|
||||||
|
</form>
|
||||||
<button type="button" class="btn btn--sm btn--secondary js-toggle-btn"
|
<button type="button" class="btn btn--sm btn--secondary js-toggle-btn"
|
||||||
data-id="<?= (int) ($tpl['id'] ?? 0) ?>"
|
data-id="<?= (int) ($tpl['id'] ?? 0) ?>"
|
||||||
data-active="<?= (int) ($tpl['is_active'] ?? 0) ?>">
|
data-active="<?= (int) ($tpl['is_active'] ?? 0) ?>">
|
||||||
|
|||||||
@@ -391,6 +391,7 @@ return static function (Application $app): void {
|
|||||||
$router->get('/settings/email-templates', [$emailTemplateController, 'index'], [$authMiddleware]);
|
$router->get('/settings/email-templates', [$emailTemplateController, 'index'], [$authMiddleware]);
|
||||||
$router->post('/settings/email-templates/save', [$emailTemplateController, 'save'], [$authMiddleware]);
|
$router->post('/settings/email-templates/save', [$emailTemplateController, 'save'], [$authMiddleware]);
|
||||||
$router->post('/settings/email-templates/delete', [$emailTemplateController, 'delete'], [$authMiddleware]);
|
$router->post('/settings/email-templates/delete', [$emailTemplateController, 'delete'], [$authMiddleware]);
|
||||||
|
$router->post('/settings/email-templates/duplicate', [$emailTemplateController, 'duplicate'], [$authMiddleware]);
|
||||||
$router->post('/settings/email-templates/toggle', [$emailTemplateController, 'toggleStatus'], [$authMiddleware]);
|
$router->post('/settings/email-templates/toggle', [$emailTemplateController, 'toggleStatus'], [$authMiddleware]);
|
||||||
$router->post('/settings/email-templates/preview', [$emailTemplateController, 'preview'], [$authMiddleware]);
|
$router->post('/settings/email-templates/preview', [$emailTemplateController, 'preview'], [$authMiddleware]);
|
||||||
$router->get('/settings/email-templates/variables', [$emailTemplateController, 'getVariables'], [$authMiddleware]);
|
$router->get('/settings/email-templates/variables', [$emailTemplateController, 'getVariables'], [$authMiddleware]);
|
||||||
@@ -400,6 +401,7 @@ return static function (Application $app): void {
|
|||||||
$router->get('/settings/automation/edit', [$automationController, 'edit'], [$authMiddleware]);
|
$router->get('/settings/automation/edit', [$automationController, 'edit'], [$authMiddleware]);
|
||||||
$router->post('/settings/automation/update', [$automationController, 'update'], [$authMiddleware]);
|
$router->post('/settings/automation/update', [$automationController, 'update'], [$authMiddleware]);
|
||||||
$router->post('/settings/automation/delete', [$automationController, 'destroy'], [$authMiddleware]);
|
$router->post('/settings/automation/delete', [$automationController, 'destroy'], [$authMiddleware]);
|
||||||
|
$router->post('/settings/automation/duplicate', [$automationController, 'duplicate'], [$authMiddleware]);
|
||||||
$router->post('/settings/automation/toggle', [$automationController, 'toggleStatus'], [$authMiddleware]);
|
$router->post('/settings/automation/toggle', [$automationController, 'toggleStatus'], [$authMiddleware]);
|
||||||
$router->get('/settings/delivery-status-mappings', [$deliveryStatusMappingController, 'index'], [$authMiddleware]);
|
$router->get('/settings/delivery-status-mappings', [$deliveryStatusMappingController, 'index'], [$authMiddleware]);
|
||||||
$router->post('/settings/delivery-status-mappings/save', [$deliveryStatusMappingController, 'save'], [$authMiddleware]);
|
$router->post('/settings/delivery-status-mappings/save', [$deliveryStatusMappingController, 'save'], [$authMiddleware]);
|
||||||
|
|||||||
@@ -160,6 +160,29 @@ final class AutomationController
|
|||||||
return Response::redirect('/settings/automation');
|
return Response::redirect('/settings/automation');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function duplicate(Request $request): Response
|
||||||
|
{
|
||||||
|
$error = $this->validateCsrf($request);
|
||||||
|
if ($error !== null) {
|
||||||
|
return $error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = (int) $request->input('id', '0');
|
||||||
|
if ($id <= 0) {
|
||||||
|
Flash::set('settings.automation.error', 'Nieprawidlowy identyfikator');
|
||||||
|
return Response::redirect('/settings/automation');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$this->repository->duplicate($id);
|
||||||
|
Flash::set('settings.automation.success', 'Zadanie zostalo zduplikowane');
|
||||||
|
} catch (Throwable) {
|
||||||
|
Flash::set('settings.automation.error', 'Blad duplikowania zadania');
|
||||||
|
}
|
||||||
|
|
||||||
|
return Response::redirect('/settings/automation');
|
||||||
|
}
|
||||||
|
|
||||||
public function toggleStatus(Request $request): Response
|
public function toggleStatus(Request $request): Response
|
||||||
{
|
{
|
||||||
$error = $this->validateCsrf($request);
|
$error = $this->validateCsrf($request);
|
||||||
|
|||||||
@@ -126,6 +126,28 @@ final class AutomationRepository
|
|||||||
$statement->execute(['id' => $id]);
|
$statement->execute(['id' => $id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function duplicate(int $id): int
|
||||||
|
{
|
||||||
|
$source = $this->findById($id);
|
||||||
|
if ($source === null) {
|
||||||
|
throw new \RuntimeException('Zadanie nie istnieje');
|
||||||
|
}
|
||||||
|
|
||||||
|
$conditions = array_map(static function (array $c): array {
|
||||||
|
return ['type' => $c['condition_type'], 'value' => $c['condition_value']];
|
||||||
|
}, $source['conditions']);
|
||||||
|
|
||||||
|
$actions = array_map(static function (array $a): array {
|
||||||
|
return ['type' => $a['action_type'], 'config' => $a['action_config']];
|
||||||
|
}, $source['actions']);
|
||||||
|
|
||||||
|
return $this->create(
|
||||||
|
['name' => 'Kopia — ' . $source['name'], 'event_type' => $source['event_type'], 'is_active' => 0],
|
||||||
|
$conditions,
|
||||||
|
$actions
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function toggleActive(int $id): void
|
public function toggleActive(int $id): void
|
||||||
{
|
{
|
||||||
$statement = $this->pdo->prepare(
|
$statement = $this->pdo->prepare(
|
||||||
|
|||||||
@@ -196,6 +196,29 @@ final class EmailTemplateController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function duplicate(Request $request): Response
|
||||||
|
{
|
||||||
|
if (!Csrf::validate((string) $request->input('_token', ''))) {
|
||||||
|
Flash::set('settings.email_templates.error', 'Nieprawidlowy token CSRF');
|
||||||
|
return Response::redirect('/settings/email-templates');
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = (int) $request->input('id', '0');
|
||||||
|
if ($id <= 0) {
|
||||||
|
Flash::set('settings.email_templates.error', 'Nieprawidlowy identyfikator szablonu');
|
||||||
|
return Response::redirect('/settings/email-templates');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$this->repository->duplicate($id);
|
||||||
|
Flash::set('settings.email_templates.success', 'Szablon zostal zduplikowany');
|
||||||
|
} catch (Throwable) {
|
||||||
|
Flash::set('settings.email_templates.error', 'Blad duplikowania szablonu');
|
||||||
|
}
|
||||||
|
|
||||||
|
return Response::redirect('/settings/email-templates');
|
||||||
|
}
|
||||||
|
|
||||||
public function preview(Request $request): Response
|
public function preview(Request $request): Response
|
||||||
{
|
{
|
||||||
if (!Csrf::validate((string) $request->input('_token', ''))) {
|
if (!Csrf::validate((string) $request->input('_token', ''))) {
|
||||||
|
|||||||
@@ -119,4 +119,24 @@ final class EmailTemplateRepository
|
|||||||
);
|
);
|
||||||
$statement->execute(['id' => $id]);
|
$statement->execute(['id' => $id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function duplicate(int $id): void
|
||||||
|
{
|
||||||
|
$source = $this->findById($id);
|
||||||
|
if ($source === null) {
|
||||||
|
throw new \RuntimeException('Szablon nie istnieje');
|
||||||
|
}
|
||||||
|
|
||||||
|
$statement = $this->pdo->prepare(
|
||||||
|
'INSERT INTO email_templates (name, subject, body_html, mailbox_id, attachment_1, is_active)
|
||||||
|
VALUES (:name, :subject, :body_html, :mailbox_id, :attachment_1, 0)'
|
||||||
|
);
|
||||||
|
$statement->execute([
|
||||||
|
'name' => 'Kopia — ' . $source['name'],
|
||||||
|
'subject' => $source['subject'],
|
||||||
|
'body_html' => $source['body_html'],
|
||||||
|
'mailbox_id' => $source['mailbox_id'],
|
||||||
|
'attachment_1' => $source['attachment_1'],
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user