+
+
+ <- К списку заявок
+
+
@@ -8,14 +13,10 @@
-
-
-
diff --git a/src/router/index.ts b/src/router/index.ts
index a69c1d1..b9a555b 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -10,7 +10,7 @@ export enum PAGE {
export const PAGE_URL: Record
= {
[PAGE.HOME]: '/',
- [PAGE.REQUEST]: '/:id',
+ [PAGE.REQUEST]: '/request/:id',
[PAGE.AUTH]: '/auth',
[PAGE.HELP]: '/help'
}
@@ -45,9 +45,12 @@ const routes = [
{
path: PAGE_URL[PAGE.REQUEST],
name: PAGE.REQUEST,
- component: () => import('../views/AuthPage.vue'),
+ component: () => import('../views/RequestPage.vue'),
meta: {
layout: 'main',
+ layoutProps: {
+ back: true
+ }
}
},
]
diff --git a/src/store/modules/request.module.ts b/src/store/modules/request.module.ts
index c67cc19..d3460fe 100644
--- a/src/store/modules/request.module.ts
+++ b/src/store/modules/request.module.ts
@@ -45,6 +45,17 @@ const requestModule: Module = {
await dispatch('alert/setAlert', {message: 'Ошибка при попытке получить список заявок', type: 'danger', title: 'Ошибка', time: 5000}, {root: true})
}
},
+ loadRequestById: async (injectee, payload) => {
+ const { dispatch } = injectee;
+ const {id} = payload;
+ try {
+ const token = authModule.state.token;
+ const { data } = await requestApi.get(`/requests/${id}.json?auth=${token}`);
+ return data;
+ } catch (e) {
+ await dispatch('alert/setAlert', {message: 'Ошибка при попытке получить заявку', type: 'danger', title: 'Ошибка', time: 5000}, {root: true})
+ }
+ },
create: async (injectee, payload: CreateRequestPayload) => {
const { dispatch, commit } = injectee;
diff --git a/src/views/RequestPage.vue b/src/views/RequestPage.vue
new file mode 100644
index 0000000..06f0300
--- /dev/null
+++ b/src/views/RequestPage.vue
@@ -0,0 +1,77 @@
+
+
+ Заявка
+
+
+
+
+ Заявка не найдена
+
+
+
+
+ |
+
+ ФИО
+
+ |
+ {{ request.fio }} |
+
+
+ |
+ Сумма
+ |
+ {{ currencyFormatter.format(request.amount) }} |
+
+
+ | Телефон |
+ {{ request.phone }} |
+
+
+ | Статус |
+
+
+ |
+
+
+
+
+
+
+
+