@extends('master')
@section('content')
@include('modals.conventions', [
'id' => 'conventionsEditContainer',
'title' => __('label.edit.convention'),
'refs' => [ // RELATED OBJECTS
'form' => 'conventionsEditForm' // CONTAINED FORM SEE ID ABOVE
],
'layout' => [
'edit' => true,
'target' => 'forms.conventions',
'data' => [
'id' => 'conventionsEdit', // INPUT ID BIND
'method' => config('const.crud.update'), // REQUIRED FORM METHOD
'table' => 'conventionsRecords', // RELATED TABLE ID
'resource' => 'conventions', // ! DB TABLE RESOURCE NAME (RESOURCE ID) !
'refs' => [ // RELATED OBJECTS
'modal' => 'conventionsEditContainerModal', // CONTAINER MODAL
'table' => 'conventionsRecordsTable' // RECORDS TABLE
],
],
]
])
@include('modals.convention-products', [
'id' => 'conventionProductsContainer',
'title' => __('label.convention.products'),
'refs' => [ // RELATED OBJECTS
'table' => 'conventionProductsRecordsTable', // CONTAINED TABLE
'base-table' => 'conventionsRecordsTable', // BASE RECORDS TABLE
],
'layout' => [
'target' => 'tables.convention-products',
'data' => [
'id' => 'conventionProductsRecords', // TABLE ID
'src' => 'convention.products.data', // DATA ROUTE NAME
'resource' => 'products', // ! DB TABLE RESOURCE NAME (RESOURCE ID) !
'data' => [],
'through' => true, // INDIRECT REDERENCE
'routes' => [
config('const.crud.delete') => Utils::indexRoute('convention.products.delete'),
],
'refs' => [ // RELATED OBJECTS
'table' => 'conventionsRecordsTable', // BASE RECORDS TABLE (FOR CONTEXT)
'modal' => 'conventionProductsContainerModal', // COMPONENT FORM
'new-product' => 'productsAddContainerModal', // NEW PAYMENT MODAL
],
],
]
])
@include('modals.convention-stores', [
'id' => 'conventionStoresContainer',
'title' => __('label.convention.stores'),
'refs' => [ // RELATED OBJECTS
'table' => 'conventionStoresRecordsTable', // CONTAINED TABLE
'base-table' => 'conventionsRecordsTable', // BASE RECORDS TABLE
],
'layout' => [
'target' => 'tables.convention-stores',
'data' => [
'id' => 'conventionStoresRecords', // TABLE ID
'src' => 'convention.stores.data', // DATA ROUTE NAME
'resource' => 'stores', // ! DB TABLE RESOURCE NAME (RESOURCE ID) !
'data' => [],
'through' => true, // INDIRECT REDERENCE
'routes' => [
config('const.crud.delete') => Utils::indexRoute('convention.stores.delete'),
],
'refs' => [ // RELATED OBJECTS
'table' => 'conventionsRecordsTable', // BASE RECORDS TABLE (FOR CONTEXT)
'modal' => 'conventionStoresContainerModal', // COMPONENT FORM
'new-store' => 'storesAddContainerModal', // NEW PAYMENT MODAL
],
],
]
])
@include('modals.stores', [
'id' => 'storesAddContainer',
'title' => __('label.add.store'),
'refs' => [ // RELATED OBJECTS
'form' => 'storesAddForm', // CONTAINED FORM SEE ID ABOVE
],
'layout' => [
'target' => 'forms.convention-stores',
'data' => [
'id' => 'storesAdd', // INPUT ID BIND
//'method' => config('const.crud.create'), // REQUIRED FORM METHOD
'table' => 'storesRecords', // RELATED TABLE ID
'resource' => 'stores', // ! DB TABLE RESOURCE NAME (RESOURCE ID) !
'routes' => [
config('const.crud.create') => Utils::indexRoute('convention.stores.store'),
],
'refs' => [ // RELATED OBJECTS
'modal' => 'storesAddContainerModal', // CONTAINER MODAL
'table' => 'conventionStoresRecordsTable', // RECORDS TABLE TO UPDATE
],
],
]
])
@include('modals.products', [
'id' => 'productsAddContainer',
'title' => __('label.add.product'),
'refs' => [ // RELATED OBJECTS
'form' => 'productsAddForm', // CONTAINED FORM SEE ID ABOVE
],
'layout' => [
'target' => 'forms.convention-products',
'data' => [
'id' => 'productsAdd', // INPUT ID BIND
//'method' => config('const.crud.create'), // REQUIRED FORM METHOD
'table' => 'productsRecords', // RELATED TABLE ID
'resource' => 'products', // ! DB TABLE RESOURCE NAME (RESOURCE ID) !
'routes' => [
config('const.crud.create') => Utils::indexRoute('convention.products.store'),
],
'refs' => [ // RELATED OBJECTS
'modal' => 'productsAddContainerModal', // CONTAINER MODAL
'table' => 'conventionProductsRecordsTable', // RECORDS TABLE TO UPDATE
],
],
]
])
@include('components.tabs', [
'active' => 0,
'tabs' => [
[
'title' => trans_choice('label.convention', 2),
'portlet' => [
'icon' => 'fa fa-bars',
'title' => __('label.records.convention'),
'reload' => true
],
'layout' => [
'target' => 'tables.conventions',
'data' => [
'id' => 'conventionsRecords', // TABLE ID
'edit' => 'conventionsEditContainer', // (ID) MODAL EDIT REF
'resource' => 'conventions', // ! DB TABLE RESOURCE NAME (RESOURCE ID) !
'method' => config('const.crud.delete'), // RESOURCE METHOD AVAILABLE
'data' => $conventions,
'refs' => [
'stores' => 'conventionStoresContainerModal',// ORDER PRODUCTS HANDLER
'products' => 'conventionProductsContainerModal',// ORDER PRODUCTS HANDLER
]
],
]
],
[
'title' => __('label.new.convention'),
'portlet' => [
'icon' => 'fa fa-bars',
'title' => __('label.content.convention'),
],
'layout' => [
'target' => 'forms.conventions',
'data' => [
'id' => 'conventionsInput', // FORM ID
'static' => '0', // NOT DINAMIC JUST ALWAYS INS
'resource' => 'conventions', // ! DB TABLE RESOURCE NAME (RESOURCE ID) !
'refs' => [ // RELATED OBJECTS
'table' => 'conventionsRecordsTable', // RECORDS TABLE
],
],
]
],
],
])
@stop