frontend update

This commit is contained in:
carodej
2020-06-03 10:58:44 +02:00
parent 331ee52ea3
commit ca14838212
60 changed files with 1871 additions and 710 deletions

View File

@@ -8,12 +8,16 @@
:title="$t('user_box_role.title')"
:description="$t('user_box_role.description')"
>
<ValidationObserver ref="changeRole" @submit.prevent="changeRole" v-slot="{ invalid }" tag="form" class="form block-form">
<ValidationProvider tag="div" class="block-wrapper" v-slot="{ errors }" mode="passive" name="Role" rules="required">
<ValidationObserver ref="changeRole" @submit.prevent="changeRole" v-slot="{ invalid }" tag="form"
class="form block-form">
<ValidationProvider tag="div" class="block-wrapper" v-slot="{ errors }" mode="passive" name="Role"
rules="required">
<label>{{ $t('admin_page_user.select_role') }}:</label>
<div class="single-line-form">
<SelectInput v-model="userRole" :options="roles" :placeholder="$t('admin_page_user.select_role')" :isError="errors[0]"/>
<ButtonBase :loading="isSendingRequest" :disabled="isSendingRequest" type="submit" button-style="theme" class="submit-button">
<SelectInput v-model="userRole" :options="roles"
:placeholder="$t('admin_page_user.select_role')" :isError="errors[0]"/>
<ButtonBase :loading="isSendingRequest" :disabled="isSendingRequest" type="submit"
button-style="theme" class="submit-button">
{{ $t('admin_page_user.save_role') }}
</ButtonBase>
</div>
@@ -25,8 +29,7 @@
<!--Personal Information-->
<PageTabGroup>
<ValidationObserver ref="personalInformation" v-slot="{ invalid }" tag="form" class="form block-form">
<div class="form block-form">
<b class="form-group-label">{{ $t('admin_page_user.label_person_info') }}</b>
<div class="wrapper-inline">
@@ -34,25 +37,99 @@
<div class="block-wrapper">
<label>{{ $t('page_registration.label_email') }}</label>
<div class="input-wrapper">
<input :value="user.attributes.email" :placeholder="$t('page_registration.placeholder_email')" type="email" disabled />
<input :value="user.data.attributes.email"
:placeholder="$t('page_registration.placeholder_email')"
type="email"
disabled
/>
</div>
</div>
<!--Name-->
<div class="block-wrapper">
<label>{{ $t('page_registration.label_name') }}</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Full Name" rules="required"
v-slot="{ errors }">
<input :value="user.attributes.name"
<div class="input-wrapper">
<input :value="user.data.attributes.name"
:placeholder="$t('page_registration.placeholder_name')"
type="text"
disabled
/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
</div>
</div>
</ValidationObserver>
</div>
</PageTabGroup>
<!--Billing Information-->
<PageTabGroup>
<div class="form block-form">
<b class="form-group-label">Billing Information</b>
<div class="block-wrapper">
<label>Name:</label>
<div class="input-wrapper">
<input :value="user.relationships.settings.data.attributes.billing_name"
type="text"
disabled
/>
</div>
</div>
<div class="block-wrapper">
<label>Address:</label>
<div class="input-wrapper">
<input :value="user.relationships.settings.data.attributes.billing_address"
type="text"
disabled
/>
</div>
</div>
<div class="wrapper-inline">
<div class="block-wrapper">
<label>State:</label>
<div class="input-wrapper">
<input :value="user.relationships.settings.data.attributes.billing_state"
type="text"
disabled
/>
</div>
</div>
<div class="block-wrapper">
<label>City:</label>
<div class="input-wrapper">
<input :value="user.relationships.settings.data.attributes.billing_city"
type="text"
disabled
/>
</div>
</div>
<div class="block-wrapper">
<label>Postal Code:</label>
<div class="input-wrapper">
<input :value="user.relationships.settings.data.attributes.billing_postal_code"
type="text"
disabled
/>
</div>
</div>
</div>
<div class="block-wrapper">
<label>Country:</label>
<div class="input-wrapper">
<input :value="user.relationships.settings.data.attributes.billing_country"
type="text"
disabled
/>
</div>
</div>
<div class="block-wrapper">
<label>Phone Number:</label>
<div class="input-wrapper">
<input :value="user.relationships.settings.data.attributes.billing_phone_number"
type="text"
disabled
/>
</div>
</div>
</div>
</PageTabGroup>
</PageTab>
</template>
@@ -66,7 +143,7 @@
import ButtonBase from '@/components/FilesView/ButtonBase'
import SetupBox from '@/components/Others/Forms/SetupBox'
import {required} from 'vee-validate/dist/rules'
import { mapGetters } from 'vuex'
import {mapGetters} from 'vuex'
import {events} from "@/bus"
import axios from 'axios'
@@ -150,7 +227,6 @@
max-width: 100%;
}
@media only screen and (max-width: 960px) {
}

