Compare commits
2 Commits
main
...
developmen
Author | SHA1 | Date | |
---|---|---|---|
d7ba1d1077 | |||
c05b4aa575 |
@ -219,11 +219,11 @@ public static function form(Form $form): Form
|
|||||||
->label('Product Services')
|
->label('Product Services')
|
||||||
->addActionLabel('Add new product service')
|
->addActionLabel('Add new product service')
|
||||||
->schema([
|
->schema([
|
||||||
Grid::make(19)
|
Grid::make(9)
|
||||||
->schema([
|
->schema([
|
||||||
Select::make('serviceType')
|
Select::make('serviceType')
|
||||||
|
->columnSpan(2)
|
||||||
->options(ServiceType::all()->pluck('value', 'id'))
|
->options(ServiceType::all()->pluck('value', 'id'))
|
||||||
->columnSpan(4)
|
|
||||||
->placeholder('Select...')
|
->placeholder('Select...')
|
||||||
->searchable()
|
->searchable()
|
||||||
->createOptionForm([
|
->createOptionForm([
|
||||||
@ -239,17 +239,15 @@ public static function form(Form $form): Form
|
|||||||
->createOptionUsing(function (array $data): int {
|
->createOptionUsing(function (array $data): int {
|
||||||
return ServiceType::create($data)->getKey();
|
return ServiceType::create($data)->getKey();
|
||||||
}),
|
}),
|
||||||
|
|
||||||
TextInput::make('serviceFileName')
|
TextInput::make('serviceFileName')
|
||||||
|
->columnSpan(2)
|
||||||
->datalist(ServiceFile::all()->unique('name')->pluck('name')->toArray())
|
->datalist(ServiceFile::all()->unique('name')->pluck('name')->toArray())
|
||||||
->columnSpan(3)
|
|
||||||
->label('Logo Name'),
|
->label('Logo Name'),
|
||||||
|
|
||||||
TextInput::make('placement')
|
TextInput::make('placement')
|
||||||
->datalist(ProductService::all()->unique('placement')->pluck('placement')->toArray())
|
->columnSpan(2)
|
||||||
->columnSpan(3),
|
->datalist(ProductService::all()->unique('placement')->pluck('placement')->toArray()),
|
||||||
TextInput::make('serviceFileSetupNumber')
|
|
||||||
->label('Setup')
|
|
||||||
->columnSpan(1)
|
|
||||||
->rules('numeric'),
|
|
||||||
|
|
||||||
Cluster::make([
|
Cluster::make([
|
||||||
TextInput::make('serviceFileWidth')
|
TextInput::make('serviceFileWidth')
|
||||||
@ -260,43 +258,47 @@ public static function form(Form $form): Form
|
|||||||
->rules('numeric'),
|
->rules('numeric'),
|
||||||
])
|
])
|
||||||
->label('Dimensions')
|
->label('Dimensions')
|
||||||
->columnSpan(4),
|
->columnSpan(2),
|
||||||
|
|
||||||
TextInput::make('amount')
|
|
||||||
->label('Quantity')
|
|
||||||
->prefix('#')
|
|
||||||
->columnSpan(2)
|
|
||||||
->rules('numeric'),
|
|
||||||
|
|
||||||
TextInput::make('amount_price')
|
|
||||||
->label('Unit price')
|
|
||||||
->prefix('$')
|
|
||||||
->columnSpan(2)
|
|
||||||
->rules('numeric'),
|
|
||||||
]),
|
|
||||||
|
|
||||||
Grid::make(19)
|
|
||||||
->schema([
|
|
||||||
TextInput::make('serviceFileCode')
|
|
||||||
->label('Code')
|
|
||||||
->datalist(ServiceFile::all()->unique('code')->pluck('code')->toArray())
|
|
||||||
->columnSpan(2)
|
|
||||||
->placeholder('A1234'),
|
|
||||||
|
|
||||||
Select::make('serviceFileSizeUnit')
|
Select::make('serviceFileSizeUnit')
|
||||||
->columnSpan(2)
|
->columnSpan(1)
|
||||||
->selectablePlaceholder(false)
|
->selectablePlaceholder(false)
|
||||||
->label('Unit')
|
->label('Unit')
|
||||||
->options([
|
->options([
|
||||||
'in' => 'Inches',
|
'in' => 'Inches',
|
||||||
'cm' => 'cm',
|
'cm' => 'cm',
|
||||||
]),
|
]),
|
||||||
|
]),
|
||||||
|
|
||||||
|
Grid::make(9)
|
||||||
|
->schema([
|
||||||
|
TextInput::make('serviceFileCode')
|
||||||
|
->columnSpan(1)
|
||||||
|
->label('Code')
|
||||||
|
->datalist(ServiceFile::all()->unique('code')->pluck('code')->toArray()),
|
||||||
|
|
||||||
|
TextInput::make('serviceFileSetupNumber')
|
||||||
|
->columnSpan(1)
|
||||||
|
->label('Setup Number')
|
||||||
|
->rules('numeric'),
|
||||||
|
|
||||||
|
TextInput::make('amount')
|
||||||
|
->columnSpan(1)
|
||||||
|
->label('Quantity')
|
||||||
|
->prefix('#')
|
||||||
|
->rules('numeric'),
|
||||||
|
|
||||||
|
TextInput::make('amount_price')
|
||||||
|
->columnSpan(1)
|
||||||
|
->label('Unit price')
|
||||||
|
->prefix('$')
|
||||||
|
->rules('numeric'),
|
||||||
|
|
||||||
Textarea::make('notes')
|
Textarea::make('notes')
|
||||||
->placeholder('Thread colors... (press enter for new line)')
|
->columnSpan(5)
|
||||||
|
->placeholder('Thread colors (press enter for new line)')
|
||||||
->autosize()
|
->autosize()
|
||||||
->rows(1)
|
->rows(1),
|
||||||
->columnSpan(15),
|
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
->reorderable()
|
->reorderable()
|
||||||
|
@ -200,6 +200,7 @@ protected function getHeaderActions(): array
|
|||||||
foreach ($this->record->productServices as $service) {
|
foreach ($this->record->productServices as $service) {
|
||||||
/** @var ServiceFile $newServiceFile */
|
/** @var ServiceFile $newServiceFile */
|
||||||
$newServiceFile = $service->serviceFile->replicate();
|
$newServiceFile = $service->serviceFile->replicate();
|
||||||
|
$newServiceFile->save();
|
||||||
|
|
||||||
$newService = $service->replicate();
|
$newService = $service->replicate();
|
||||||
$newService->order_id = $replica->id;
|
$newService->order_id = $replica->id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user