@extends('layouts.app') @php $prefilledServiceId = (string) old('service_id', (string) request()->query('service_id', '')); $prefilledPlanId = (string) old('service_plan_id', (string) request()->query('service_plan_id', '')); $prefilledTitle = (string) old('title', (string) request()->query('title', '')); $prefilledTotalSlots = (string) old('total_slots', (string) request()->query('total_slots', '')); $prefilledAvailableSlots = (string) old('available_slots', (string) request()->query('available_slots', '')); $prefilledTotalPrice = (string) old('total_price', (string) request()->query('total_price', '')); $prefilledPricePerSlot = (string) old('price_per_slot', (string) request()->query('price_per_slot', '')); $selectedService = filled($prefilledServiceId) ? $services->firstWhere('id', (int) $prefilledServiceId) : null; if (! $selectedService && filled($prefilledPlanId)) { $selectedService = $services->first(fn ($service) => $service->plans->contains('id', (int) $prefilledPlanId)); } $selectedPlan = $selectedService?->plans->firstWhere('id', (int) $prefilledPlanId); $hasLockedSelection = filled($selectedService?->id) && filled($selectedPlan?->id); $servicesPayload = $services ->map(function ($service) { return [ 'id' => (int) $service->id, 'name' => (string) $service->name, 'category' => (string) ($service->category?->name ?? 'Other'), 'plans' => $service->plans ->map(fn ($plan) => [ 'id' => (int) $plan->id, 'name' => (string) $plan->name, 'price' => (float) $plan->price, 'currency' => (string) ($plan->currency ?: 'USD'), 'max_slots' => max((int) ($plan->max_slots ?? 1), 1), ]) ->values() ->all(), ]; }) ->values(); @endphp @push('style') @endpush @section('content')

Create Subscription Listing

Service, plan, title, aur package price admin setup se aate hain. Aap yahan sirf apni sharing listing complete karte ho.

@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if ($services->isEmpty())
No active services are available for creating a listing right now.
@elseif (! $hasLockedSelection)
Select a service and plan first.
Admin-defined service details yahan read-only show hote hain. Pehle service selection screen se apna subscription choose karein.
Choose Subscription
@else
@csrf
@error('service_id')
{{ $message }}
@enderror
@error('service_plan_id')
{{ $message }}
@enderror
@error('title')
{{ $message }}
@enderror
@error('total_slots')
{{ $message }}
@enderror
@error('available_slots')
{{ $message }}
@enderror
@error('total_price')
{{ $message }}
@enderror
@error('price_per_slot')
{{ $message }}
@enderror
Hidden by default. This subscription will stay private until you switch it to Displayed publicly from Manage subscription.
@error('starts_at')
{{ $message }}
@enderror
@error('ends_at')
{{ $message }}
@enderror
@error('notes')
{{ $message }}
@enderror
@if(auth()->user()->hasRole('super admin'))
@endif
Selected service: None Selected plan: None Plan price: - Suggested slots: -
Service, plan, listing title, package price, aur price per slot admin setup aur selected plan ke hisaab se locked hain. Aap sirf shareable slots aur extra listing details complete kar sakte ho.
Quick help

Admin-defined service data yahan automatically fill hota hai. Aapko bas apni listing ke shareable slots aur optional notes confirm karne hain.

Price logic

`Total package price` admin plan se aati hai. `Price per slot` us price ko aapke selected shareable slots par divide karke auto-calculate hota hai. Join time per connection admin fee `0.64` alag apply hogi.

After submit

Listing save hone ke baad `My Shared Subscriptions` mein nazar aayegi aur status pending review/draft ke sath store hogi.

Cancel
@endif
@endsection @push('script') @endpush