refactor(shop-statuses): migrate to DI, restructure docs into docs/ folder (0.268)

- Migrate ShopStatuses module to Domain + DI architecture
- Add ShopStatusRepository, ShopStatusesController with color picker
- Convert front\factory\ShopStatuses to facade
- Add FormFieldType::COLOR with HTML5 color picker
- Move documentation files to docs/ folder (PROJECT_STRUCTURE, REFACTORING_PLAN, CHANGELOG, FORM_EDIT_SYSTEM, TESTING, DATABASE_STRUCTURE)
- Tests: 254 tests, 736 assertions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 10:43:31 +01:00
parent 7574785d68
commit 847fdbbf3f
29 changed files with 1895 additions and 1572 deletions

View File

@@ -1,34 +0,0 @@
<?
namespace admin\controls;
class ShopStatuses {
// status_save
public static function status_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania statusu wystąpił błąd. Proszę spróbować ponownie.' ];
$values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\ShopStatuses::status_save( $values['id'], $values['color'], $values['apilo_status_id'] ) )
$response = [ 'status' => 'ok', 'msg' => 'Status został zapisany.', 'id' => $id ];
echo json_encode( $response );
exit;
}
// status_edit
public static function status_edit()
{
return \Tpl::view( 'shop-statuses/status-edit', [
'status' => \admin\factory\ShopStatuses::get_status( \S::get( 'id' ) ),
'apilo_order_status_list' => unserialize( \admin\factory\Integrations::apilo_settings( 'status-types-list' ) ),
] );
}
static public function view_list()
{
return \Tpl::view( 'shop-statuses/view-list', [
'apilo_order_status_list' => unserialize( \admin\factory\Integrations::apilo_settings( 'status-types-list' ) ),
] );
}
}