144 lines
4.1 KiB
Vue
Raw Normal View History

2021-05-20 15:18:43 +03:00
<template>
2021-05-28 15:45:19 +03:00
<div v-if="is_loaded">
2021-05-20 15:18:43 +03:00
<h1 class="text-white">{{ translations.finish.title }}</h1>
<div class="card">
<div class="card-header wizard-header p-3">
<el-steps :active="active" finish-status="success" align-center>
2021-05-25 19:52:39 +03:00
<el-step :title="translations.company.title"></el-step>
2021-05-20 15:18:43 +03:00
<el-step :title="translations.currencies.title"></el-step>
<el-step :title="translations.taxes.title"></el-step>
<el-step :title="translations.finish.title"></el-step>
</el-steps>
</div>
<div class="card-body bg-default">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
<div class="content-header">
2021-05-28 15:45:19 +03:00
<h3 class="text-white">
{{ translations.finish.recommended_apps }}
</h3>
2021-05-20 15:18:43 +03:00
</div>
<div class="row">
2021-05-28 15:45:19 +03:00
<div
v-for="(item, index) in modules"
:key="index"
class="col-md-3"
>
2021-05-20 15:18:43 +03:00
<div class="card">
<div class="card-header py-2">
<h4 class="ml--3 mb-0 float-left">
2021-05-28 15:45:19 +03:00
<a :href="item.slug">{{ item.name }}</a>
2021-05-20 15:18:43 +03:00
</h4>
</div>
<a :href="route_url + '/' + item.slug"
><img
2021-05-28 15:45:19 +03:00
v-for="(file, indis) in item.files"
:key="indis"
v-if="
file.media_type == 'image' &&
file.pivot.zone == 'thumbnail'
"
2021-05-20 15:18:43 +03:00
:src="file.path_string"
:alt="item.name"
class="card-img-top border-radius-none"
/></a>
<div class="card-footer py-2">
<div class="float-left ml--3 mt--1">
2021-05-28 15:45:19 +03:00
<i
v-for="(stars, indis) in item.vote"
:key="indis"
class="fa fa-star text-xs text-yellow"
></i>
2021-05-20 15:18:43 +03:00
<small class="text-xs"> {{ item.total_review }} </small>
</div>
<div class="float-right mr--3">
2021-05-28 15:45:19 +03:00
<small
><strong> {{ item.price }} </strong></small
>
2021-05-20 15:18:43 +03:00
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12"><ul></ul></div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-12 d-flex justify-content-between">
2021-05-28 15:45:19 +03:00
<base-button type="white" native-type="submit" @click="prev()">{{
translations.finish.previous
}}</base-button>
<base-button
type="success"
native-type="submit"
@click="finish()"
2021-05-20 15:18:43 +03:00
>{{ translations.finish.go_to_dashboard }}</base-button
>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { Step, Steps } from "element-ui";
export default {
name: "Finish",
components: {
[Step.name]: Step,
[Steps.name]: Steps,
},
created() {
2021-05-28 15:45:19 +03:00
window
.axios({
method: "PATCH",
url: url + "/wizard/finish",
})
.then((response) => {
if (response.status == "200") {
this.is_loaded = true;
}
})
.catch((error) => {
this.$notify({
message: this.translations.finish.error_message,
timeout: 1000,
icon: "fas fa-bell",
type: 0
});
2021-05-20 15:18:43 +03:00
2021-05-28 15:45:19 +03:00
this.prev();
});
2021-05-20 15:18:43 +03:00
},
props: {
modules: {
2021-05-28 15:45:19 +03:00
type: [Object, Array],
2021-05-20 15:18:43 +03:00
},
translations: {
2021-05-28 15:45:19 +03:00
type: [Object, Array],
2021-05-20 15:18:43 +03:00
}
},
data() {
return {
active: 3,
route_url: url,
2021-05-28 15:45:19 +03:00
is_loaded: false
2021-05-20 15:18:43 +03:00
};
},
methods: {
prev() {
if (this.active-- > 2);
this.$router.push("/wizard/taxes");
},
2021-05-28 15:45:19 +03:00
finish() {
window.location.href = url;
},
2021-05-20 15:18:43 +03:00
},
};
</script>