From 7f77450b2a1fbae9dac6aacafb557638dd953e48 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Fri, 19 Jan 2024 16:08:08 +0300 Subject: [PATCH 1/2] add new status for thunder: open --- src/Models/FormsStatus.php | 9 +++++++++ src/Models/Response.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Models/FormsStatus.php b/src/Models/FormsStatus.php index 9aa90f36..96767ab9 100644 --- a/src/Models/FormsStatus.php +++ b/src/Models/FormsStatus.php @@ -29,6 +29,15 @@ public function getRows(): array 'icon' => 'heroicon-o-document', 'class' => 'px-2 py-0.5 text-xs rounded-xl text-success-700 bg-success-500/10', ], + [ + 'key' => 'OPEN', + 'label' => __('Open'), + 'description' => 'used when a new form created by the user or an employee', + 'color' => 'success', + 'chartColor' => '#21C55D', + 'icon' => 'heroicon-o-document', + 'class' => 'px-2 py-0.5 text-xs rounded-xl text-success-700 bg-success-500/10', + ], [ 'key' => 'CLOSE', 'label' => __('closed'), diff --git a/src/Models/Response.php b/src/Models/Response.php index 4b69a563..ccd974c1 100644 --- a/src/Models/Response.php +++ b/src/Models/Response.php @@ -75,7 +75,7 @@ public function statusDetails(): array return [ 'class' => $getStatues->class ?? '', - 'icon' => $getStatues->icon ?? 'heroicon-o-status-online', + 'icon' => $getStatues->icon ?? 'heroicon-s-document', 'label' => $getStatues->label ?? $this->status, 'key' => $getStatues->key ?? '', 'color' => $getStatues->color ?? '', From 4f5cfdc56bf4e5cd0cebf8794700210783e43122 Mon Sep 17 00:00:00 2001 From: atmonshi Date: Fri, 19 Jan 2024 13:08:36 +0000 Subject: [PATCH 2/2] Fix styling --- src/Contracts/Extension.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Contracts/Extension.php b/src/Contracts/Extension.php index e7e63bca..817a1553 100644 --- a/src/Contracts/Extension.php +++ b/src/Contracts/Extension.php @@ -12,8 +12,8 @@ public function label(): string; * before displaying the form, do some checks * for example check if the $data['extensionSlug'] param is existed, or the user is logged in ! * - * @param Form $form Bolt form - * @param array $data extra data + * @param Form $form Bolt form + * @param array $data extra data */ public function canView(Form $form, array $data): bool | array | null; @@ -22,8 +22,8 @@ public function canView(Form $form, array $data): bool | array | null; * * return a blade file with view()->render() * - * @param Form $form Bolt form - * @param array $data extra data + * @param Form $form Bolt form + * @param array $data extra data */ public function render(Form $form, array $data): ?string; @@ -38,8 +38,8 @@ public function formComponents(Form $form): ?array; * the store logic for the app, insert ticket or any DB ONLY calls, don't send here anything, * and you must return the saved app, if you want to depend on it in the postStore * - * @param Form $form Bolt form - * @param array $data extra data + * @param Form $form Bolt form + * @param array $data extra data * * @throws \Exception */ @@ -48,7 +48,7 @@ public function store(Form $form, array $data): ?array; /** * this typically used for sending only, it will execute after the DB::transaction * - * @param Form $form Bolt form + * @param Form $form Bolt form */ public function postStore(Form $form, array $data): void; @@ -56,7 +56,7 @@ public function postStore(Form $form, array $data): void; * this will show any info after saving the form, like ticket num or more buttons and links * also it's better to use blade file, view()->render() * - * @param Form $form Bolt form + * @param Form $form Bolt form */ public function SubmittedRender(Form $form, array $data): ?string; }