@extends('companyuser::layouts.master') @section('title', __('products::cost_center.Edit cost center')) @section('extra-styles') @endsection @section('breadcrumb') @endsection @section('content')
@csrf @method('PUT')
@include('companyuser::errors.lists')
( @lang('optional') )
@error('parent_id')

{{ $message }}

@enderror
@error('code')

{{ $message }}

@enderror
@error('name_ar')

{{ $message }}

@enderror
{{-- ( @lang('optional') ) --}}
@error('name_en')

{{ $message }}

@enderror
( @lang('optional') )
@error('physical_address')

{{ $message }}

@enderror
@if( $customFields->count() ) {{-- this to handle the case when user create item when there is no custom fields then add custom fields from setting then open the edit page this means get the custom fields in bill , if it is empty it means there wasn't customfields so get the noraml custom fields that came from settings ---------- My brother/sister, I don't know who you are but i wanna thank your from the deepest part of my heart about this comment, may you live long to see the day when you will be able to code without any issues or problems Amen. Love, @faniabdo99 --}} @php $customFields = json_decode($editedCostCenter->custom_fields, true) ?? $customFields @endphp
@foreach($customFields as $key=>$field)
@if($field['type']=='checkbox') @else @endif
@endforeach
@endif
@include('sales::includes.redirect_popup')
@endsection @section('extra_scripts') @endsection