View File

@@ -1,27 +1,34 @@
<template>
<PageTab>
<PageTab v-if="invoices">
<PageTabGroup>
<DatatableWrapper :paginator="true" :columns="columns" :data="invoices" class="table">
<template scope="{ row }">
<tr>
<td>
<a :href="'/invoice/' + row.data.attributes.token" target="_blank" class="cell-item">
{{ row.data.attributes.order }}
</a>
</td>
<td>
<span class="cell-item">
${{ row.attributes.total }}
${{ row.data.attributes.total }}
</span>
</td>
<td>
<span class="cell-item">
{{ row.attributes.plan }}
{{ row.data.attributes.bag[0].description }}
</span>
</td>
<td>
<span class="cell-item">
{{ row.attributes.created_at_formatted }}
{{ row.data.attributes.created_at_formatted }}
</span>
</td>
<td>
<div class="action-icons">
<download-cloud-icon size="15" class="icon"></download-cloud-icon>
<a :href="'/invoice/' + row.data.attributes.token" target="_blank">
<external-link-icon size="15" class="icon"></external-link-icon>
</a>
</div>
</td>
</tr>
@@ -35,124 +42,40 @@
import PageTabGroup from '@/components/Others/Layout/PageTabGroup'
import PageTab from '@/components/Others/Layout/PageTab'
import DatatableWrapper from '@/components/Others/Tables/DatatableWrapper'
import {DownloadCloudIcon} from "vue-feather-icons";
import {ExternalLinkIcon} from "vue-feather-icons";
import axios from 'axios'
export default {
name: 'UserStorage',
name: 'UserInvoices',
components: {
PageTabGroup,
PageTab,
DatatableWrapper,
DownloadCloudIcon,
ExternalLinkIcon,
},
data() {
return {
isLoading: false,
invoices: [
{
id: '1',
type: 'invoices',
attributes: {
total: 9.99,
plan: 'Starter Plan',
created_at: '30. April. 2020',
created_at_formatted: '30. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '2',
type: 'invoices',
attributes: {
total: 9.99,
plan: 'Starter Plan',
created_at: '30. April. 2020',
created_at_formatted: '30. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '3',
type: 'invoices',
attributes: {
total: 49.99,
plan: 'Business Plan',
created_at: '31. April. 2020',
created_at_formatted: '31. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '4',
type: 'invoices',
attributes: {
total: 29.99,
plan: 'Professional Plan',
created_at: '31. April. 2020',
created_at_formatted: '31. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '5',
type: 'invoices',
attributes: {
total: 9.99,
plan: 'Starter Plan',
created_at: '30. April. 2020',
created_at_formatted: '30. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '6',
type: 'invoices',
attributes: {
total: 9.99,
plan: 'Starter Plan',
created_at: '30. April. 2020',
created_at_formatted: '30. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '7',
type: 'invoices',
attributes: {
total: 49.99,
plan: 'Business Plan',
created_at: '31. April. 2020',
created_at_formatted: '31. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '8',
type: 'invoices',
attributes: {
total: 29.99,
plan: 'Professional Plan',
created_at: '31. April. 2020',
created_at_formatted: '31. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
],
isLoading: true,
invoices: undefined,
columns: [
{
label: 'Invoice Number',
field: 'data.attributes.total',
sortable: true
},
{
label: 'Total',
field: 'attributes.total',
field: 'data.attributes.total',
sortable: true
},
{
label: 'Plan',
field: 'attributes.plan',
field: 'data.attributes.plan',
sortable: true
},
{
label: 'Payed',
field: 'attributes.created_at',
field: 'data.attributes.created_at',
sortable: true
},
{
@@ -164,11 +87,11 @@
}
},
created() {
/*axios.get('/api/users/' + this.$route.params.id + '/storage')
axios.get('/api/users/' + this.$route.params.id + '/invoices')
.then(response => {
this.storage = response.data.data
this.invoices = response.data.data
this.isLoading = false
})*/
})
}
}
</script>