Последняя версия с сервера прошлого разработчика
This commit is contained in:
79
resources/js/Pages/Settings/SettingsDocuments.vue
Executable file
79
resources/js/Pages/Settings/SettingsDocuments.vue
Executable file
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<meta-head title="Написать нам"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div class="mx-4 2xl:mx-28 my-8">
|
||||
<div class="mt-10">
|
||||
<ul class="flex flex-col text-white gap-3 text-base px-3">
|
||||
<li>
|
||||
<a target="_blank" class="hover:underline"
|
||||
href="/docs/company.pdf"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>О компании</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="hover:underline"
|
||||
href="/docs/offer_authors.pdf"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>Оферта для авторов</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="hover:underline"
|
||||
href="/docs/offer_paid_subscription.pdf"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>Оферта на платную подписку</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="hover:underline"
|
||||
href="/docs/security_policy.pdf"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>Политика безопасности</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="hover:underline"
|
||||
href="/docs/privacy_policy.pdf"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>Политика конфиденциальности</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="hover:underline"
|
||||
href="/docs/terms_use.pdf"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>Пользовательское соглашение</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="hover:underline"
|
||||
href="/docs/personal_data.pdf"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>Согласие на обработку персональных данных</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
},
|
||||
layout: Layout,
|
||||
props: {},
|
||||
setup() {}
|
||||
}
|
||||
</script>
|
||||
40
resources/js/Pages/Settings/SettingsLikes.vue
Executable file
40
resources/js/Pages/Settings/SettingsLikes.vue
Executable file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<meta-head title="Понравилось"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div v-if="feeds.length" class="m-4 lg:m-8 grid grid-cols-2 sm:grid-cols-3 xl:grid-cols-4 gap-2 lg:gap-4">
|
||||
<feed :feeds="feeds" :next-cursor="nextCursor" />
|
||||
</div>
|
||||
<div v-else class="m-4 lg:m-8 text-lg text-gray-light">
|
||||
Данных нет
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import Feed from '@/Shared/Feed/Feed.vue'
|
||||
export default {
|
||||
components: {
|
||||
Feed,
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
feeds: Array,
|
||||
nextCursor: String,
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
196
resources/js/Pages/Settings/SettingsMoney.vue
Executable file
196
resources/js/Pages/Settings/SettingsMoney.vue
Executable file
@@ -0,0 +1,196 @@
|
||||
|
||||
|
||||
<template>
|
||||
<meta-head title="Доход"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
<div class="col-span-4">
|
||||
<div class="border-b border-indigo-300">
|
||||
<div class="py-5 px-4 2xl:px-28">
|
||||
<a rel="noopener noreferrer nofollow" target="_blank"
|
||||
href="https://yoomoney.ru/pay/page?id=526623"
|
||||
>
|
||||
<svg class="h-10 mb-5" xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 1440 320"
|
||||
><defs></defs><path fill="#fff" d="M1265.12,160.92c0-39.25-29.7-71-71.65-71-41.12,0-70.4,30.53-70.4,72.48,0,42.16,30.11,72.9,73.31,72.9,27.41,0,50.46-12.26,64.79-37.18l-29.07-13.5c-6.85,12.46-21.81,20.56-35.72,20.56-17.65,0-38-13.29-39.25-31.77h106.95A77.88,77.88,0,0,0,1265.12,160.92Zm-107.37-12c2.5-18.69,15.37-30.94,35.93-30.94,20.35,0,32.81,12,34.47,30.94Z" /><path fill="#fff" d="M864.79,89.89c-42.16,0-72.06,30.33-72.06,73.11,0,42.36,29.9,72.27,72.48,72.27,42.78,0,72.68-29.91,72.68-71.65C937.89,120.63,907.16,89.89,864.79,89.89Zm.42,113.6c-21.19,0-34.27-15.78-34.27-40.29,0-24.92,13.29-41.95,34.27-41.95,21.18,0,34.47,16.82,34.47,41.95C899.68,187.92,886.6,203.49,865.21,203.49Z" /><path fill="#fff" d="M714.67,89.93c-17.27,0-30.28,5.9-43.29,20.53h-4.27c-8.74-13.21-23-20.53-39-20.53A50.44,50.44,0,0,0,587,110.46h-4.27l-.21-.2V92.78H546.78V232.22H585.4V160.46c0-23.17,9.76-36.79,26.63-36.79,15.65,0,25.81,11.59,25.81,29.27v79.28h38.82V160.46c0-23,9.76-36.79,26.84-36.79,15.44,0,25.4,11.59,25.4,29.48v79.07h38.83V148.47C767.73,112.09,748.21,89.93,714.67,89.93Z" /><path fill="#fff" d="M1351,183.86h-2.76c0-2.48-16.84-46.64-27.88-74l-6.9-17.11h-38.91l55.2,139.93L1308,286h38.64l79.49-193.2H1387.2l-6.35,14.63-21.53,53.27C1353.25,175.58,1350.76,182.48,1351,183.86Z" /><path fill="#fff" d="M1045,89.93c-17.28,0-32.12,7.52-42.08,20.94h-4.07l-.4-.2V92.78H962.69V232.22h38.62V160.87c0-22.76,11-37,29.07-37,16.87,0,29.27,12.6,29.27,32.52v75.82h38.62V148.07C1098.27,113.92,1075.91,89.93,1045,89.93Z" /><path fill="#8b3ffd" d="M284.49,10C201.05,10,134,77.5,134,160c0,83.18,67.71,150,150.47,150S435,242.5,435,160,367.25,10,284.49,10Zm0,205.91c-30.78,0-56.08-25.23-56.08-55.91s25.3-55.91,56.08-55.91,56.09,25.23,56.09,55.91C339.89,190.68,315.27,215.91,284.49,215.91Z" /><path fill="#8b3ffd" d="M134,53.58V271.76H80.68L12.28,53.58Z" /></svg>
|
||||
</a>
|
||||
|
||||
<form method="GET" class="flex"
|
||||
action="/actions-to-payments"
|
||||
>
|
||||
<input v-model="sum" type="number"
|
||||
name="sum"
|
||||
placeholder="Введите сумму"
|
||||
class="w-full focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
/>
|
||||
<button type="submit" class="ml-5 transition shadow-none hover:shadow-classic2 inline-flex items-center px-8 py-3 justify-center text-base rounded-md text-white bg-pink focus:outline-none">
|
||||
Пополнить
|
||||
</button>
|
||||
</form>
|
||||
<p v-show="sum" class="text-white mt-1">
|
||||
ИТОГО + 3.5% комиссия сервиса yoomoney = {{ amount }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between px-4 2xl:px-28 my-4 lg:my-8">
|
||||
<div class="flex flex-col text-white">
|
||||
<span class="text-lg">Баланс:</span>
|
||||
<span class="text-3xl">{{ $page.props.balance }}</span>
|
||||
</div>
|
||||
<inertia-link :href="route('setting.payouts')" type="button"
|
||||
class="my-1 transition shadow-none hover:shadow-classic2 inline-flex items-center px-8 py-3 justify-center text-base rounded-md text-white bg-orange focus:outline-none"
|
||||
>
|
||||
Вывести
|
||||
</inertia-link>
|
||||
</div>
|
||||
<div class="text-white flex justify-end gap-3 flex-wrap pb-2 px-4 2xl:px-28">
|
||||
<div class="flex items-center gap-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16"
|
||||
height="16" viewBox="0 0 24 24"
|
||||
fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round" class="feather feather-check-square"
|
||||
><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>
|
||||
Ознакомлен:
|
||||
</div>
|
||||
<p>
|
||||
<a class="underline" rel="noopener noreferrer nofollow"
|
||||
target="_blank"
|
||||
href="https://yoomoney.ru/pay/page?id=526623"
|
||||
>Yoomoney</a>
|
||||
</p>
|
||||
<inertia-link class="underline" :href="route('setting.tarif')">
|
||||
Тарифы
|
||||
</inertia-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pointLists.length" class="my-4 lg:my-8">
|
||||
<div class="py-4 px-4 2xl:px-28 md:text-lg text-white">
|
||||
История операций:
|
||||
<!-- <button class="text-xs" @click="testPaid">
|
||||
Пополнить
|
||||
</button> -->
|
||||
</div>
|
||||
<div class="divide-y divide-indigo-300 ">
|
||||
<InfinityScroll :node-element="lastNodeLement" :next-cursor="nextCursor"
|
||||
@fromPagination="putFromPagination"
|
||||
>
|
||||
<div v-for="point in pointLists" :key="point.id"
|
||||
:ref="el => { if (el && point.id === lastElementID) lastNodeLement = el }"
|
||||
class="py-4 px-4 2xl:px-28 lg:items-center flex flex-col lg:grid gap-2 lg:gap-5 grid-cols-12"
|
||||
>
|
||||
<div class="col-span-5 flex items-center">
|
||||
<div class="flex-shrink-0 mr-3 lg:mr-8">
|
||||
<svg :class="[point.direction == 2 ? 'text-white rotate-180' : point.direction == 0 ? 'text-green rotate-90' : 'text-red -rotate-90', 'transform w-8 h-8']">
|
||||
<use xlink:href="#arrow-up-circle"></use>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<p class="truncate text-base lg:text-lg font-semibold text-gray">
|
||||
{{ point.date }}
|
||||
</p>
|
||||
<p class="truncate lg:mt-1 text-base text-gray-light">
|
||||
{{ point.time }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-2 text-left lg:text-center text-white xl:text-xl font-semibold">
|
||||
{{ point.point }}
|
||||
</div>
|
||||
<div class="col-span-5 text-left lg:text-right text-gray-light xl:text-lg">
|
||||
{{ point.type }}
|
||||
|
||||
<div v-if="point.direction == 2">
|
||||
<button class="text-green underline" @click="checkPaid(point.id)">
|
||||
Проверить оплату
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</InfinityScroll>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="py-4 px-4 2xl:px-28 md:text-lg text-gray-light">
|
||||
Нет данных
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import { Inertia } from '@inertiajs/inertia'
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import InfinityScroll from '@/Shared/Misc/InfinityScroll.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
InfinityScroll,
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
nextCursor: String,
|
||||
points: Array,
|
||||
},
|
||||
|
||||
setup() {
|
||||
const containerRef = ref(null)
|
||||
return {
|
||||
lastNodeLement: containerRef,
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
pointLists: [],
|
||||
sum: null,
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
amount(){
|
||||
return ((Math.abs(this.sum) * 0.035) + Math.abs(this.sum)).toFixed(1)
|
||||
},
|
||||
lastElementID() {
|
||||
return this.pointLists[this.pointLists.length - 1]?.id
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
points(points){
|
||||
this.pointLists = points
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.pointLists = this.points
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
putFromPagination(lists) {
|
||||
for (let list of lists) {
|
||||
this.pointLists.push(list)
|
||||
}
|
||||
},
|
||||
checkPaid(id) {
|
||||
Inertia.post(route('payouts.checkPointPay', id), {
|
||||
preserveScroll: true,
|
||||
preserveState: true,
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
105
resources/js/Pages/Settings/SettingsNotify.vue
Executable file
105
resources/js/Pages/Settings/SettingsNotify.vue
Executable file
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<meta-head title="Оповещения"></meta-head>
|
||||
|
||||
<modal-feed
|
||||
:modal-feed="modalFeed"
|
||||
:is_exist_menu="false"
|
||||
:open="show"
|
||||
@close-modal="closeModal"
|
||||
/>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div v-if="notifications.length" data-simplebar
|
||||
class="max-h-[500px] overflow-auto my-4 lg:my-8"
|
||||
>
|
||||
<div class="divide-y divide-indigo-300">
|
||||
<div v-for="notification in notifications" :key="notification.id"
|
||||
class="py-4 px-4 2xl:px-28 lg:items-center flex flex-col lg:grid gap-2 lg:gap-5 grid-cols-12 md:space-x-4"
|
||||
>
|
||||
<div class="col-span-4 flex items-center">
|
||||
<inertia-link :href="route('profile.user', notification.user.username)" class="flex-shrink-0 block mr-5">
|
||||
<user-avatar :user="notification.user" size="small"
|
||||
class="w-14 h-14 md:w-20 md:h-20 text-xl"
|
||||
/>
|
||||
</inertia-link>
|
||||
<inertia-link :href="route('profile.user', notification.user.username)" class="flex flex-col">
|
||||
<p class="truncate text-base lg:text-lg font-semibold text-orange">
|
||||
{{ notification.user.name }}
|
||||
</p>
|
||||
<p class="truncate lg:mt-1 text-base text-gray-light">
|
||||
{{ notification.created_at }}
|
||||
</p>
|
||||
</inertia-link>
|
||||
</div>
|
||||
<div class="col-span-6 text-white xl:text-xl">
|
||||
<notify-text
|
||||
:type="notification.type"
|
||||
:content="notification.data"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="notification.feed" class="col-span-2 flex lg:justify-end">
|
||||
<feed-preview class="w-20 h-20 object-cover cursor-pointer"
|
||||
:type="notification.feed.type"
|
||||
:source="notification.feed.entity.preview"
|
||||
@click="openModal(notification.feed)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="m-4 lg:m-8 text-lg text-gray-light">
|
||||
Оповещений нет
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import ModalFeed from '@/Shared/Overlay/ModalFeed.vue'
|
||||
import UserAvatar from '@/Shared/Misc/UserAvatar.vue'
|
||||
import FeedPreview from '@/Shared/Feed/FeedPreview.vue'
|
||||
import NotifyText from '@/Shared/Notification/NotifyText.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
ModalFeed,
|
||||
UserAvatar,
|
||||
FeedPreview,
|
||||
NotifyText,
|
||||
},
|
||||
layout: Layout,
|
||||
|
||||
props: {
|
||||
notifications: Array,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
modalFeed: {},
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
openModal(feed) {
|
||||
this.show = true
|
||||
this.modalFeed = feed
|
||||
},
|
||||
closeModal() {
|
||||
this.show = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
174
resources/js/Pages/Settings/SettingsPacket.vue
Executable file
174
resources/js/Pages/Settings/SettingsPacket.vue
Executable file
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<meta-head title="Настроить оплату за подписку"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div class="mx-4 2xl:mx-20 my-8">
|
||||
<form v-if="user.private" class="border-b border-indigo-400 pb-10 mt-10 grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-7 gap-5 lg:gap-10 items-start"
|
||||
@submit.prevent="submit"
|
||||
>
|
||||
<div class="2xl:col-span-3 flex flex-col">
|
||||
<text-input v-model="form.price" :error="form.errors.price"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light" label="Цена подписки"
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
<div class="lg:col-span-2 2xl:col-span-1 2xl:mt-8">
|
||||
<loading-button :loading="form.processing" class="transition shadow-none hover:shadow-classic2 inline-flex items-center px-3 py-2.5 w-full justify-center text-base rounded-md text-white bg-orange focus:outline-none"
|
||||
type="submit"
|
||||
>
|
||||
Обновить
|
||||
</loading-button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
<div v-if="buyers.length || subscriptions.length" class="grid md:grid-cols-2 gap-3">
|
||||
<div v-if="buyers.length">
|
||||
<h2 class="mt-5 text-base text-gray-light font-medium">
|
||||
Ваши платные подписчики
|
||||
</h2>
|
||||
<div class="mt-3 space-y-4">
|
||||
<div v-for="buyer in buyers" :key="buyer.id"
|
||||
class="bg-indigo-300 flex flex-col p-4 rounded-sm"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<inertia-link :href="route('profile.user', buyer.user.username)" class="flex-shrink-0 block mr-2 md:mr-4">
|
||||
<user-avatar :user="buyer.user" size="small"
|
||||
class="w-10 h-10 md:w-14 md:h-14 text-lg"
|
||||
/>
|
||||
</inertia-link>
|
||||
<inertia-link :href="route('profile.user', buyer.user.username)" class="flex flex-col">
|
||||
<span class="hover:underline text-sm md:text-base block font-medium text-white">{{ buyer.user.first_name }} {{ buyer.user.last_name }}</span>
|
||||
</inertia-link>
|
||||
</div>
|
||||
<div>
|
||||
<ul>
|
||||
<li v-for="list in buyer.lists" :key="list.time_end">
|
||||
<span :class="[list.active ? 'text-green' : 'text-orange']" class="text-xs">
|
||||
Дата окончания подписки: {{ list.time_end }}{{ list.active ? ' - активно' : '' }}. Цена {{ list.price }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="subscriptions.length">
|
||||
<h2 class="mt-5 text-base text-gray-light font-medium">
|
||||
Ваши платные подписки
|
||||
</h2>
|
||||
<div class="mt-3 space-y-4">
|
||||
<div v-for="subscription in subscriptions" :key="subscription.id"
|
||||
class="bg-indigo-300 flex flex-col p-4 rounded-sm"
|
||||
>
|
||||
<toggle
|
||||
:user_id="subscription.user.id"
|
||||
:enabled="subscription.autosubscription"
|
||||
textin="Автоматическое списание отключено"
|
||||
textout="Автоматическое списание включено" @clicked="makeAutoSubsUser"
|
||||
/>
|
||||
<div class="mt-3 flex items-center gap-1">
|
||||
<inertia-link :href="route('profile.user', subscription.user.username)" class="flex-shrink-0 block mr-2 md:mr-4">
|
||||
<user-avatar :user="subscription.user" size="small"
|
||||
class="w-10 h-10 md:w-14 md:h-14 text-lg"
|
||||
/>
|
||||
</inertia-link>
|
||||
<inertia-link :href="route('profile.user', subscription.user.username)" class="flex flex-col">
|
||||
<span class="hover:underline text-sm md:text-base block font-medium text-white">{{ subscription.user.first_name }} {{ subscription.user.last_name }}</span>
|
||||
</inertia-link>
|
||||
|
||||
<div v-if="subscription.active === false" class="ml-auto text-gray-light text-xs">
|
||||
<button class="hover:underline" @click="removePaidUser(subscription.user.id)">
|
||||
Отписаться от пользователя
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<ul>
|
||||
<li v-for="list in subscription.lists" :key="list.time_end">
|
||||
<span :class="[list.active ? 'text-green' : 'text-orange']" class="text-xs">
|
||||
Дата окончания подписки: {{ list.time_end }}{{ list.active ? ' - активно' : '' }}. Цена {{ list.price }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="mt-10 text-gray-light text-lg">
|
||||
Данных нет!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useForm } from '@inertiajs/inertia-vue3'
|
||||
import { Inertia } from '@inertiajs/inertia'
|
||||
import { toRefs } from 'vue'
|
||||
import UserAvatar from '@/Shared/Misc/UserAvatar.vue'
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import LoadingButton from '@/Shared/Form/LoadingButton.vue'
|
||||
import TextInput from '@/Shared/Form/TextInput.vue'
|
||||
import Toggle from '@/Shared/Form/Toggle.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
LoadingButton,
|
||||
TextInput,
|
||||
UserAvatar,
|
||||
Toggle
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
user: Object,
|
||||
packet: Object,
|
||||
buyers: Array,
|
||||
subscriptions: Array,
|
||||
},
|
||||
setup(props) {
|
||||
const { user, packet } = toRefs(props)
|
||||
const form = useForm({
|
||||
id: packet.value?.id,
|
||||
price: packet.value?.price,
|
||||
user: user.value.id,
|
||||
})
|
||||
|
||||
const submit = () => {
|
||||
form.post(route('user.package.update'))
|
||||
}
|
||||
|
||||
const removePaidUser = (id) => {
|
||||
Inertia.post(route('users.removePaidSubs', id), {
|
||||
preserveScroll: true,
|
||||
preserveState: true,
|
||||
})
|
||||
}
|
||||
const makeAutoSubsUser = (id) => {
|
||||
Inertia.post(route('users.settingsPaidSubsUser', id), {
|
||||
preserveScroll: true,
|
||||
preserveState: true,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return { form, submit, removePaidUser, makeAutoSubsUser }
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
198
resources/js/Pages/Settings/SettingsPayouts.vue
Executable file
198
resources/js/Pages/Settings/SettingsPayouts.vue
Executable file
@@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<meta-head title="Выплаты"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
<div class="col-span-4">
|
||||
<div class="border-b border-indigo-300">
|
||||
<div v-if="isVerified" class="py-5 px-4 2xl:px-28">
|
||||
<div class="flex">
|
||||
<input v-model="amount" type="number"
|
||||
placeholder="Введите сумму"
|
||||
class="w-full focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
/>
|
||||
<button class="ml-5 transition shadow-none hover:shadow-classic2 inline-flex items-center px-8 py-3 justify-center text-base rounded-md text-white bg-pink focus:outline-none" @click="pay">
|
||||
Вывести
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="py-5 px-4 2xl:px-28">
|
||||
<div class="text-white text-lg">
|
||||
Заполните номер телефона в <inertia-link :href="route('setting.index')" class="underline">
|
||||
профиле
|
||||
</inertia-link> и пройдите <inertia-link :href="route('setting.verification')" class="underline">
|
||||
верификацию
|
||||
</inertia-link>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="py-5 px-4 2xl:px-28">
|
||||
<div class="flex">
|
||||
<input v-model="bank_info.number" type="number"
|
||||
placeholder="Введите номер карты"
|
||||
class="w-full focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light" label="Фамилия"
|
||||
/>
|
||||
<button class="ml-5 transition shadow-none hover:shadow-classic2 inline-flex items-center px-8 py-3 justify-center text-base rounded-md text-white bg-pink focus:outline-none" @click="updateRequisites">
|
||||
{{ bank_info?.id ? 'Обновить' : 'Создать' }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="text-red text-sm">
|
||||
Банковские реквизиты
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="flex justify-between px-4 2xl:px-28 my-4 lg:my-8">
|
||||
<div class="flex flex-col text-white">
|
||||
<span class="text-lg">Баланс:</span>
|
||||
<span class="text-3xl">{{ $page.props.balance }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="withdrawalsLists.length" class="my-4 lg:my-8">
|
||||
<div class="py-4 px-4 2xl:px-28 md:text-lg text-white">
|
||||
История операций:
|
||||
</div>
|
||||
<div class="divide-y divide-indigo-300 ">
|
||||
<InfinityScroll :node-element="lastNodeLement" :next-cursor="nextCursor"
|
||||
@fromPagination="putFromPagination"
|
||||
>
|
||||
<div v-for="withdrawal in withdrawalsLists" :key="withdrawal.id"
|
||||
:ref="el => { if (el && withdrawal.id === lastElementID) lastNodeLement = el }"
|
||||
class="py-4 px-4 2xl:px-28 lg:items-center flex flex-col lg:grid gap-2 lg:gap-5 grid-cols-12"
|
||||
>
|
||||
<div class="col-span-4 flex items-center">
|
||||
<div class="flex-shrink-0 mr-3 lg:mr-8">
|
||||
<svg class="transform w-8 h-8 rotate-90" :class="{
|
||||
'text-gray-light': withdrawal.status === 'pending',
|
||||
'text-green': withdrawal.status === 'success',
|
||||
'text-red': withdrawal.status === 'cancel',
|
||||
}"
|
||||
>
|
||||
<use xlink:href="#arrow-up-circle"></use>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<p class="truncate text-base lg:text-lg font-semibold text-gray">
|
||||
{{ withdrawal.datePart }}
|
||||
</p>
|
||||
<p class="truncate lg:mt-1 text-base text-gray-light">
|
||||
{{ withdrawal.timePart }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-2 text-left lg:text-center text-white xl:text-xl font-semibold">
|
||||
{{ withdrawal.amount }}
|
||||
</div>
|
||||
<div class="col-span-6 text-left lg:text-right text-gray-light xl:text-lg flex flex-col">
|
||||
<span v-html="withdrawal.history_payment_details"></span>
|
||||
<span class="mt-2 text-orange">{{ withdrawal.meta }}</span>
|
||||
<span v-show="withdrawal.description" class="mt-2">{{ withdrawal.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</InfinityScroll>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="py-4 px-4 2xl:px-28 md:text-lg text-gray-light">
|
||||
Нет данных
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Inertia } from '@inertiajs/inertia'
|
||||
import { ref } from 'vue'
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import InfinityScroll from '@/Shared/Misc/InfinityScroll.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
InfinityScroll,
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
nextCursor: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isVerified: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
withdrawals: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
// requisites: {
|
||||
// type: Object,
|
||||
// default: () => {}
|
||||
// }
|
||||
},
|
||||
|
||||
setup() {
|
||||
const containerRef = ref(null)
|
||||
return {
|
||||
lastNodeLement: containerRef,
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
withdrawalsLists: [],
|
||||
bank_info: {},
|
||||
amount: null,
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
lastElementID() {
|
||||
return this.withdrawalsLists[this.withdrawalsLists.length - 1]?.id
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
withdrawals(withdrawals){
|
||||
this.withdrawalsLists = withdrawals
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.withdrawalsLists = this.withdrawals
|
||||
// this.bank_info = this.requisites
|
||||
},
|
||||
|
||||
methods: {
|
||||
// updateRequisites() {
|
||||
// if(!this.bank_info?.number) return
|
||||
// Inertia.post(route('requisites.bank'), {
|
||||
// number: this.bank_info.number,
|
||||
// })
|
||||
// },
|
||||
pay() {
|
||||
if(!this.amount) return
|
||||
const that = this
|
||||
Inertia.post(route('payouts.start'), {
|
||||
amount: that.amount,
|
||||
}, {
|
||||
onSuccess: () => {
|
||||
that.amount = null
|
||||
}
|
||||
})
|
||||
},
|
||||
putFromPagination(lists) {
|
||||
for (let list of lists) {
|
||||
this.withdrawalsLists.push(list)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
358
resources/js/Pages/Settings/SettingsProfile.vue
Executable file
358
resources/js/Pages/Settings/SettingsProfile.vue
Executable file
@@ -0,0 +1,358 @@
|
||||
<template>
|
||||
<meta-head title="Мои настройки"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div class="m-4 lg:m-8">
|
||||
<div class="flex flex-col xl:flex-row">
|
||||
<div class="xl:mr-24">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 mr-5">
|
||||
<user-avatar :user="user" class="w-20 h-20 text-lg" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<p class="text-base lg:text-xl font-semibold text-gray">
|
||||
{{ user.name }}
|
||||
</p>
|
||||
<p class="lg:mt-1 text-base text-gray-light">
|
||||
@{{ user.username }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<input ref="fileavatar" class="hidden"
|
||||
accept="image/png, image/jpeg, image/jpg" type="file"
|
||||
@change="previewFiles"
|
||||
>
|
||||
<input ref="filebanner" class="hidden"
|
||||
accept="image/png, image/jpeg, image/jpg" type="file"
|
||||
@change="previewFilesBanner"
|
||||
>
|
||||
<div>
|
||||
<div v-if="$page.props.errors.avatar" class="text-red lg:text-lg">
|
||||
{{ $page.props.errors.avatar }}
|
||||
</div>
|
||||
<button v-if="!user.photo_path" class="hover:underline mt-2 text-left lg:mt-5 default lg:text-lg text-orange"
|
||||
@click="changeAvatar"
|
||||
>
|
||||
Изменить фото профиля
|
||||
</button>
|
||||
<button v-else class="hover:underline mt-2 text-left lg:mt-5 default lg:text-lg text-red"
|
||||
@click="removeAvatar"
|
||||
>
|
||||
Удалить фото
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5 xl:mt-0">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 mr-5">
|
||||
<user-banner class="w-60 lg:w-96 h-20 rounded-xl bg-indigo-300" :user="user"
|
||||
size="banner"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="$page.props.errors.banner" class="text-red lg:text-lg">
|
||||
{{ $page.props.errors.banner }}
|
||||
</div>
|
||||
<button v-if="!user.banner_path" class="hover:underline mt-2 text-left lg:mt-5 default lg:text-lg text-orange"
|
||||
@click="changeBanner"
|
||||
>
|
||||
Изменить баннер профиля
|
||||
</button>
|
||||
<button v-else class="hover:underline mt-2 text-left lg:mt-5 default lg:text-lg text-red"
|
||||
@click="removeBanner"
|
||||
>
|
||||
Удалить баннер
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="border-b border-indigo-400 pb-10 mt-10 grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-7 gap-5 lg:gap-10 items-start" @submit.prevent="submitPassword">
|
||||
<div class="2xl:col-span-3 flex flex-col">
|
||||
<text-input v-model="passwordForm.old_password" :error="passwordForm.errors.old_password"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light" label="Старый пароль"
|
||||
type="password"
|
||||
/>
|
||||
</div>
|
||||
<div class="2xl:col-span-3 flex flex-col">
|
||||
<text-input v-model="passwordForm.new_password" :error="passwordForm.errors.new_password"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light" label="Новый пароль"
|
||||
type="password"
|
||||
/>
|
||||
</div>
|
||||
<div class="lg:col-span-2 2xl:col-span-1 2xl:mt-8">
|
||||
<loading-button :loading="form.processing" class="transition shadow-none hover:shadow-classic2 inline-flex items-center px-3 py-2.5 w-full justify-center text-base rounded-md text-white bg-orange focus:outline-none"
|
||||
type="submit"
|
||||
>
|
||||
Обновить
|
||||
</loading-button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="mt-10 grid gap-4 lg:gap-10 grid-cols-1 lg:grid-cols-2" @submit.prevent="submit">
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.first_name" :error="form.errors.first_name"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light" label="Имя"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.last_name" :error="form.errors.last_name"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light" label="Фамилия"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.username" :error="form.errors.username"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light" label="Тег"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.date_of_birth" :error="form.errors.date_of_birth"
|
||||
type="date" class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
label="Дата рождения"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.email" :error="form.errors.email"
|
||||
type="email" class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
label="Почта"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.phone" :error="form.errors.phone"
|
||||
type="tel" class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
label="Телефон"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.inn" :error="form.errors.inn"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
label="ИНН"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.checking_account" :error="form.errors.checking_account"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
label="Расчетный счет"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.bik" :error="form.errors.bik"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
label="Бик банка"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-gray-light text-lg mb-2">
|
||||
Пол
|
||||
</div>
|
||||
<div class="flex space-x-6">
|
||||
<div class="flex items-center">
|
||||
<input id="user-sex-1" v-model="form.sex"
|
||||
value="1" type="radio"
|
||||
class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="user-sex-1" class="select-none ml-3 text-gray">Женский</label>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<input id="user-sex-2" v-model="form.sex"
|
||||
value="2" type="radio"
|
||||
class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="user-sex-2" class="select-none ml-3 text-gray">Мужской</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="lg:col-span-2">
|
||||
<div class="text-gray-light text-lg mb-2">
|
||||
Тип
|
||||
</div>
|
||||
<div class="flex space-x-6">
|
||||
<div class="flex items-center">
|
||||
<input id="user-type-1" v-model="form.type"
|
||||
value="1" type="radio"
|
||||
class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="user-type-1" class="select-none ml-3 text-gray">Физ. лицо</label>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center">
|
||||
<input id="user-type-2" v-model="form.type"
|
||||
value="2" type="radio"
|
||||
class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="user-type-2" class="select-none ml-3 text-gray">Самозанятый</label>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<input id="user-type-3" v-model="form.type"
|
||||
value="3" type="radio"
|
||||
class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="user-type-3" class="select-none ml-3 text-gray">Юридическое лицо</label>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center">
|
||||
<input id="user-type-4" v-model="form.type"
|
||||
value="4" type="radio"
|
||||
class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="user-type-4" class="select-none ml-3 text-gray">ИП</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lg:col-span-2">
|
||||
<div class="flex flex-col">
|
||||
<textarea-input v-model="form.about" label="О себе"
|
||||
:error="form.errors.about" class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md"
|
||||
cols="30" rows="2"
|
||||
></textarea-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lg:col-span-2">
|
||||
<!-- <div class="text-gray-light text-lg mb-2">
|
||||
Ограничить доступ
|
||||
</div> -->
|
||||
<div class="flex items-center">
|
||||
<input id="user-private" v-model="form.private"
|
||||
type="checkbox" class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="user-private" class="select-none ml-3 text-gray">Включить эксклюзивный акаунт, доступ к контенту только по подписке</label>
|
||||
</div>
|
||||
<!-- <div class="flex items-center">
|
||||
<input id="user-commercial" v-model="form.allow_adult_content"
|
||||
type="checkbox" class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="user-commercial" class="select-none ml-3 text-gray">Разрешить контент для взрослых</label>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap -my-1 -mx-3">
|
||||
<loading-button :loading="form.processing" class="mx-3 my-1 transition shadow-none hover:shadow-classic2 inline-flex items-center px-8 py-3 justify-center text-base rounded-md text-white bg-orange focus:outline-none"
|
||||
type="submit"
|
||||
>
|
||||
Сохранить
|
||||
</loading-button>
|
||||
<!-- <button type="button"
|
||||
class="mx-3 my-1 default text-lg text-orange"
|
||||
>
|
||||
Удалить аккаунт
|
||||
</button> -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useForm } from '@inertiajs/inertia-vue3'
|
||||
import { Inertia } from '@inertiajs/inertia'
|
||||
import { toRefs } from 'vue'
|
||||
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import LoadingButton from '@/Shared/Form/LoadingButton.vue'
|
||||
import UserAvatar from '@/Shared/Misc/UserAvatar.vue'
|
||||
import UserBanner from '@/Shared/Misc/UserBanner.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import TextInput from '@/Shared/Form/TextInput.vue'
|
||||
import TextareaInput from '@/Shared/Form/TextareaInput.vue'
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
UserAvatar,
|
||||
UserBanner,
|
||||
TextInput,
|
||||
TextareaInput,
|
||||
LoadingButton,
|
||||
SettingsMenu,
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
user: Object,
|
||||
},
|
||||
setup(props) {
|
||||
const { user } = toRefs(props)
|
||||
const form = useForm({
|
||||
first_name: user.value.first_name,
|
||||
last_name: user.value.last_name,
|
||||
username: user.value.username,
|
||||
email: user.value.email,
|
||||
phone: user.value.phone,
|
||||
sex: user.value.sex,
|
||||
type: user.value.type,
|
||||
date_of_birth: user.value.date_of_birth,
|
||||
about: user.value.about,
|
||||
private: user.value.private,
|
||||
inn: user.value.inn,
|
||||
checking_account: user.value.checking_account,
|
||||
bik: user.value.bik,
|
||||
password: null,
|
||||
})
|
||||
|
||||
const passwordForm = useForm({
|
||||
old_password: null,
|
||||
new_password: null,
|
||||
})
|
||||
|
||||
const submit = () => {
|
||||
form.put(route('users.update', user.value.id))
|
||||
}
|
||||
const submitPassword = () => {
|
||||
passwordForm.put(route('users.update.password', user.value.id), {
|
||||
onSuccess: () => passwordForm.reset(),
|
||||
})
|
||||
}
|
||||
|
||||
return { form, passwordForm, submit, submitPassword }
|
||||
},
|
||||
methods: {
|
||||
previewFilesBanner(event){
|
||||
const file = event.target.files[0]
|
||||
Inertia.post(route('image.banner'), {
|
||||
_method: 'put',
|
||||
banner: file,
|
||||
})
|
||||
},
|
||||
previewFiles(event){
|
||||
const file = event.target.files[0]
|
||||
Inertia.post(route('image.avatar'), {
|
||||
_method: 'put',
|
||||
avatar: file,
|
||||
})
|
||||
},
|
||||
changeBanner(){
|
||||
this.$refs.filebanner.click()
|
||||
},
|
||||
removeBanner(){
|
||||
Inertia.post(route('image.banner.remove'), {
|
||||
_method: 'delete',
|
||||
})
|
||||
},
|
||||
changeAvatar(){
|
||||
this.$refs.fileavatar.click()
|
||||
},
|
||||
removeAvatar(){
|
||||
Inertia.post(route('image.avatar.remove'), {
|
||||
_method: 'delete',
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
96
resources/js/Pages/Settings/SettingsPurchases.vue
Executable file
96
resources/js/Pages/Settings/SettingsPurchases.vue
Executable file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<meta-head title="Покупки"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div v-if="feedLists.length" class="m-4 lg:m-8 grid grid-cols-2 sm:grid-cols-3 xl:grid-cols-4 gap-2 lg:gap-4">
|
||||
<InfinityScroll :node-element="lastNodeLement" :next-cursor="nextCursor"
|
||||
@fromPagination="putFromPagination"
|
||||
>
|
||||
<div v-for="feed in feedLists" :key="feed.id"
|
||||
:ref="el => { if (el && feed.id === lastElementID) lastNodeLement = el }"
|
||||
>
|
||||
<inertia-link :href="route('setting.show.purchases', feed.id)" class="block contain relative overflow-hidden">
|
||||
<feed-header-misc :count="1" :type="feed.type" />
|
||||
<div>
|
||||
<feed-preview class="w-full h-36 md:h-72 object-cover" :type="feed.type"
|
||||
:source="feed.preview"
|
||||
/>
|
||||
</div>
|
||||
<p class="mt-2 text-gray-light text-sm">
|
||||
Цена: {{ feed.price }}
|
||||
</p>
|
||||
<p class="mt-2 text-gray-light text-sm">
|
||||
Дата покупки: {{ feed.purchase_date }}
|
||||
</p>
|
||||
</inertia-link>
|
||||
</div>
|
||||
</InfinityScroll>
|
||||
</div>
|
||||
<div v-else class="m-4 lg:m-8 text-lg text-gray-light">
|
||||
Вы еще не совершали покупки
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import FeedHeaderMisc from '@/Shared/Feed/HeaderMisc.vue'
|
||||
import FeedPreview from '@/Shared/Feed/FeedPreview.vue'
|
||||
import InfinityScroll from '@/Shared/Misc/InfinityScroll.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
FeedHeaderMisc,
|
||||
FeedPreview,
|
||||
InfinityScroll,
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
nextCursor: String,
|
||||
feeds: Array,
|
||||
},
|
||||
|
||||
setup() {
|
||||
const containerRef = ref(null)
|
||||
return {
|
||||
lastNodeLement: containerRef,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
feedLists: [],
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
lastElementID() {
|
||||
return this.feedLists[this.feedLists.length - 1]?.id
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.feedLists = this.feeds
|
||||
},
|
||||
|
||||
methods: {
|
||||
putFromPagination(lists) {
|
||||
for (let list of lists) {
|
||||
this.feedLists.push(list)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
106
resources/js/Pages/Settings/SettingsPurchasesFile.vue
Executable file
106
resources/js/Pages/Settings/SettingsPurchasesFile.vue
Executable file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<meta-head title="Скачать медиа контент"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4 p-5">
|
||||
<div class="mb-4 flex items-center text-gray-light text-lg font-medium">
|
||||
<inertia-link :href="route('setting.purchases')" class="block hover:underline">
|
||||
Вернуться
|
||||
</inertia-link>
|
||||
<span class="px-3">/</span>
|
||||
<h1 class="text-gray">
|
||||
Скачать медиа контент
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="my-8 flex items-center justify-between">
|
||||
<inertia-link :href="route('profile.user', seller.username)" class="flex items-center">
|
||||
<div class="flex-shrink-0 block mr-2 md:mr-4">
|
||||
<user-avatar :user="seller" size="small"
|
||||
class="w-10 h-10 md:w-16 md:h-16 text-lg"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="text-sm md:text-base block font-medium text-white">{{ seller.name }}</span>
|
||||
<span class="text-xs text-gray-light">продавец</span>
|
||||
</div>
|
||||
</inertia-link>
|
||||
|
||||
<div class="text-right">
|
||||
<p class="mt-2 text-gray-light text-sm">
|
||||
Цена: {{ purchase.price }}
|
||||
</p>
|
||||
<p class="mt-2 text-gray-light text-sm">
|
||||
Дата покупки: {{ purchase.purchase_date }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div v-if="purchase.title" class="text-lg text-gray font-semibold">
|
||||
{{ purchase.title }}
|
||||
</div>
|
||||
<div v-if="purchase.body" class="text-lg mt-4 text-gray-light"
|
||||
v-html="purchase.body"
|
||||
></div>
|
||||
|
||||
<div class="mt-4">
|
||||
<component
|
||||
:is="currentTypeNode"
|
||||
:purchase="purchase"
|
||||
></component>
|
||||
</div>
|
||||
|
||||
<div class="mt-12 flex -mx-3 -my-1 flex-wrap">
|
||||
<a :href="route('download.purchases', purchase.id)" class="mx-3 my-1 transition shadow-none hover:shadow-classic2 inline-flex items-center px-8 py-3 justify-center text-base rounded-md text-white bg-orange focus:outline-none">
|
||||
Скачать архив
|
||||
</a>
|
||||
<inertia-link :href="route('setting.purchases')"
|
||||
class="mx-3 my-1 transition shadow-none hover:shadow-classic inline-flex items-center px-8 py-3 justify-center text-base rounded-md text-white bg-indigo-300 focus:outline-none"
|
||||
>
|
||||
Вернуться
|
||||
</inertia-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import PurchaseImages from '@/Shared/Purchase/PurchaseImages.vue'
|
||||
import PurchaseMusics from '@/Shared/Purchase/PurchaseMusics.vue'
|
||||
import PurchaseVideos from '@/Shared/Purchase/PurchaseVideos.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import UserAvatar from '@/Shared/Misc/UserAvatar.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
PurchaseImages,
|
||||
PurchaseMusics,
|
||||
PurchaseVideos,
|
||||
SettingsMenu,
|
||||
UserAvatar,
|
||||
},
|
||||
layout: Layout,
|
||||
|
||||
props: {
|
||||
purchase: Object,
|
||||
seller: Object,
|
||||
},
|
||||
|
||||
computed: {
|
||||
currentTypeNode() {
|
||||
return 'purchase-' + this.purchase.type
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
115
resources/js/Pages/Settings/SettingsTarif.vue
Executable file
115
resources/js/Pages/Settings/SettingsTarif.vue
Executable file
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<meta-head title="Тарифы"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div class="mx-4 2xl:mx-28 my-8">
|
||||
<h2 class="text-xl lg:text-2xl xl:text-4xl text-white font-semibold">
|
||||
Выберите тариф, который подходит именно вам
|
||||
</h2>
|
||||
<p class="mt-4 lg:text-xl xl:text-2xl text-white">
|
||||
Более 1 млн фотографий, видео и музыки в постоянном доступе для вас!
|
||||
</p>
|
||||
<p v-if="lastSubscription" class="mt-4 xl:text-xl text-green">
|
||||
Дата окончания подписки:
|
||||
<span class="block md:inline-block">{{ lastSubscription.endDateTime }} ({{ lastSubscription.package.name }})</span>
|
||||
<span v-if="!is_active_sub" class="text-pink"> (Подписка закончилась)</span>
|
||||
</p>
|
||||
<div class="rounded-xl bg-indigo-300 px-3 py-4 mt-5">
|
||||
<toggle
|
||||
:user_id="user_id"
|
||||
:enabled="user_autosubscription"
|
||||
textin="Автоматическое списание отключено"
|
||||
textout="Автоматическое списание включно" @clicked="makeAutoSubs"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-for="plan in plans" :key="plan.id"
|
||||
:class="[is_active_sub && lastSubscription?.package.id === plan.id ? 'border-l-4 lg:border-l-8 border-orange' : '' ,'mt-7 p-7 xl:mt-14 xl:p-14 shadow-classic rounded-md bg-indigo-100']"
|
||||
>
|
||||
<div class="flex flex-col lg:grid grid-cols-6 gap-3 items-center">
|
||||
<div class="col-start-1 col-end-4 flex flex-col items-center lg:items-start text-center lg:text-left">
|
||||
<span class="text-xl md:text-2xl lg:text-3xl xl:text-4xl text-white font-medium">{{ plan.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-start-5 col-end-7 flex flex-col items-center">
|
||||
<span class="text-3xl lg:text-4xl xl:text-6xl text-white font-bold">{{ plan.price }}</span>
|
||||
<button :disabled="offerCheck == false" type="button"
|
||||
:class="[is_active_sub && lastSubscription?.package.id === plan.id ? 'bg-white border border-green text-green' : 'text-white bg-green' , 'mt-4 my-1 transition shadow-none inline-flex items-center px-8 py-3 justify-center text-base rounded-3xl focus:outline-none disabled:bg-gray-light disabled:cursor-not-allowed']"
|
||||
@click="subsPlan(plan.id)"
|
||||
>
|
||||
<span v-if="is_active_sub && lastSubscription?.package.id === plan.id">
|
||||
активен
|
||||
</span>
|
||||
<span v-else>
|
||||
купить тариф
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 flex items-center">
|
||||
<input id="offer_check" v-model="offerCheck"
|
||||
type="checkbox" class="h-5 w-5 text-orange border-gray-light focus:ring-transparent focus:ring-offset-transparent"
|
||||
>
|
||||
<label for="offer_check" class="select-none ml-3 text-gray text-lg md:text-xl">Согласен с условиями
|
||||
<a href="/docs/offer_paid_subscription.pdf" class="underline"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>оферты</a></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Inertia } from '@inertiajs/inertia'
|
||||
|
||||
import Toggle from '@/Shared/Form/Toggle.vue'
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
Toggle,
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
plans: Array,
|
||||
is_active_sub: Boolean,
|
||||
user_autosubscription: Boolean,
|
||||
user_id: Number,
|
||||
lastSubscription: Object,
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
offerCheck: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
makeAutoSubs(id){
|
||||
Inertia.patch(route('users.settingsAutoSubs', id), {
|
||||
preserveScroll: true,
|
||||
preserveState: true,
|
||||
})
|
||||
},
|
||||
subsPlan(id) {
|
||||
Inertia.post(route('users.plan', id), {
|
||||
preserveScroll: true,
|
||||
preserveState: true,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
178
resources/js/Pages/Settings/SettingsVerification.vue
Executable file
178
resources/js/Pages/Settings/SettingsVerification.vue
Executable file
@@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<meta-head title="Верификация"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div class="mx-4 2xl:mx-28 my-8">
|
||||
<h2 class="text-xl lg:text-2xl xl:text-3xl text-white font-semibold">
|
||||
Верификация: паспорт
|
||||
</h2>
|
||||
<div>
|
||||
<div v-if="isPassportVerified">
|
||||
<div class="mt-5 text-green font-semibold text-lg">
|
||||
Аккаунт успешно верифицирован
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<form class="flex flex-col" @submit.prevent="submit">
|
||||
<file-input
|
||||
v-model="form.docs"
|
||||
accept="image/png, image/jpeg, image/jpg"
|
||||
:error="form.errors.docs"
|
||||
label="Скан 1ой страницы паспорта(.png,.jpg)"
|
||||
/>
|
||||
|
||||
<div class="mt-3 flex flex-wrap">
|
||||
<progress
|
||||
v-if="form.progress"
|
||||
class="mx-3 my-1 w-full"
|
||||
:value="form.progress.percentage"
|
||||
max="100"
|
||||
>
|
||||
{{ form.progress.percentage }}%
|
||||
</progress>
|
||||
|
||||
<loading-button :loading="form.processing" class=" transition shadow-none hover:shadow-classic2 inline-flex items-center px-8 py-1.5 justify-center text-base rounded-md text-white bg-orange focus:outline-none"
|
||||
type="submit"
|
||||
>
|
||||
Загрузить
|
||||
</loading-button>
|
||||
</div>
|
||||
</form>
|
||||
<div v-if="docUuid">
|
||||
<p class="mt-4 text-sm text-white">
|
||||
<a :href="route('users.get.document', {'uuid': docUuid}) " class="underline">
|
||||
<span>Ваш паспорт</span>
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-sm text-white">
|
||||
(Ожидайте верификацию, для замены загрузите скан заново)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <div class="my-5">
|
||||
<hr>
|
||||
</div> -->
|
||||
|
||||
<!-- <h2 class="text-xl lg:text-2xl xl:text-3xl text-white font-semibold">
|
||||
Верификация: телефон
|
||||
</h2>
|
||||
<div v-if="isPhoneVerify" class="mt-5 text-green font-semibold text-lg">
|
||||
Ваш номер успешно верифицирован!
|
||||
</div> -->
|
||||
<!-- <div v-else class="mt-2">
|
||||
<p class=" text-white text-lg">
|
||||
На номер телефона {{ phone }}, будет совершен звонок, нужно ввести 4-х значный код
|
||||
</p>
|
||||
<div v-if="isToken" class="mt-5">
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="token"
|
||||
type="text" class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
label="Введите код"
|
||||
/>
|
||||
<div>
|
||||
<button type="button"
|
||||
class="text-white bg-orange hover:shadow-classic2 mt-4 my-1 transition shadow-none inline-flex items-center px-8 py-2 justify-center text-base rounded-md"
|
||||
@click="sendVerifyCode"
|
||||
>
|
||||
Отправить
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button v-else type="button"
|
||||
class="text-white bg-pink hover:shadow-pink mt-5 my-1 transition shadow-none inline-flex items-center px-8 py-2 justify-center text-base rounded-md"
|
||||
@click="sendCode"
|
||||
>
|
||||
Отправить код
|
||||
</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TextInput from '@/Shared/Form/TextInput.vue'
|
||||
import { Inertia } from '@inertiajs/inertia'
|
||||
import { useForm, usePage } from '@inertiajs/inertia-vue3'
|
||||
import LoadingButton from '@/Shared/Form/LoadingButton.vue'
|
||||
import FileInput from '@/Shared/Form/FileInput.vue'
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
FileInput,
|
||||
LoadingButton,
|
||||
TextInput
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
docUuid: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
phone: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isToken: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isPhoneVerify: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isPassportVerified: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const form = useForm({
|
||||
docs: null,
|
||||
})
|
||||
const token = ref('')
|
||||
const submit = () => {
|
||||
if(!form.docs) return
|
||||
form.post(route('users.document'), {
|
||||
onSuccess: () => form.reset(),
|
||||
})
|
||||
}
|
||||
|
||||
const sendCode = () => {
|
||||
Inertia.post(route('users.phone.verify.request'))
|
||||
}
|
||||
const sendVerifyCode = () => {
|
||||
Inertia.post(route('users.phone.verify.token'), {
|
||||
token: token.value,
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
form,
|
||||
submit,
|
||||
sendCode,
|
||||
sendVerifyCode,
|
||||
token,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
90
resources/js/Pages/Settings/SettingsWriteToUs.vue
Executable file
90
resources/js/Pages/Settings/SettingsWriteToUs.vue
Executable file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<meta-head title="Написать нам"></meta-head>
|
||||
|
||||
<div class="xl:container xl:mx-auto px-2 md:px-3">
|
||||
<div class="mt-16 shadow-classic rounded-md bg-indigo-200">
|
||||
<div class="flex flex-col md:grid grid-cols-6 lg:grid-cols-5">
|
||||
<settings-menu />
|
||||
|
||||
<div class="col-span-4">
|
||||
<div class="mx-4 2xl:mx-28 my-8">
|
||||
<form class="flex flex-col gap-4" @submit.prevent="submit">
|
||||
<div class="flex flex-col">
|
||||
<text-input v-model="form.title" :error="form.errors.title"
|
||||
type="text" class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md placeholder-gray-light"
|
||||
label="Тема"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<textarea-input v-model="form.body" :error="form.errors.body"
|
||||
class="focus:ring-4 focus:ring-offset-1 focus:ring-orange focus:ring-opacity-20 focus:ring-offset-orange focus:border-transparent text-gray border border-indigo-300 bg-indigo-200 rounded-md" cols="30"
|
||||
rows="4" label="Сообщение"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<loading-button :loading="form.processing" class="my-1 transition shadow-none hover:shadow-classic2 inline-flex items-center px-8 py-3 justify-center text-base rounded-md text-white bg-orange focus:outline-none"
|
||||
type="submit"
|
||||
>
|
||||
Отправить
|
||||
</loading-button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- <div class="mt-10">
|
||||
<div class="flex flex-col text-white">
|
||||
<a href="/company/about" class="hover:underline">О компании</a>
|
||||
<a href="/company/offer" class="hover:underline">Оферта</a>
|
||||
<a href="/company/terms-payment" class="hover:underline">Условия оплаты</a>
|
||||
<a href="/company/terms-service" class="hover:underline">Условия предоставления услуг</a>
|
||||
<a href="/company/cookies" class="hover:underline">Cookies</a>
|
||||
<a href="/company/privacy-policy" class="hover:underline">Privacy Policy</a>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TextInput from '@/Shared/Form/TextInput.vue'
|
||||
import { Inertia } from '@inertiajs/inertia'
|
||||
import { useForm, usePage } from '@inertiajs/inertia-vue3'
|
||||
import LoadingButton from '@/Shared/Form/LoadingButton.vue'
|
||||
import Layout from '@/Shared/Layout.vue'
|
||||
import SettingsMenu from '@/Shared/LayoutParts/SettingsMenu.vue'
|
||||
import MetaHead from '@/Shared/MetaHead.vue'
|
||||
import TextareaInput from '@/Shared/Form/TextareaInput.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MetaHead,
|
||||
SettingsMenu,
|
||||
LoadingButton,
|
||||
TextInput,
|
||||
TextareaInput,
|
||||
},
|
||||
layout: Layout,
|
||||
props: {
|
||||
|
||||
},
|
||||
setup(props) {
|
||||
const form = useForm({
|
||||
title: null,
|
||||
body: null,
|
||||
})
|
||||
|
||||
const submit = () => {
|
||||
form.post(route('common.write-to-us'), {
|
||||
onSuccess: () => form.reset(),
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
form,
|
||||
submit
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user