{{-- Ändra kampanjkod in Admin, Försäljning (admin.campaign-code.edit, CampaignCodeController@edit; DESIGN.md Page patterns 3; #2957 slice 14, card #3101). Same data as before: $campaignCode, $campaignData, $typeDropdown and $companies. The form (partials/fields, PUT admin.campaign-code.update) sits in a card with the referrers that use the code beside it; the companies using the code follow in the reskin company list (company/partials/nh-list), with the same company filter as before (it searches the company list, as the old one did). There is no delete (the controller answers 501). --}} @extends('layouts.nuhet') @section('_pageTitle', __('campaignCode.edit.pageTitle')) @section('page') @include('partials.nh-admin-back')

{{ __('campaignCode.edit.headerTitle') }}

{{ __('campaignCode.nh.editLead') }}

@csrf @method('PUT') @include('campaignCode.partials.fields') {{ __('campaignCode.form.save') }} {{ __('campaignCode.nh.cancel') }}
@include('campaignCode.partials.referrers', ['referrers' => $campaignCode->referrers()->orderBy('expire_at', 'DESC')->get()])

{{ __('campaignCode.edit.companyList') }}

@include('company.partials.nh-list', [ 'data' => $companies, 'paginate' => true, 'filter' => true, 'receiver_counts' => \App\Models\Receiver::select(\DB::raw('count(id) as total, company_id'))->countsTowardLimit()->groupBy('company_id')->get(), ])
@endsection