diff --git a/ProcessMaker/Console/Commands/SyncGuidedTemplates.php b/ProcessMaker/Console/Commands/SyncGuidedTemplates.php deleted file mode 100644 index 2849a9be8a..0000000000 --- a/ProcessMaker/Console/Commands/SyncGuidedTemplates.php +++ /dev/null @@ -1,41 +0,0 @@ -option('queue')) { - $randomDelay = random_int(10, 120); - Job::dispatch()->delay(now()->addMinutes($randomDelay)); - - return 0; - } - - Job::dispatchSync(); - - return 0; - } -} diff --git a/ProcessMaker/Console/Kernel.php b/ProcessMaker/Console/Kernel.php index 03fc408949..df4ce44dd8 100644 --- a/ProcessMaker/Console/Kernel.php +++ b/ProcessMaker/Console/Kernel.php @@ -37,9 +37,6 @@ protected function schedule(Schedule $schedule) $schedule->command('processmaker:sync-default-templates --queue') ->daily(); - $schedule->command('processmaker:sync-guided-templates --queue') - ->daily(); - $schedule->command('processmaker:sync-screen-templates --queue') ->daily(); diff --git a/ProcessMaker/Http/Controllers/Api/WizardTemplateController.php b/ProcessMaker/Http/Controllers/Api/WizardTemplateController.php deleted file mode 100644 index 0e71f2b66b..0000000000 --- a/ProcessMaker/Http/Controllers/Api/WizardTemplateController.php +++ /dev/null @@ -1,42 +0,0 @@ -input('per_page', 10); - $column = $request->input('order_by', 'id'); - $filter = $request->input('filter', ''); - - $direction = $request->input('order_direction', 'asc'); - - $query = WizardTemplate::with('process')->filter($filter) - ->orderBy($column, $direction); - - $data = $query->paginate($perPage); - - return new ApiCollection($data); - } - - public function getHelperProcess($wizardTemplateUuid) - { - $helperProcessID = WizardTemplate::select('helper_process_id')->where('uuid', $wizardTemplateUuid)->value('helper_process_id'); - $start_events = Process::select('start_events')->where('id', $helperProcessID)->value('start_events'); - - return json_encode([ - 'helper_process_id' => $helperProcessID, - 'start_events' => json_encode($start_events), - ]); - } -} diff --git a/ProcessMaker/Http/Controllers/ProcessesCatalogueController.php b/ProcessMaker/Http/Controllers/ProcessesCatalogueController.php index 596c5821ed..3348a20fd1 100644 --- a/ProcessMaker/Http/Controllers/ProcessesCatalogueController.php +++ b/ProcessMaker/Http/Controllers/ProcessesCatalogueController.php @@ -31,12 +31,6 @@ class ProcessesCatalogueController extends Controller public function index(Request $request, Process $process = null) { - if ($request->has('guided_templates')) { - return redirect()->route('process.browser.index', [ - 'categoryId' => 'guided_templates', - 'template' => $request->input('template'), - ]); - } $manager = app(ScreenBuilderManager::class); event(new ScreenBuilderStarting($manager, 'DISPLAY')); $launchpad = null; diff --git a/ProcessMaker/Jobs/SyncGuidedTemplates.php b/ProcessMaker/Jobs/SyncGuidedTemplates.php deleted file mode 100644 index a0494fcaab..0000000000 --- a/ProcessMaker/Jobs/SyncGuidedTemplates.php +++ /dev/null @@ -1,384 +0,0 @@ - 'Guided Templates', - ], [ - 'status' => 'ACTIVE', - 'is_system' => 1, - ])->getKey(); - - // Fetch the guided template list from Github - $response = Http::get($url); - - // Check if the request was successful - if (!$response->successful()) { - throw new Exception('Unable to fetch guided template list.'); - } - - // Extract the JSON data from the response - $data = $response->json(); - - // Iterate over categories and templates to retrieve them - foreach ($data as $templateCategory => $guidedTemplates) { - if (!in_array($templateCategory, $categories) && !in_array('all', $categories)) { - continue; - } - - try { - // Import templates from the index.json file. - foreach ($guidedTemplates as $template) { - $this->importTemplate($template, $config, $guidedTemplateCategoryId); - } - } catch (Exception $e) { - Log::error("Error Importing Guided Templates: {$e->getMessage()}"); - } - } - } catch (Exception $e) { - Log::error("Error Syncing Guided Templates: {$e->getMessage()}"); - } - } - - /** - * Import a guided template into the database. - * - * @param array $template - * @param array $config - * @param int $guidedTemplateCategoryId - * @return void - */ - private function importTemplate($template, $config, $guidedTemplateCategoryId) - { - // Check for template changes and determine if helper process and template process need to be imported - [$importHelperProcess, $importTemplateProcess] = $this->checkForTemplateChanges($template); - - // Check for template asset hash changes - $assetsHashChanged = $this->checkForTemplateAssetChanges($template); - - // Fetch payloads if necessary - $helperProcessPayload = $importHelperProcess ? - $this->fetchPayload($this->buildTemplateUrl($config, $template['helper_process'])) : null; - $templateProcessPayload = $importTemplateProcess ? - $this->fetchPayload($this->buildTemplateUrl($config, $template['template_process'])) : null; - - // Update process categories for the helper process and process template - $this->updateProcessCategories($helperProcessPayload, $templateProcessPayload, $guidedTemplateCategoryId); - - // Initialize variables for new process IDs - $newHelperProcessId = null; - $newProcessTemplateId = null; - - // Import helper process if necessary and get new ID - if ($importHelperProcess) { - $newHelperProcessId = $this->importProcess($helperProcessPayload, 'GUIDED_HELPER_PROCESS'); - } - - // Import template process if necessary and get new ID - if ($importTemplateProcess) { - $newProcessTemplateId = $this->importProcess($templateProcessPayload, 'GUIDED_PROCESS_TEMPLATE'); - } - - // Update or create the guided template in the database - $guidedTemplate = $this->updateOrCreateGuidedTemplate($template, $newHelperProcessId, $newProcessTemplateId); - - // Create a media collection for template assets - $mediaCollectionName = $this->createMediaCollection($guidedTemplate); - - if ($assetsHashChanged) { - // Import template assets and associate with the media collection - $this->importTemplateAssets($template, $config, $mediaCollectionName, $guidedTemplate); - } - - // Save the media collection name to the guided template and persist changes - $guidedTemplate->media_collection = $mediaCollectionName; - - $guidedTemplate->save(); - } - - // Helper functions used within importTemplate - private function buildTemplateUrl($config, $templatePath) - { - // Build the URL for a template based on the configuration and template path - if (empty($templatePath)) { - return null; - } - - return $config['base_url'] . - $config['template_repo'] . '/' . - $config['template_branch'] . '/' . - Str::replace('./', '', $templatePath); - } - - private function fetchPayload($url) - { - // Fetch the JSON payload from a given URL - return Http::get($url)->json(); - } - - private function updateProcessCategories(&$helperProcessPayload, &$templateProcessPayload, - $guidedTemplateCategoryId) - { - // Update process categories for both the helper process and process template - if ($helperProcessPayload !== null) { - data_set( - $helperProcessPayload, - "export.{$helperProcessPayload['root']}.attributes.process_category_id", - $guidedTemplateCategoryId - ); - } - - if ($templateProcessPayload !== null) { - data_set( - $templateProcessPayload, - "export.{$templateProcessPayload['root']}.attributes.process_category_id", - $guidedTemplateCategoryId - ); - } - } - - private function importProcess($payload, $assetType) - { - // Import a process and return the new ID - $postOptions = []; - foreach ($payload['export'] as $key => $asset) { - $postOptions[$key] = [ - 'mode' => 'update', - 'is_template' => true, - 'asset_type' => $assetType, - 'saveAssetsMode' => 'saveAllAssets', - ]; - if (in_array($asset['type'], ['Process', 'Screen', 'Script', - 'Collections', 'DataConnector', 'ProcessTemplates'])) { - $payload['export'][$key]['attributes']['asset_type'] = $assetType; - } - - if (Arr::get($asset, 'type') === 'Screen' && Arr::get($asset, 'attributes.key') === 'interstitial') { - Arr::set($payload, "export.{$key}.attributes.key", null); - } - } - - $options = new Options($postOptions); - try { - $importer = new Importer($payload, $options); - $manifest = $importer->doImport(); - $rootLog = $manifest[$payload['root']]->log; - - return $rootLog['newId']; - } catch (Exception $e) { - throw new Exception('Error: ' . $e->getMessage()); - } - } - - private function updateOrCreateGuidedTemplate($template, $newHelperProcessId, $newProcessTemplateId) - { - $templateDetails = $template['template_details']; - $uniqueTemplateId = $templateDetails['unique-template-id']; - $cardTitle = $templateDetails['card-title']; - $cardExcerpt = $templateDetails['card-excerpt']; - $templateDetailsJson = json_encode($templateDetails); - - // Check if the wizard template exists - $guidedTemplate = WizardTemplate::where('unique_template_id', $uniqueTemplateId)->first(); - - if ($guidedTemplate) { - // Update existing wizard template - $guidedTemplate->update([ - 'name' => $cardTitle, - 'description' => $cardExcerpt, - 'media_collection' => '', - 'template_details' => $templateDetailsJson, - ]); - - if ($newHelperProcessId !== null) { - $guidedTemplate['helper_process_id'] = $newHelperProcessId; - $guidedTemplate->save(); - } - if ($newProcessTemplateId !== null) { - $guidedTemplate['process_template_id'] = $newProcessTemplateId; - $guidedTemplate->save(); - } - } else { - // Create new wizard template - $guidedTemplate = WizardTemplate::create([ - 'unique_template_id' => $uniqueTemplateId, - 'name' => $cardTitle, - 'description' => $cardExcerpt, - 'helper_process_id' => $newHelperProcessId, - 'process_template_id' => $newProcessTemplateId, - 'media_collection' => '', - 'template_details' => $templateDetailsJson, - ]); - } - - return $guidedTemplate; - } - - private function createMediaCollection($guidedTemplate) - { - // Create a media collection for template assets and return the collection name - $mediaCollectionName = 'wt-' . $guidedTemplate->uuid . '-media'; - $guidedTemplate->addMediaCollection($mediaCollectionName); - - return $mediaCollectionName; - } - - private function importTemplateAssets($template, $config, $mediaCollectionName, $guidedTemplate) - { - // Clear the collection to prevent duplicate images - $guidedTemplate->clearMediaCollection($mediaCollectionName); - - // Build asset urls - $templateIconUrl = $this->buildTemplateUrl($config, $template['assets']['icon']); - $templateCardBackgroundUrl = $this->buildTemplateUrl($config, $template['assets']['card-background']); - $templateListIconUrl = $this->buildTemplateUrl($config, $template['assets']['list-icon']); - // Import template assets and associate with the media collection - $this->importMedia($templateIconUrl, 'icon', $mediaCollectionName, $guidedTemplate); - $this->importMedia($templateCardBackgroundUrl, 'cardBackground', $mediaCollectionName, $guidedTemplate); - $this->importMedia($templateListIconUrl, 'listIcon', $mediaCollectionName, $guidedTemplate); - - if (!empty($template['assets']['launchpad']['process-card-background'])) { - $templateProcessCardBackgroundUrl = - $this->buildTemplateUrl($config, $template['assets']['launchpad']['process-card-background']); - $this->importMedia($templateProcessCardBackgroundUrl, 'launchpadProcessCardBackground', - $mediaCollectionName, $guidedTemplate); - } - - foreach ($template['assets']['slides'] as $slide) { - $templateSlideUrl = $this->buildTemplateUrl($config, $slide); - $this->importMedia($templateSlideUrl, 'slide', $mediaCollectionName, $guidedTemplate); - } - - if (!empty($template['assets']['launchpad']['slides'])) { - foreach ($template['assets']['launchpad']['slides'] as $slide) { - $templateSlideUrl = $this->buildTemplateUrl($config, $slide); - $this->importMedia($templateSlideUrl, 'launchpadSlides', $mediaCollectionName, $guidedTemplate); - } - } - } - - private function importMedia($assetUrl, $customProperty, $mediaCollectionName, $guidedTemplate) - { - // Import a media asset and associate it with the media collection - if (!is_null($assetUrl)) { - $guidedTemplate - ->addMediaFromUrl($assetUrl) - ->withCustomProperties(['media_type' => $customProperty]) - ->toMediaCollection($mediaCollectionName); - } - } - - private function checkForTemplateChanges($template) - { - // Initialize variables to track changes - $helperProcessHashChanged = true; - $templateProcessHashChanged = true; - - // Retrieve wizard template details if it exists - $wizardTemplate = - WizardTemplate::where('unique_template_id', $template['template_details']['unique-template-id']) - ->select('template_details') - ->first(); - - if ($wizardTemplate) { - $wizardTemplateDetails = json_decode($wizardTemplate->template_details, true); - - // Check if helper process hash has changed - if (isset($wizardTemplateDetails['helper_process_hash']) && - $template['template_details']['helper_process_hash'] === - $wizardTemplateDetails['helper_process_hash']) { - $helperProcessHashChanged = false; - } - - // Check if template process hash has changed - if (isset($wizardTemplateDetails['template_process_hash']) && - $template['template_details']['template_process_hash'] === - $wizardTemplateDetails['template_process_hash']) { - $templateProcessHashChanged = false; - } - } - - return [$helperProcessHashChanged, $templateProcessHashChanged]; - } - - private function checkForTemplateAssetChanges($template) - { - // Initialize variables to track changes - $assetHashChanged = true; - // Retrieve wizard template details if it exists - $wizardTemplate = - WizardTemplate::where('unique_template_id', $template['template_details']['unique-template-id']) - ->select('template_details') - ->first(); - - if ($wizardTemplate) { - $wizardTemplateDetails = json_decode($wizardTemplate->template_details, true); - // Check if helper process hash has changed - if (isset($wizardTemplateDetails['asset_hash']) && - $template['template_details']['asset_hash'] === - $wizardTemplateDetails['asset_hash'] || - !isset($wizardTemplateDetails['asset_hash'])) { - $assetHashChanged = false; - } - } - - return $assetHashChanged; - } -} diff --git a/ProcessMaker/Jobs/SyncScreenTemplates.php b/ProcessMaker/Jobs/SyncScreenTemplates.php index 3ea0205fbf..0545ca6a1a 100644 --- a/ProcessMaker/Jobs/SyncScreenTemplates.php +++ b/ProcessMaker/Jobs/SyncScreenTemplates.php @@ -50,7 +50,7 @@ public function handle() if (!$config) { return; } - // Build the URL to fetch the guided templates list from GitHub + // Build the URL to fetch the screen templates list from GitHub $url = $config['base_url'] . $config['template_repo'] . '/' . $config['template_branch'] . '/index.json'; // If there are multiple categories of templates defined in the .env, separate them into an array diff --git a/ProcessMaker/Models/WizardTemplate.php b/ProcessMaker/Models/WizardTemplate.php deleted file mode 100644 index 0e09ff546e..0000000000 --- a/ProcessMaker/Models/WizardTemplate.php +++ /dev/null @@ -1,101 +0,0 @@ -belongsTo(Process::class, 'helper_process_id'); - } - - /** - * Get the process template associated with the wizard template. - */ - public function process_template(): BelongsTo - { - return $this->belongsTo(ProcessTemplates::class, 'process_template_id'); - } - - /** - * Filter settings with a string - * - * @param $query - * - * @param $filter string - */ - public function scopeFilter($query, $filterStr) - { - $filter = '%' . mb_strtolower($filterStr) . '%'; - $query->where(function ($query) use ($filter) { - $query->where('wizard_templates.name', 'like', $filter) - ->orWhere('wizard_templates.description', 'like', $filter); - }); - - return $query; - } - - public function getTemplateMediaAttribute() - { - $mediaCollectionName = 'wt-' . $this->uuid . '-media'; - $slides = $this->getMedia($mediaCollectionName, ['media_type' => 'slide']); - $slideUrls = $slides->map(function ($slide) { - return $slide->getFullUrl(); - }); - $iconMedia = $this->getMedia($mediaCollectionName, ['media_type' => 'icon'])->first(); - $cardBackgroundMedia = $this->getMedia($mediaCollectionName, ['media_type' => 'cardBackground'])->first(); - $listIconMedia = $this->getMedia($mediaCollectionName, ['media_type' => 'listIcon'])->first(); - - return [ - 'icon' => !is_null($iconMedia) ? $iconMedia->getFullUrl() : '', - 'cardBackground' => !is_null($cardBackgroundMedia) ? $cardBackgroundMedia->getFullUrl() : '', - 'listIcon' => !is_null($listIconMedia) ? $listIconMedia->getFullUrl() : '', - 'slides' => $slideUrls, - ]; - } - - /** - * Add files to media collection - */ - public function addFilesToMediaCollection(string $directoryPath) - { - $files = File::allFiles($directoryPath); - $collectionName = basename($directoryPath); - - foreach ($files as $file) { - $this->addMedia($file->getPathname())->toMediaCollection($collectionName); - } - } -} diff --git a/ProcessMaker/Templates/ProcessTemplate.php b/ProcessMaker/Templates/ProcessTemplate.php index 3d9f6f6aa4..ca24deb766 100644 --- a/ProcessMaker/Templates/ProcessTemplate.php +++ b/ProcessMaker/Templates/ProcessTemplate.php @@ -15,10 +15,8 @@ use ProcessMaker\Models\Process; use ProcessMaker\Models\ProcessCategory; use ProcessMaker\Models\ProcessTemplates; -use ProcessMaker\Models\WizardTemplate; use ProcessMaker\Traits\HasControllerAddons; use SebastianBergmann\CodeUnit\Exception; -use Spatie\MediaLibrary\MediaCollections\Models\Media; /** * Summary of ProcessTemplate @@ -257,18 +255,6 @@ public function create($request) : JsonResponse $payload['export'][$key]['attributes']['name'] = $requestData['name']; $payload['export'][$key]['attributes']['description'] = $requestData['description']; $payload['export'][$key]['attributes']['process_category_id'] = $requestData['process_category_id']; - // Store the wizard template uuid on the process to rerun the helper process - if (isset($requestData['wizardTemplateUuid'])) { - $properties = json_decode($payload['export'][$key]['attributes']['properties'], true); - $properties['wizardTemplateUuid'] = $requestData['wizardTemplateUuid']; - $payload['export'][$key]['attributes']['properties'] = json_encode($properties); - } - // Store the helper process request id that initiated the process creation - if (isset($requestData['helperProcessRequestId'])) { - $properties = json_decode($payload['export'][$key]['attributes']['properties'], true); - $properties['helperProcessRequestId'] = $requestData['helperProcessRequestId']; - $payload['export'][$key]['attributes']['properties'] = json_encode($properties); - } $payload['export'][$key]['name'] = $requestData['name']; $payload['export'][$key]['description'] = $requestData['description']; @@ -296,8 +282,6 @@ public function create($request) : JsonResponse $process->user_id = Auth::id(); $process->save(); - $this->syncLaunchpadAssets($request, $process); - if (class_exists(self::PROJECT_ASSET_MODEL_CLASS) && !empty($requestData['projects'])) { $manifest = $this->getManifest('process', $processId); @@ -506,64 +490,6 @@ public function existingTemplate($request) : ?array return null; } - /** - * Syncs launchpad assets from a guided template to the imported process. - * - * @param Illuminate\Http\Request $request - * @param App\Models\Process $process - * @return void - */ - protected function syncLaunchpadAssets($request, $process) - { - if (empty($request->wizardTemplateUuid)) { - return; - } - - // Add media collection for the imported process - $processMediaCollectionName = $process->uuid . '_images_carousel'; - $process->addMediaCollection($processMediaCollectionName); - - // Retrieve the guided template by UUID - $guidedTemplateUuid = $request->input('wizardTemplateUuid'); - $template = WizardTemplate::where('uuid', $guidedTemplateUuid)->first(); - - // Get launchpad slides media from the guided template - $templateLaunchpadSlides = $template->getMedia($template->media_collection, function (Media $media) { - return $media->custom_properties['media_type'] === 'launchpadSlides'; - }); - - // Iterate over each launchpad slide and add to the imported process media collection - foreach ($templateLaunchpadSlides as $slide) { - // Extract order index from file name - $orderIndex = $this->extractOrderIndexFromFileName($slide->getPath()); - - // Add media to the imported process collection - $media = $process->addMedia($slide->getPath())->preservingOriginal()->toMediaCollection($processMediaCollectionName); - - // Set order column if available - if (!is_null($orderIndex)) { - $media->order_column = $orderIndex; - $media->save(); - } - } - } - - /** - * Extracts order index from the file name. - * - * @param string $fileName - * @return int|null - */ - protected function extractOrderIndexFromFileName($fileName) - { - preg_match('/\d+/', basename($fileName), $matches); - if (!empty($matches)) { - return intval($matches[0]) - 1; - } - - return null; - } - /** * Prepare payload for import. * diff --git a/config/services.php b/config/services.php index fde93f96cd..bcf0b7b9c8 100644 --- a/config/services.php +++ b/config/services.php @@ -46,13 +46,6 @@ 'template_categories' => env('DEFAULT_TEMPLATE_CATEGORIES', 'accounting-and-finance,customer-success,human-resources,marketing-and-sales,operations,it'), ], - 'guided_templates_github' => [ - 'base_url' => 'https://raw.githubusercontent.com/processmaker/', - 'template_repo' => env('GUIDED_TEMPLATE_REPO', 'wizard-templates'), - 'template_branch' => env('GUIDED_TEMPLATE_BRANCH', '2023-winter'), - 'template_categories' => env('GUIDED_TEMPLATE_CATEGORIES', 'all'), - ], - 'screen_templates_github' => [ 'base_url' => 'https://raw.githubusercontent.com/processmaker/', 'template_repo' => env('SCREEN_TEMPLATE_REPO', 'screen-templates'), diff --git a/database/factories/ProcessMaker/Models/WizardTemplateFactory.php b/database/factories/ProcessMaker/Models/WizardTemplateFactory.php deleted file mode 100644 index 6860dabca3..0000000000 --- a/database/factories/ProcessMaker/Models/WizardTemplateFactory.php +++ /dev/null @@ -1,26 +0,0 @@ - $this->faker->uuid, - 'unique_template_id' => $this->faker->uuid, - 'process_template_id' => null, - 'name' => $this->faker->unique()->name(), - 'description' => $this->faker->unique()->name(), - 'media_collection' => $this->faker->unique()->name(), - 'template_details' => '{}', - 'helper_process_id' => Process::factory()->create()->id, - ]; - } -} diff --git a/database/migrations/2023_11_27_215150_create_wizard_templates_table.php b/database/migrations/2023_11_27_215150_create_wizard_templates_table.php deleted file mode 100644 index d7a34c4789..0000000000 --- a/database/migrations/2023_11_27_215150_create_wizard_templates_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->uuid('uuid')->unique(); - $table->unsignedBigInteger('process_template_id')->nullable(); - $table->unsignedInteger('process_id'); - $table->string('media_collection')->nullable(); - $table->timestamps(); - - // Foreign keys - $table->foreign('process_id') - ->references('id') - ->on('processes') - ->onDelete('cascade') - ->constrained('processes'); - }); - } - - public function down() - { - Schema::dropIfExists('wizard_templates'); - } -} diff --git a/database/migrations/2023_12_04_210217_modify_wizard_templates_table.php b/database/migrations/2023_12_04_210217_modify_wizard_templates_table.php deleted file mode 100644 index 776d4e4b20..0000000000 --- a/database/migrations/2023_12_04_210217_modify_wizard_templates_table.php +++ /dev/null @@ -1,55 +0,0 @@ -renameColumn('process_id', 'helper_process_id'); - $table->string('name')->after('uuid'); - $table->string('description')->after('name'); - $table->json('template_details')->after('description'); - $table->unsignedInteger('config_collection_id')->nullable()->after('template_details'); - }); - - // Change the foreign key reference to helper_process_id - Schema::table('wizard_templates', function (Blueprint $table) { - $table->foreign('helper_process_id') - ->references('id') - ->on('processes') - ->onDelete('cascade') - ->constrained('processes'); - }); - - // Add the foreign key reference to process_template_id - Schema::table('wizard_templates', function (Blueprint $table) { - $table->foreign('process_template_id') - ->references('id') - ->on('process_templates') - ->onDelete('cascade') - ->constrained('process_templates'); - }); - } - - public function down() - { - // Reverse the changes in the down method if needed - Schema::table('wizard_templates', function (Blueprint $table) { - $table->renameColumn('helper_process_id', 'process_id'); - - // Reverse the foreign key changes - $table->dropForeign(['helper_process_id']); - $table->dropForeign(['process_template_id']); - - $table->dropColumn('name'); - $table->dropColumn('description'); - $table->dropColumn('template_details'); - $table->dropColumn('config_collection_id'); - }); - } -} diff --git a/database/migrations/2024_01_16_181933_add_unique_template_id_column_to_wizard_templates_table.php b/database/migrations/2024_01_16_181933_add_unique_template_id_column_to_wizard_templates_table.php deleted file mode 100644 index 8af6d8371b..0000000000 --- a/database/migrations/2024_01_16_181933_add_unique_template_id_column_to_wizard_templates_table.php +++ /dev/null @@ -1,27 +0,0 @@ -string('unique_template_id')->unique()->after('uuid'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('wizard_templates', function (Blueprint $table) { - $table->dropColumn('unique_template_id'); - }); - } -}; diff --git a/public/images/wizard-icon.svg b/public/images/wizard-icon.svg deleted file mode 100644 index a2be69d748..0000000000 --- a/public/images/wizard-icon.svg +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/public/images/wizard-template-icon.svg b/public/images/wizard-template-icon.svg deleted file mode 100644 index 9ea25abd12..0000000000 --- a/public/images/wizard-template-icon.svg +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/resources/img/wizard-icon.svg b/resources/img/wizard-icon.svg deleted file mode 100644 index a2be69d748..0000000000 --- a/resources/img/wizard-icon.svg +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/resources/img/wizard-template-icon.svg b/resources/img/wizard-template-icon.svg deleted file mode 100644 index 9ea25abd12..0000000000 --- a/resources/img/wizard-template-icon.svg +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/resources/js/components/templates/TemplateAssetsView.vue b/resources/js/components/templates/TemplateAssetsView.vue index 57e0e65958..e1ffd106b2 100644 --- a/resources/js/components/templates/TemplateAssetsView.vue +++ b/resources/js/components/templates/TemplateAssetsView.vue @@ -88,11 +88,6 @@ export default { type: [String, null], default: null, }, - wizardTemplateUuid: { - type: String, - required: false, - default: null, - }, }, data() { return { @@ -126,9 +121,6 @@ export default { formData.append("id", this.responseId); formData.append("request", JSON.stringify(this.request)); formData.append("existingAssets", JSON.stringify(this.updatedAssets)); - if (this.wizardTemplateUuid !== null) { - formData.append("wizardTemplateUuid", this.wizardTemplateUuid); - } ProcessMaker.apiClient.post(`/template/create/${this.assetType}/${this.responseId}`, formData) .then((response) => { this.$nextTick(() => { diff --git a/resources/js/components/templates/TemplateSearch.vue b/resources/js/components/templates/TemplateSearch.vue index e95a365484..ef8a820890 100644 --- a/resources/js/components/templates/TemplateSearch.vue +++ b/resources/js/components/templates/TemplateSearch.vue @@ -19,7 +19,7 @@ -
- {{ $t('Please check back soon.') }} -
- -