Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions resources/views/processes/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<div class="tab-content" id="nav-tabContent">

{{-- Configuration --}}
<div class="tab-pane fade show active" id="nav-config" role="tabpanel"
<div class="tab-pane fade show" :class="{'active': activeTab === ''}" id="nav-config" role="tabpanel"
aria-labelledby="nav-config-tab">
<required></required>
<div class="form-group">
Expand Down Expand Up @@ -172,7 +172,7 @@

{{-- Translations --}}
@can('view-process-translations')
<div class="tab-pane fade show" id="nav-translations" role="tabpanel"
<div class="tab-pane fade show" :class="{'active': activeTab === 'nav-translations'}" id="nav-translations" ref="nav-translations" role="tabpanel"
aria-labelledby="nav-translations-tab">

<div class="page-content mb-0" id="processTranslationIndex">
Expand Down Expand Up @@ -402,12 +402,22 @@ class="custom-control-input">
manager: @json($process->manager),
translatedLanguages: [],
editTranslation: null,
activeTab: "",
}
},
mounted() {
this.activeTab = "";
if (_.get(this.formData, 'properties.manager_can_cancel_request')) {
this.canCancel.push(this.processManagerOption());
}

let path = new URL(location.href).href;
let target = path.split('#');

if (target[1] !== undefined) {
this.activeTab = target[1];
}

},
computed: {
activeUsersAndGroupsWithManager() {
Expand Down
4 changes: 2 additions & 2 deletions resources/views/processes/translations/export.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@include('shared.breadcrumbs', ['routes' => [
__('Designer') => route('processes.index'),
__('Processes') => route('processes.index'),
__('Translations') => route('processes.edit', ['process' => $process->id]),
__('Translations') => '/processes/'.$process->id.'/edit#nav-translations',
__('Export' . ' ' . $process->name . ' - ' . $language['humanLanguage']) => null,
]])
@endsection
Expand Down Expand Up @@ -55,7 +55,7 @@
},
methods: {
onCancel() {
window.location = `/processes/${this.processId}/edit`;
window.location = `/processes/${this.processId}/edit/#nav-translations`;
},
onExport() {
ProcessMaker.apiClient({
Expand Down
8 changes: 4 additions & 4 deletions resources/views/processes/translations/import.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@extends('layouts.layout')

@section('title')
{{__('Import Screen')}}
{{__('Import Translation')}}
@endsection

@section('sidebar')
Expand All @@ -12,7 +12,7 @@
@include('shared.breadcrumbs', ['routes' => [
__('Designer') => route('processes.index'),
__('Processes') => route('processes.index'),
__('Translations') => route('processes.edit', ['process' => $process->id]),
__('Translations') => '/processes/'.$process->id.'/edit#nav-translations',
__('Import') => null,
]])
@endsection
Expand Down Expand Up @@ -125,7 +125,7 @@ class="p-0"

},
onCancel() {
window.location = `/processes/${$processId}/edit`;
window.location = `/processes/${this.process.id}/edit#nav-translations`;
},
onImport() {
let formData = new FormData();
Expand All @@ -147,7 +147,7 @@ class="p-0"
let message = this.$t('The process translation was imported correctly.');
let variant = 'success';
ProcessMaker.alert(message, variant);
window.location.href = `/processes/${this.process.id}/edit`;
window.location.href = `/processes/${this.process.id}/edit#nav-translations`;
})
.catch((error) => {
this.submitted = false;
Expand Down