From 8d48f6f4eb42d6d038dc3b5443244bd8cdc7cd84 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Mon, 22 Jul 2024 01:12:51 +0800 Subject: [PATCH] 1688 admin work flow clean up and call api --- app/Models/WorkflowTimestamp.php | 47 ++ ...22302_create_workflow_timestamps_table.php | 35 + .../AdminWorkFlowSectionComponent.vue | 602 +++++++++--------- routes/admin_work_flow.php | 90 +++ routes/api.php | 2 + 5 files changed, 470 insertions(+), 306 deletions(-) create mode 100644 app/Models/WorkflowTimestamp.php create mode 100644 database/migrations/2024_07_21_222302_create_workflow_timestamps_table.php create mode 100644 routes/admin_work_flow.php diff --git a/app/Models/WorkflowTimestamp.php b/app/Models/WorkflowTimestamp.php new file mode 100644 index 00000000..bb189afb --- /dev/null +++ b/app/Models/WorkflowTimestamp.php @@ -0,0 +1,47 @@ + 'datetime', + ]; + + /** + * Get the user that owns the workflow timestamp. + */ + public function user() + { + return $this->belongsTo(User::class, 'userId'); + } +} diff --git a/database/migrations/2024_07_21_222302_create_workflow_timestamps_table.php b/database/migrations/2024_07_21_222302_create_workflow_timestamps_table.php new file mode 100644 index 00000000..5a166ffd --- /dev/null +++ b/database/migrations/2024_07_21_222302_create_workflow_timestamps_table.php @@ -0,0 +1,35 @@ +id(); + $table->string('node'); + $table->integer('seconds'); + $table->unsignedBigInteger('userId'); + $table->string('session_id'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('workflow_timestamps'); + } +} diff --git a/resources/assets/vue/components/general/sections/AdminWorkFlowSectionComponent.vue b/resources/assets/vue/components/general/sections/AdminWorkFlowSectionComponent.vue index 3190ed5e..1d88a6ea 100644 --- a/resources/assets/vue/components/general/sections/AdminWorkFlowSectionComponent.vue +++ b/resources/assets/vue/components/general/sections/AdminWorkFlowSectionComponent.vue @@ -1,120 +1,119 @@