mirror of
https://github.com/snipe/snipe-it.git
synced 2026-03-11 02:49:18 +00:00
Most of the basics are working, but not done and lots of debug messages are about
I picked up the change that picked a point-release difference on the AWS library since that usually works out for us (x.y.1 vs. x.y.2 - usually a good call)
This commit is contained in:
@ -19,6 +19,7 @@ class CustomFieldSetDefaultValuesForModel extends Component
|
||||
public function __construct()
|
||||
{
|
||||
\Log::info("INSTANTIATING A THING!!!"); // WORKS!
|
||||
\Log::info("MY COMPONENT ID IS: ".$this->id);
|
||||
}
|
||||
|
||||
public function foo()
|
||||
@ -28,14 +29,29 @@ class CustomFieldSetDefaultValuesForModel extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->fieldset_id = AssetModel::find($this->model_id)->fieldset_id;
|
||||
$this->model = AssetModel::find($this->model_id); // It's possible to do some clever route-model binding here, but let's keep it simple, shall we?
|
||||
$this->fieldset_id = $this->model->fieldset_id;
|
||||
$this->fields = CustomFieldset::find($this->fieldset_id)->fields;
|
||||
$this->add_default_values = ( $this->model->defaultValues->count() > 0);
|
||||
\Log::error("Model ID is: ".$this->model_id." And its fieldset is: ".$this->fieldset_id);
|
||||
\Log::error("Mount at least fired, that's got to count for something, yeah?"); //WORKS! YAY!
|
||||
|
||||
}
|
||||
|
||||
public function updatingFielsetId()
|
||||
{
|
||||
\Log::error("ABOUT TO UPDATE FIELDSET ID!!!");
|
||||
}
|
||||
|
||||
public function updatedFieldsetId()
|
||||
{
|
||||
\Log::error("UPDATED FIELDSET ID!!!!!!");
|
||||
$this->fields = CustomFieldset::find($this->fieldset_id)->fields;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
// return 'fart<div>Hi: {{ $this->add_default_values }} yeah?</div>';
|
||||
//return '<div>Hi: {{ $this->add_default_values ? "TRUTH" : "FALSEHOOD" }} yeah?</div>';
|
||||
return view('livewire.custom-field-set-default-values-for-model');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user