mirror of
https://github.com/Karaka-Management/oms-ItemManagement.git
synced 2026-02-15 03:38:40 +00:00
crash backup
This commit is contained in:
parent
1849854ff1
commit
c1388b7fe1
|
|
@ -243,7 +243,7 @@ final class ApiAttributeController extends Controller
|
||||||
->with('type')
|
->with('type')
|
||||||
->with('type/defaults')
|
->with('type/defaults')
|
||||||
->with('value')
|
->with('value')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', $request->getDataInt('id') ?? 0)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$new = $this->updateAttributeFromRequest($request, clone $old);
|
$new = $this->updateAttributeFromRequest($request, clone $old);
|
||||||
|
|
@ -291,7 +291,7 @@ final class ApiAttributeController extends Controller
|
||||||
|
|
||||||
$itemAttribute = ItemAttributeMapper::get()
|
$itemAttribute = ItemAttributeMapper::get()
|
||||||
->with('type')
|
->with('type')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', $request->getDataInt('id') ?? 0)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
if ($itemAttribute->type->isRequired) {
|
if ($itemAttribute->type->isRequired) {
|
||||||
|
|
@ -327,7 +327,7 @@ final class ApiAttributeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var BaseStringL11n $old */
|
/** @var BaseStringL11n $old */
|
||||||
$old = ItemAttributeTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
$old = ItemAttributeTypeL11nMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute();
|
||||||
$new = $this->updateAttributeTypeL11nFromRequest($request, clone $old);
|
$new = $this->updateAttributeTypeL11nFromRequest($request, clone $old);
|
||||||
|
|
||||||
$this->updateModel($request->header->account, $old, $new, ItemAttributeTypeL11nMapper::class, 'item_attribute_type_l11n', $request->getOrigin());
|
$this->updateModel($request->header->account, $old, $new, ItemAttributeTypeL11nMapper::class, 'item_attribute_type_l11n', $request->getOrigin());
|
||||||
|
|
@ -357,7 +357,7 @@ final class ApiAttributeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var BaseStringL11n $itemAttributeTypeL11n */
|
/** @var BaseStringL11n $itemAttributeTypeL11n */
|
||||||
$itemAttributeTypeL11n = ItemAttributeTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
$itemAttributeTypeL11n = ItemAttributeTypeL11nMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute();
|
||||||
$this->deleteModel($request->header->account, $itemAttributeTypeL11n, ItemAttributeTypeL11nMapper::class, 'item_attribute_type_l11n', $request->getOrigin());
|
$this->deleteModel($request->header->account, $itemAttributeTypeL11n, ItemAttributeTypeL11nMapper::class, 'item_attribute_type_l11n', $request->getOrigin());
|
||||||
$this->createStandardDeleteResponse($request, $response, $itemAttributeTypeL11n);
|
$this->createStandardDeleteResponse($request, $response, $itemAttributeTypeL11n);
|
||||||
}
|
}
|
||||||
|
|
@ -385,7 +385,7 @@ final class ApiAttributeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var AttributeType $old */
|
/** @var AttributeType $old */
|
||||||
$old = ItemAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('id'))->execute();
|
$old = ItemAttributeTypeMapper::get()->with('defaults')->where('id', $request->getDataInt('id') ?? 0)->execute();
|
||||||
$new = $this->updateAttributeTypeFromRequest($request, clone $old);
|
$new = $this->updateAttributeTypeFromRequest($request, clone $old);
|
||||||
|
|
||||||
$this->updateModel($request->header->account, $old, $new, ItemAttributeTypeMapper::class, 'item_attribute_type', $request->getOrigin());
|
$this->updateModel($request->header->account, $old, $new, ItemAttributeTypeMapper::class, 'item_attribute_type', $request->getOrigin());
|
||||||
|
|
@ -417,7 +417,7 @@ final class ApiAttributeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var AttributeType $itemAttributeType */
|
/** @var AttributeType $itemAttributeType */
|
||||||
$itemAttributeType = ItemAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('id'))->execute();
|
$itemAttributeType = ItemAttributeTypeMapper::get()->with('defaults')->where('id', $request->getDataInt('id') ?? 0)->execute();
|
||||||
$this->deleteModel($request->header->account, $itemAttributeType, ItemAttributeTypeMapper::class, 'item_attribute_type', $request->getOrigin());
|
$this->deleteModel($request->header->account, $itemAttributeType, ItemAttributeTypeMapper::class, 'item_attribute_type', $request->getOrigin());
|
||||||
$this->createStandardDeleteResponse($request, $response, $itemAttributeType);
|
$this->createStandardDeleteResponse($request, $response, $itemAttributeType);
|
||||||
}
|
}
|
||||||
|
|
@ -445,7 +445,7 @@ final class ApiAttributeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var AttributeValue $old */
|
/** @var AttributeValue $old */
|
||||||
$old = ItemAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
$old = ItemAttributeValueMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute();
|
||||||
|
|
||||||
/** @var \Modules\Attribute\Models\Attribute $attr */
|
/** @var \Modules\Attribute\Models\Attribute $attr */
|
||||||
$attr = ItemAttributeMapper::get()
|
$attr = ItemAttributeMapper::get()
|
||||||
|
|
@ -485,7 +485,7 @@ final class ApiAttributeController extends Controller
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// /** @var \Modules\ItemManagement\Models\ItemAttributeValue $itemAttributeValue */
|
// /** @var \Modules\ItemManagement\Models\ItemAttributeValue $itemAttributeValue */
|
||||||
// $itemAttributeValue = ItemAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
// $itemAttributeValue = ItemAttributeValueMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute();
|
||||||
// $this->deleteModel($request->header->account, $itemAttributeValue, ItemAttributeValueMapper::class, 'item_attribute_value', $request->getOrigin());
|
// $this->deleteModel($request->header->account, $itemAttributeValue, ItemAttributeValueMapper::class, 'item_attribute_value', $request->getOrigin());
|
||||||
// $this->createStandardDeleteResponse($request, $response, $itemAttributeValue);
|
// $this->createStandardDeleteResponse($request, $response, $itemAttributeValue);
|
||||||
}
|
}
|
||||||
|
|
@ -513,7 +513,7 @@ final class ApiAttributeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var BaseStringL11n $old */
|
/** @var BaseStringL11n $old */
|
||||||
$old = ItemAttributeValueL11nMapper::get()->where('id', (int) $request->getData('id'));
|
$old = ItemAttributeValueL11nMapper::get()->where('id', $request->getDataInt('id') ?? 0);
|
||||||
$new = $this->updateAttributeValueL11nFromRequest($request, clone $old);
|
$new = $this->updateAttributeValueL11nFromRequest($request, clone $old);
|
||||||
|
|
||||||
$this->updateModel($request->header->account, $old, $new, ItemAttributeValueL11nMapper::class, 'item_attribute_value_l11n', $request->getOrigin());
|
$this->updateModel($request->header->account, $old, $new, ItemAttributeValueL11nMapper::class, 'item_attribute_value_l11n', $request->getOrigin());
|
||||||
|
|
@ -543,7 +543,7 @@ final class ApiAttributeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var BaseStringL11n $itemAttributeValueL11n */
|
/** @var BaseStringL11n $itemAttributeValueL11n */
|
||||||
$itemAttributeValueL11n = ItemAttributeValueL11nMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
$itemAttributeValueL11n = ItemAttributeValueL11nMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute();
|
||||||
$this->deleteModel($request->header->account, $itemAttributeValueL11n, ItemAttributeValueL11nMapper::class, 'item_attribute_value_l11n', $request->getOrigin());
|
$this->deleteModel($request->header->account, $itemAttributeValueL11n, ItemAttributeValueL11nMapper::class, 'item_attribute_value_l11n', $request->getOrigin());
|
||||||
$this->createStandardDeleteResponse($request, $response, $itemAttributeValueL11n);
|
$this->createStandardDeleteResponse($request, $response, $itemAttributeValueL11n);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -580,7 +580,7 @@ final class ApiController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$old = ItemL11nMapper::get()
|
$old = ItemL11nMapper::get()
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', $request->getDataInt('id') ?? 0)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$new = $this->updateItemL11nFromRequest($request, clone $old);
|
$new = $this->updateItemL11nFromRequest($request, clone $old);
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ final class BackendController extends Controller
|
||||||
->with('l11n')
|
->with('l11n')
|
||||||
->with('defaults')
|
->with('defaults')
|
||||||
->with('defaults/l11n')
|
->with('defaults/l11n')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', $request->getDataInt('id') ?? 0)
|
||||||
->where('l11n/language', $response->header->l11n->language)
|
->where('l11n/language', $response->header->l11n->language)
|
||||||
->where('defaults/l11n/language', [$response->header->l11n->language, null])
|
->where('defaults/l11n/language', [$response->header->l11n->language, null])
|
||||||
->execute();
|
->execute();
|
||||||
|
|
@ -142,7 +142,7 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->attribute = ItemAttributeValueMapper::get()
|
$view->attribute = ItemAttributeValueMapper::get()
|
||||||
->with('l11n')
|
->with('l11n')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', $request->getDataInt('id') ?? 0)
|
||||||
->where('l11n/language', [$response->header->l11n->language, null])
|
->where('l11n/language', [$response->header->l11n->language, null])
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
|
|
@ -438,7 +438,7 @@ final class BackendController extends Controller
|
||||||
->with('attributes/type/l11n')
|
->with('attributes/type/l11n')
|
||||||
->with('attributes/value')
|
->with('attributes/value')
|
||||||
->with('attributes/value/l11n')
|
->with('attributes/value/l11n')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', $request->getDataInt('id') ?? 0)
|
||||||
->where('l11n/language', $response->header->l11n->language)
|
->where('l11n/language', $response->header->l11n->language)
|
||||||
->where('l11n/type/title', ['name1', 'name2'], 'IN')
|
->where('l11n/type/title', ['name1', 'name2'], 'IN')
|
||||||
->where('attributes/type/l11n/language', $response->header->l11n->language)
|
->where('attributes/type/l11n/language', $response->header->l11n->language)
|
||||||
|
|
@ -863,7 +863,7 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->data['type'] = MaterialTypeMapper::get()
|
$view->data['type'] = MaterialTypeMapper::get()
|
||||||
->with('l11n')
|
->with('l11n')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', $request->getDataInt('id') ?? 0)
|
||||||
->where('l11n/language', $response->header->l11n->language)
|
->where('l11n/language', $response->header->l11n->language)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ $item = $this->data['item'] ?? new NullItem();
|
||||||
$isNew = $item->id === 0;
|
$isNew = $item->id === 0;
|
||||||
|
|
||||||
$logs = $this->data['logs'] ?? [];
|
$logs = $this->data['logs'] ?? [];
|
||||||
$itemImage = $this->getData('itemImage') ?? new NullMedia();
|
$itemImage = $this->data['itemImage'] ?? new NullMedia();
|
||||||
|
|
||||||
$allInvoices = $this->data['allInvoices'] ?? [];
|
$allInvoices = $this->data['allInvoices'] ?? [];
|
||||||
$topCustomers = $this->getData('topCustomers') ?? [[], []];
|
$topCustomers = $this->data['topCustomers'] ?? [[], []];
|
||||||
|
|
||||||
$languages = ISO639Enum::getConstants();
|
$languages = ISO639Enum::getConstants();
|
||||||
$regions = RegionEnum::getConstants();
|
$regions = RegionEnum::getConstants();
|
||||||
|
|
@ -145,7 +145,7 @@ echo $this->data['nav']->render();
|
||||||
|
|
||||||
<section class="portlet hl-4">
|
<section class="portlet hl-4">
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<textarea class="undecorated"></textarea>
|
<textarea class="undecorated" aria-label="Info"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
@ -684,7 +684,7 @@ echo $this->data['nav']->render();
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<input id="iPriceId" class="vh" name="id" type="number" data-tpl-text="/id" data-tpl-value="/id">
|
<input id="iPriceId" class="vh" name="id" type="number" data-tpl-text="/id" data-tpl-value="/id">
|
||||||
<input id="iPriceItemId" class="vh" name="item" type="text" value="<?= $item->id; ?>">
|
<input id="iPriceItemId" class="vh" name="item" type="text" value="<?= $item->id; ?>">
|
||||||
<input id="iPriceItemType" class="vh" name="type" type="text" value="<?= PriceType::SALES; ?>">
|
<input id="iPriceType" class="vh" name="type" type="text" value="<?= PriceType::SALES; ?>">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iPriceName"><?= $this->getHtml('Name'); ?></label>
|
<label for="iPriceName"><?= $this->getHtml('Name'); ?></label>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user