mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-12 16:44:08 -08:00
WIP: trying to upgrade to Livewire v3? Alpine is still broken :/
This commit is contained in:
parent
427f8b1522
commit
a3d819d1b2
|
@ -1,67 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class CategoryEditForm extends Component
|
||||
{
|
||||
public $defaultEulaText;
|
||||
|
||||
public $eulaText;
|
||||
|
||||
public $originalSendCheckInEmailValue;
|
||||
|
||||
public $requireAcceptance;
|
||||
|
||||
public $sendCheckInEmail;
|
||||
|
||||
public $useDefaultEula;
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->originalSendCheckInEmailValue = $this->sendCheckInEmail;
|
||||
|
||||
if ($this->eulaText || $this->useDefaultEula) {
|
||||
$this->sendCheckInEmail = 1;
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.category-edit-form');
|
||||
}
|
||||
|
||||
public function updated($property, $value)
|
||||
{
|
||||
if (! in_array($property, ['eulaText', 'useDefaultEula'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->sendCheckInEmail = $this->eulaText || $this->useDefaultEula ? 1 : $this->originalSendCheckInEmailValue;
|
||||
}
|
||||
|
||||
public function getShouldDisplayEmailMessageProperty(): bool
|
||||
{
|
||||
return $this->eulaText || $this->useDefaultEula;
|
||||
}
|
||||
|
||||
public function getEmailMessageProperty(): string
|
||||
{
|
||||
if ($this->useDefaultEula) {
|
||||
return trans('admin/categories/general.email_will_be_sent_due_to_global_eula');
|
||||
}
|
||||
|
||||
return trans('admin/categories/general.email_will_be_sent_due_to_category_eula');
|
||||
}
|
||||
|
||||
public function getEulaTextDisabledProperty()
|
||||
{
|
||||
return (bool)$this->useDefaultEula;
|
||||
}
|
||||
|
||||
public function getSendCheckInEmailDisabledProperty()
|
||||
{
|
||||
return $this->eulaText || $this->useDefaultEula;
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
use App\Models\CustomFieldset;
|
||||
use App\Models\AssetModel;
|
||||
|
||||
class CustomFieldSetDefaultValuesForModel extends Component
|
||||
{
|
||||
public $add_default_values;
|
||||
|
||||
public $fieldset_id;
|
||||
public $fields;
|
||||
public $model_id;
|
||||
|
||||
public function mount()
|
||||
{
|
||||
if(is_null($this->model_id)){
|
||||
return;
|
||||
}
|
||||
|
||||
$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 = null;
|
||||
|
||||
if ($fieldset = CustomFieldset::find($this->fieldset_id)) {
|
||||
$this->fields = CustomFieldset::find($this->fieldset_id)->fields;
|
||||
}
|
||||
|
||||
$this->add_default_values = ($this->model->defaultValues->count() > 0);
|
||||
}
|
||||
|
||||
public function updatedFieldsetId()
|
||||
{
|
||||
if (CustomFieldset::find($this->fieldset_id)) {
|
||||
$this->fields = CustomFieldset::find($this->fieldset_id)->fields;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.custom-field-set-default-values-for-model');
|
||||
}
|
||||
}
|
|
@ -1,530 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\CustomField;
|
||||
use Livewire\Component;
|
||||
|
||||
use App\Models\Import;
|
||||
use Storage;
|
||||
|
||||
use Log;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
|
||||
|
||||
class Importer extends Component
|
||||
{
|
||||
use AuthorizesRequests;
|
||||
|
||||
public $files;
|
||||
|
||||
public $progress; //upload progress - '-1' means don't show
|
||||
public $progress_message;
|
||||
public $progress_bar_class;
|
||||
|
||||
public $message; //status/error message?
|
||||
public $message_type; //success/error?
|
||||
|
||||
//originally from ImporterFile
|
||||
public $import_errors; //
|
||||
public ?Import $activeFile = null;
|
||||
public $importTypes;
|
||||
public $columnOptions;
|
||||
public $statusType;
|
||||
public $statusText;
|
||||
public $update;
|
||||
public $send_welcome;
|
||||
public $run_backup;
|
||||
public $field_map; // we need a separate variable for the field-mapping, because the keys in the normal array are too complicated for Livewire to understand
|
||||
public $file_id; // TODO: I can't figure out *why* we need this, but it really seems like we do. I can't seem to pull the id from the activeFile for some reason?
|
||||
|
||||
// Make these variables public - we set the properties in the constructor so we can localize them (versus the old static arrays)
|
||||
public $accessories_fields;
|
||||
public $assets_fields;
|
||||
public $users_fields;
|
||||
public $licenses_fields;
|
||||
public $locations_fields;
|
||||
public $consumables_fields;
|
||||
public $components_fields;
|
||||
public $aliases_fields;
|
||||
|
||||
protected $rules = [
|
||||
'files.*.file_path' => 'required|string',
|
||||
'files.*.created_at' => 'required|string',
|
||||
'files.*.filesize' => 'required|integer',
|
||||
'activeFile' => 'Import',
|
||||
'activeFile.import_type' => 'string',
|
||||
'activeFile.field_map' => 'array',
|
||||
'activeFile.header_row' => 'array',
|
||||
'field_map' => 'array'
|
||||
];
|
||||
|
||||
public function generate_field_map()
|
||||
{
|
||||
\Log::debug("header row is: ".print_r($this->activeFile->header_row,true));
|
||||
\Log::debug("Field map is: ".print_r($this->field_map,true));
|
||||
$tmp = array_combine($this->activeFile->header_row, $this->field_map);
|
||||
return json_encode(array_filter($tmp));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function getColumns($type)
|
||||
{
|
||||
switch ($type) {
|
||||
case 'asset':
|
||||
$results = $this->assets_fields;
|
||||
break;
|
||||
case 'accessory':
|
||||
$results = $this->accessories_fields;
|
||||
break;
|
||||
case 'consumable':
|
||||
$results = $this->consumables_fields;
|
||||
break;
|
||||
case 'component':
|
||||
$results = $this->components_fields;
|
||||
break;
|
||||
case 'license':
|
||||
$results = $this->licenses_fields;
|
||||
break;
|
||||
case 'user':
|
||||
$results = $this->users_fields;
|
||||
break;
|
||||
case 'location':
|
||||
$results = $this->locations_fields;
|
||||
break;
|
||||
default:
|
||||
$results = [];
|
||||
}
|
||||
asort($results, SORT_FLAG_CASE | SORT_STRING);
|
||||
if ($type == "asset") {
|
||||
// add Custom Fields after a horizontal line
|
||||
$results['-'] = "———" . trans('admin/custom_fields/general.custom_fields') . "———’";
|
||||
foreach (CustomField::orderBy('name')->get() as $field) {
|
||||
$results[$field->db_column_name()] = $field->name;
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function updating($name, $new_import_type)
|
||||
{
|
||||
if ($name == "activeFile.import_type") {
|
||||
\Log::debug("WE ARE CHANGING THE import_type!!!!! TO: " . $new_import_type);
|
||||
\Log::debug("so, what's \$this->>field_map at?: " . print_r($this->field_map, true));
|
||||
// go through each header, find a matching field to try and map it to.
|
||||
foreach ($this->activeFile->header_row as $i => $header) {
|
||||
// do we have something mapped already?
|
||||
if (array_key_exists($i, $this->field_map)) {
|
||||
// yes, we do. Is it valid for this type of import?
|
||||
// (e.g. the import type might have been changed...?)
|
||||
if (array_key_exists($this->field_map[$i], $this->columnOptions[$new_import_type])) {
|
||||
//yes, this key *is* valid. Continue on to the next field.
|
||||
continue;
|
||||
} else {
|
||||
//no, this key is *INVALID* for this import type. Better set it to null
|
||||
// and we'll hope that the $aliases_fields or something else picks it up.
|
||||
$this->field_map[$i] = null; // fingers crossed! But it's not likely, tbh.
|
||||
} // TODO - strictly speaking, this isn't necessary here I don't think.
|
||||
}
|
||||
// first, check for exact matches
|
||||
foreach ($this->columnOptions[$new_import_type] as $value => $text) {
|
||||
if (strcasecmp($text, $header) === 0) { // case-INSENSITIVe on purpose!
|
||||
$this->field_map[$i] = $value;
|
||||
continue 2; //don't bother with the alias check, go to the next header
|
||||
}
|
||||
}
|
||||
// if you got here, we didn't find a match. Try the $aliases_fields
|
||||
foreach ($this->aliases_fields as $key => $alias_values) {
|
||||
foreach ($alias_values as $alias_value) {
|
||||
if (strcasecmp($alias_value, $header) === 0) { // aLsO CaSe-INSENSitiVE!
|
||||
// Make *absolutely* sure that this key actually _exists_ in this import type -
|
||||
// you can trigger this by importing accessories with a 'Warranty' column (which don't exist
|
||||
// in "Accessories"!)
|
||||
if (array_key_exists($key, $this->columnOptions[$new_import_type])) {
|
||||
$this->field_map[$i] = $key;
|
||||
continue 3; // bust out of both of these loops; as well as the surrounding one - e.g. move on to the next header
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// and if you got here, we got nothing. Let's recommend 'null'
|
||||
$this->field_map[$i] = null; // Booooo :(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function boot() { // FIXME - delete or undelete.
|
||||
///////$this->activeFile = null; // I do *not* understand why I have to do this, but, well, whatever.
|
||||
}
|
||||
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->authorize('import');
|
||||
$this->progress = -1; // '-1' means 'don't show the progressbar'
|
||||
$this->progress_bar_class = 'progress-bar-warning';
|
||||
$this->importTypes = [
|
||||
'asset' => trans('general.assets'),
|
||||
'accessory' => trans('general.accessories'),
|
||||
'consumable' => trans('general.consumables'),
|
||||
'component' => trans('general.components'),
|
||||
'license' => trans('general.licenses'),
|
||||
'user' => trans('general.users'),
|
||||
'location' => trans('general.locations'),
|
||||
];
|
||||
|
||||
/**
|
||||
* These are the item-type specific columns
|
||||
*/
|
||||
$this->accessories_fields = [
|
||||
'company' => trans('general.company'),
|
||||
'location' => trans('general.location'),
|
||||
'quantity' => trans('general.qty'),
|
||||
'item_name' => trans('general.item_name_var', ['item' => trans('general.accessory')]),
|
||||
'model_number' => trans('general.model_no'),
|
||||
'notes' => trans('general.notes'),
|
||||
'category' => trans('general.category'),
|
||||
'supplier' => trans('general.supplier'),
|
||||
'min_amt' => trans('mail.min_QTY'),
|
||||
'purchase_cost' => trans('general.purchase_cost'),
|
||||
'purchase_date' => trans('general.purchase_date'),
|
||||
'manufacturer' => trans('general.manufacturer'),
|
||||
'order_number' => trans('general.order_number'),
|
||||
];
|
||||
|
||||
$this->assets_fields = [
|
||||
'company' => trans('general.company'),
|
||||
'location' => trans('general.location'),
|
||||
'item_name' => trans('general.item_name_var', ['item' => trans('general.asset')]),
|
||||
'asset_tag' => trans('general.asset_tag'),
|
||||
'asset_model' => trans('general.model_name'),
|
||||
'byod' => trans('general.byod'),
|
||||
'model_number' => trans('general.model_no'),
|
||||
'status' => trans('general.status'),
|
||||
'warranty_months' => trans('admin/hardware/form.warranty'),
|
||||
'category' => trans('general.category'),
|
||||
'requestable' => trans('admin/hardware/general.requestable'),
|
||||
'serial' => trans('general.serial_number'),
|
||||
'supplier' => trans('general.supplier'),
|
||||
'purchase_cost' => trans('general.purchase_cost'),
|
||||
'purchase_date' => trans('general.purchase_date'),
|
||||
'purchase_order' => trans('admin/licenses/form.purchase_order'),
|
||||
'asset_notes' => trans('general.item_notes', ['item' => trans('admin/hardware/general.asset')]),
|
||||
'model_notes' => trans('general.item_notes', ['item' => trans('admin/hardware/form.model')]),
|
||||
'manufacturer' => trans('general.manufacturer'),
|
||||
'order_number' => trans('general.order_number'),
|
||||
'image' => trans('general.importer.image_filename'),
|
||||
'asset_eol_date' => trans('admin/hardware/form.eol_date'),
|
||||
/**
|
||||
* Checkout fields:
|
||||
* Assets can be checked out to other assets, people, or locations, but we currently
|
||||
* only support checkout to people and locations in the importer
|
||||
**/
|
||||
'checkout_class' => trans('general.importer.checkout_type'),
|
||||
'first_name' => trans('general.importer.checked_out_to_first_name'),
|
||||
'last_name' => trans('general.importer.checked_out_to_last_name'),
|
||||
'full_name' => trans('general.importer.checked_out_to_fullname'),
|
||||
'email' => trans('general.importer.checked_out_to_email'),
|
||||
'username' => trans('general.importer.checked_out_to_username'),
|
||||
'checkout_location' => trans('general.importer.checkout_location'),
|
||||
];
|
||||
|
||||
$this->consumables_fields = [
|
||||
'company' => trans('general.company'),
|
||||
'location' => trans('general.location'),
|
||||
'quantity' => trans('general.qty'),
|
||||
'item_name' => trans('general.item_name_var', ['item' => trans('general.consumable')]),
|
||||
'model_number' => trans('general.model_no'),
|
||||
'notes' => trans('general.notes'),
|
||||
'min_amt' => trans('mail.min_QTY'),
|
||||
'category' => trans('general.category'),
|
||||
'purchase_cost' => trans('general.purchase_cost'),
|
||||
'purchase_date' => trans('general.purchase_date'),
|
||||
'checkout_class' => trans('general.importer.checkout_type'),
|
||||
'supplier' => trans('general.supplier'),
|
||||
'manufacturer' => trans('general.manufacturer'),
|
||||
'order_number' => trans('general.order_number'),
|
||||
'item_no' => trans('admin/consumables/general.item_no'),
|
||||
];
|
||||
|
||||
$this->components_fields = [
|
||||
'company' => trans('general.company'),
|
||||
'location' => trans('general.location'),
|
||||
'quantity' => trans('general.qty'),
|
||||
'item_name' => trans('general.item_name_var', ['item' => trans('general.component')]),
|
||||
'model_number' => trans('general.model_no'),
|
||||
'notes' => trans('general.notes'),
|
||||
'category' => trans('general.category'),
|
||||
'supplier' => trans('general.supplier'),
|
||||
'min_amt' => trans('mail.min_QTY'),
|
||||
'purchase_cost' => trans('general.purchase_cost'),
|
||||
'purchase_date' => trans('general.purchase_date'),
|
||||
'manufacturer' => trans('general.manufacturer'),
|
||||
'order_number' => trans('general.order_number'),
|
||||
'serial' => trans('general.serial_number'),
|
||||
];
|
||||
|
||||
$this->licenses_fields = [
|
||||
'company' => trans('general.company'),
|
||||
'location' => trans('general.location'),
|
||||
'item_name' => trans('general.item_name_var', ['item' => trans('general.license')]),
|
||||
'asset_tag' => trans('general.importer.checked_out_to_tag'),
|
||||
'expiration_date' => trans('admin/licenses/form.expiration'),
|
||||
'full_name' => trans('general.importer.checked_out_to_fullname'),
|
||||
'license_email' => trans('admin/licenses/form.to_email'),
|
||||
'license_name' => trans('admin/licenses/form.to_name'),
|
||||
'purchase_order' => trans('admin/licenses/form.purchase_order'),
|
||||
'reassignable' => trans('admin/licenses/form.reassignable'),
|
||||
'seats' => trans('admin/licenses/form.seats'),
|
||||
'notes' => trans('general.notes'),
|
||||
'category' => trans('general.category'),
|
||||
'supplier' => trans('general.supplier'),
|
||||
'purchase_cost' => trans('general.purchase_cost'),
|
||||
'purchase_date' => trans('general.purchase_date'),
|
||||
'maintained' => trans('admin/licenses/form.maintained'),
|
||||
'checkout_class' => trans('general.importer.checkout_type'),
|
||||
'serial' => trans('general.license_serial'),
|
||||
'email' => trans('general.importer.checked_out_to_email'),
|
||||
'username' => trans('general.importer.checked_out_to_username'),
|
||||
'manufacturer' => trans('general.manufacturer'),
|
||||
];
|
||||
|
||||
$this->users_fields = [
|
||||
'id' => trans('general.id'),
|
||||
'company' => trans('general.company'),
|
||||
'location' => trans('general.location'),
|
||||
'department' => trans('general.department'),
|
||||
'first_name' => trans('general.first_name'),
|
||||
'last_name' => trans('general.last_name'),
|
||||
'notes' => trans('general.notes'),
|
||||
'username' => trans('admin/users/table.username'),
|
||||
'jobtitle' => trans('admin/users/table.title'),
|
||||
'phone_number' => trans('admin/users/table.phone'),
|
||||
'manager_first_name' => trans('general.importer.manager_first_name'),
|
||||
'manager_last_name' => trans('general.importer.manager_last_name'),
|
||||
'activated' => trans('general.activated'),
|
||||
'address' => trans('general.address'),
|
||||
'city' => trans('general.city'),
|
||||
'state' => trans('general.state'),
|
||||
'country' => trans('general.country'),
|
||||
'zip' => trans('general.zip'),
|
||||
'vip' => trans('general.importer.vip'),
|
||||
'remote' => trans('admin/users/general.remote'),
|
||||
'email' => trans('admin/users/table.email'),
|
||||
'website' => trans('general.website'),
|
||||
'avatar' => trans('general.image'),
|
||||
'gravatar' => trans('general.importer.gravatar'),
|
||||
'start_date' => trans('general.start_date'),
|
||||
'end_date' => trans('general.end_date'),
|
||||
'employee_num' => trans('general.employee_number'),
|
||||
];
|
||||
|
||||
$this->locations_fields = [
|
||||
'name' => trans('general.item_name_var', ['item' => trans('general.location')]),
|
||||
'address' => trans('general.address'),
|
||||
'address2' => trans('general.importer.address2'),
|
||||
'city' => trans('general.city'),
|
||||
'state' => trans('general.state'),
|
||||
'country' => trans('general.country'),
|
||||
'zip' => trans('general.zip'),
|
||||
'currency' => trans('general.importer.currency'),
|
||||
'ldap_ou' => trans('admin/locations/table.ldap_ou'),
|
||||
'manager_username' => trans('general.importer.manager_username'),
|
||||
'manager' => trans('general.importer.manager_full_name'),
|
||||
'parent_location' => trans('admin/locations/table.parent'),
|
||||
];
|
||||
|
||||
// "real fieldnames" to a list of aliases for that field
|
||||
$this->aliases_fields = [
|
||||
'item_name' =>
|
||||
[
|
||||
'item name',
|
||||
'asset name',
|
||||
'accessory name',
|
||||
'user name',
|
||||
'consumable name',
|
||||
'component name',
|
||||
'name',
|
||||
],
|
||||
'item_no' => [
|
||||
'item number',
|
||||
'item no.',
|
||||
'item #',
|
||||
],
|
||||
'asset_model' =>
|
||||
[
|
||||
'model name',
|
||||
'model',
|
||||
],
|
||||
'gravatar' =>
|
||||
[
|
||||
'gravatar',
|
||||
],
|
||||
'currency' =>
|
||||
[
|
||||
'$',
|
||||
],
|
||||
'jobtitle' =>
|
||||
[
|
||||
'job title for user',
|
||||
'job title',
|
||||
],
|
||||
'username' =>
|
||||
[
|
||||
'user name',
|
||||
'username',
|
||||
trans('general.importer.checked_out_to_username'),
|
||||
],
|
||||
'first_name' =>
|
||||
[
|
||||
'first name',
|
||||
trans('general.importer.checked_out_to_first_name'),
|
||||
],
|
||||
'last_name' =>
|
||||
[
|
||||
'last name',
|
||||
'lastname',
|
||||
trans('general.importer.checked_out_to_last_name'),
|
||||
],
|
||||
'email' =>
|
||||
[
|
||||
'email',
|
||||
'e-mail',
|
||||
trans('general.importer.checked_out_to_email'),
|
||||
],
|
||||
'phone_number' =>
|
||||
[
|
||||
'phone',
|
||||
'phone number',
|
||||
'phone num',
|
||||
'telephone number',
|
||||
'telephone',
|
||||
'tel.',
|
||||
],
|
||||
'serial' =>
|
||||
[
|
||||
'serial number',
|
||||
'serial no.',
|
||||
'serial no',
|
||||
'product key',
|
||||
'key',
|
||||
],
|
||||
'model_number' =>
|
||||
[
|
||||
'model',
|
||||
'model no',
|
||||
'model no.',
|
||||
'model number',
|
||||
'model num',
|
||||
'model num.'
|
||||
],
|
||||
'warranty_months' =>
|
||||
[
|
||||
'Warranty',
|
||||
'Warranty Months'
|
||||
],
|
||||
'qty' =>
|
||||
[
|
||||
'QTY',
|
||||
'Quantity'
|
||||
],
|
||||
'zip' =>
|
||||
[
|
||||
'Postal Code',
|
||||
'Post Code',
|
||||
'Zip Code'
|
||||
],
|
||||
'min_amt' =>
|
||||
[
|
||||
'Min Amount',
|
||||
'Minimum Amount',
|
||||
'Min Quantity',
|
||||
'Minimum Quantity',
|
||||
],
|
||||
'next_audit_date' =>
|
||||
[
|
||||
'Next Audit',
|
||||
],
|
||||
'address2' =>
|
||||
[
|
||||
'Address 2',
|
||||
'Address2',
|
||||
],
|
||||
'ldap_ou' =>
|
||||
[
|
||||
'LDAP OU',
|
||||
'OU',
|
||||
],
|
||||
'parent_location' =>
|
||||
[
|
||||
'Parent',
|
||||
'Parent Location',
|
||||
],
|
||||
'manager' =>
|
||||
[
|
||||
'Managed By',
|
||||
'Manager Name',
|
||||
'Manager Full Name',
|
||||
],
|
||||
'manager_username' =>
|
||||
[
|
||||
'Manager Username',
|
||||
],
|
||||
];
|
||||
|
||||
$this->columnOptions[''] = $this->getColumns(''); //blank mode? I don't know what this is supposed to mean
|
||||
foreach($this->importTypes AS $type => $name) {
|
||||
$this->columnOptions[$type] = $this->getColumns($type);
|
||||
}
|
||||
if ($this->activeFile) {
|
||||
$this->field_map = $this->activeFile->field_map ? array_values($this->activeFile->field_map) : [];
|
||||
}
|
||||
}
|
||||
|
||||
public function selectFile($id)
|
||||
{
|
||||
|
||||
$this->activeFile = Import::find($id);
|
||||
$this->field_map = null;
|
||||
foreach($this->activeFile->header_row as $element) {
|
||||
if(isset($this->activeFile->field_map[$element])) {
|
||||
$this->field_map[] = $this->activeFile->field_map[$element];
|
||||
} else {
|
||||
$this->field_map[] = null; // re-inject the 'nulls' if a file was imported with some 'Do Not Import' settings
|
||||
}
|
||||
}
|
||||
$this->file_id = $id;
|
||||
$this->import_errors = null;
|
||||
$this->statusText = null;
|
||||
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
// TODO: why don't we just do File::find($id)? This seems dumb.
|
||||
foreach($this->files as $file) {
|
||||
\Log::debug("File id is: ".$file->id);
|
||||
if($id == $file->id) {
|
||||
if(Storage::delete('private_uploads/imports/'.$file->file_path)) {
|
||||
$file->delete();
|
||||
|
||||
$this->message = trans('admin/hardware/message.import.file_delete_success');
|
||||
$this->message_type = 'success';
|
||||
return;
|
||||
} else {
|
||||
$this->message = trans('admin/hardware/message.import.file_delete_error');
|
||||
$this->message_type = 'danger';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
$this->files = Import::orderBy('id','desc')->get(); //HACK - slows down renders.
|
||||
return view('livewire.importer')
|
||||
->extends('layouts.default')
|
||||
->section('content');
|
||||
}
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
<?php
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class LoginForm extends Component
|
||||
{
|
||||
public $username = '';
|
||||
public $password = '';
|
||||
public $can_submit = false;
|
||||
|
||||
|
||||
/**
|
||||
* Set the validation rules for login
|
||||
*
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @version v6.0
|
||||
* @return Array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'username' => 'required|string|max:255',
|
||||
'password' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform the validation
|
||||
*
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @version v6.0
|
||||
*/
|
||||
public function updated($fields)
|
||||
{
|
||||
|
||||
if (is_null($fields) || empty($fields)) {
|
||||
$this->can_submit = false;
|
||||
}
|
||||
|
||||
$whatever = $this->validateOnly($fields);
|
||||
//\Log::info(print_r($whatever,true));
|
||||
|
||||
$errors = $this->getErrorBag();
|
||||
|
||||
$this->can_submit = $this->username !== "" && $this->password !== "" && !$errors->has('username') && !$errors->has('password') ; // wait, what?
|
||||
|
||||
\Log::info("Oy - can we submit yet?!".$this->can_submit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually do the login thing
|
||||
*
|
||||
* @todo fix missing LDAP stuff maybe? Not sure if it
|
||||
* makes sense to even do this via LiveWire, since
|
||||
* our login system is pretty complicated.
|
||||
*
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @version v6.0
|
||||
*/
|
||||
public function submitForm()
|
||||
{
|
||||
|
||||
//$this->can_submit = true;
|
||||
|
||||
if (auth()->attempt($this->validate())) {
|
||||
return redirect()->intended('/');
|
||||
} else {
|
||||
return session()->flash('error', trans('auth/message.account_not_found'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,177 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use Livewire\Component;
|
||||
use App\Models\Setting;
|
||||
use App\Helpers\Helper;
|
||||
|
||||
class SlackSettingsForm extends Component
|
||||
{
|
||||
public $webhook_endpoint;
|
||||
public $webhook_channel;
|
||||
public $webhook_botname;
|
||||
public $isDisabled ='' ;
|
||||
public $webhook_name;
|
||||
public $webhook_link;
|
||||
public $webhook_placeholder;
|
||||
public $webhook_icon;
|
||||
public $webhook_selected;
|
||||
public array $webhook_text;
|
||||
|
||||
public Setting $setting;
|
||||
|
||||
protected $rules = [
|
||||
'webhook_endpoint' => 'url|required_with:webhook_channel|starts_with:https://hooks.slack.com/services|nullable',
|
||||
'webhook_channel' => 'required_with:webhook_endpoint|starts_with:#|nullable',
|
||||
'webhook_botname' => 'string|nullable',
|
||||
];
|
||||
|
||||
public function mount() {
|
||||
$this->webhook_text= [
|
||||
"slack" => array(
|
||||
"name" => trans('admin/settings/general.slack') ,
|
||||
"icon" => 'fab fa-slack',
|
||||
"placeholder" => "https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX",
|
||||
"link" => 'https://api.slack.com/messaging/webhooks',
|
||||
),
|
||||
"general"=> array(
|
||||
"name" => trans('admin/settings/general.general_webhook'),
|
||||
"icon" => "fab fa-hashtag",
|
||||
"placeholder" => "",
|
||||
"link" => "",
|
||||
),
|
||||
];
|
||||
|
||||
$this->setting = Setting::getSettings();
|
||||
$this->save_button = trans('general.save');
|
||||
$this->webhook_selected = $this->setting->webhook_selected;
|
||||
$this->webhook_placeholder = $this->webhook_text[$this->setting->webhook_selected]["placeholder"];
|
||||
$this->webhook_name = $this->webhook_text[$this->setting->webhook_selected]["name"];
|
||||
$this->webhook_icon = $this->webhook_text[$this->setting->webhook_selected]["icon"];
|
||||
$this->webhook_endpoint = $this->setting->webhook_endpoint;
|
||||
$this->webhook_channel = $this->setting->webhook_channel;
|
||||
$this->webhook_botname = $this->setting->webhook_botname;
|
||||
$this->webhook_options = $this->setting->webhook_selected;
|
||||
|
||||
if($this->setting->webhook_selected == 'general'){
|
||||
$this->isDisabled='';
|
||||
}
|
||||
if($this->setting->webhook_endpoint != null && $this->setting->webhook_channel != null){
|
||||
$this->isDisabled= '';
|
||||
}
|
||||
|
||||
}
|
||||
public function updated($field) {
|
||||
|
||||
if($this->webhook_selected != 'general') {
|
||||
$this->validateOnly($field, $this->rules);
|
||||
}
|
||||
}
|
||||
|
||||
public function updatedWebhookSelected() {
|
||||
$this->webhook_name = $this->webhook_text[$this->webhook_selected]['name'];
|
||||
$this->webhook_icon = $this->webhook_text[$this->webhook_selected]["icon"]; ;
|
||||
$this->webhook_placeholder = $this->webhook_text[$this->webhook_selected]["placeholder"];
|
||||
$this->webhook_link = $this->webhook_text[$this->webhook_selected]["link"];
|
||||
if($this->webhook_selected != 'slack'){
|
||||
$this->isDisabled= '';
|
||||
$this->save_button = trans('general.save');
|
||||
}
|
||||
}
|
||||
|
||||
private function isButtonDisabled() {
|
||||
if($this->webhook_selected == 'slack') {
|
||||
if (empty($this->webhook_endpoint)) {
|
||||
$this->isDisabled = 'disabled';
|
||||
$this->save_button = trans('admin/settings/general.webhook_presave');
|
||||
}
|
||||
if (empty($this->webhook_channel)) {
|
||||
$this->isDisabled = 'disabled';
|
||||
$this->save_button = trans('admin/settings/general.webhook_presave');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
$this->isButtonDisabled();
|
||||
return view('livewire.slack-settings-form');
|
||||
}
|
||||
|
||||
public function testWebhook(){
|
||||
|
||||
$webhook = new Client([
|
||||
'base_url' => e($this->webhook_endpoint),
|
||||
'defaults' => [
|
||||
'exceptions' => false,
|
||||
],
|
||||
]);
|
||||
|
||||
$payload = json_encode(
|
||||
[
|
||||
'channel' => e($this->webhook_channel),
|
||||
'text' => trans('general.webhook_test_msg', ['app' => $this->webhook_name]),
|
||||
'username' => e($this->webhook_botname),
|
||||
'icon_emoji' => ':heart:',
|
||||
]);
|
||||
|
||||
try {
|
||||
|
||||
$webhook->post($this->webhook_endpoint, ['body' => $payload]);
|
||||
$this->isDisabled='';
|
||||
$this->save_button = trans('general.save');
|
||||
return session()->flash('success' , 'Your '.$this->webhook_name.' Integration works!');
|
||||
|
||||
} catch (\Exception $e) {
|
||||
|
||||
$this->isDisabled= 'disabled';
|
||||
return session()->flash('error' , trans('admin/settings/message.webhook.error', ['error_message' => $e->getMessage(), 'app' => $this->webhook_name]));
|
||||
}
|
||||
|
||||
return session()->flash('error' , trans('admin/settings/message.webhook.error_misc'));
|
||||
|
||||
}
|
||||
|
||||
public function clearSettings(){
|
||||
|
||||
if (Helper::isDemoMode()) {
|
||||
session()->flash('error',trans('general.feature_disabled'));
|
||||
} else {
|
||||
$this->webhook_endpoint = '';
|
||||
$this->webhook_channel = '';
|
||||
$this->webhook_botname = '';
|
||||
$this->setting->webhook_endpoint = '';
|
||||
$this->setting->webhook_channel = '';
|
||||
$this->setting->webhook_botname = '';
|
||||
|
||||
$this->setting->save();
|
||||
|
||||
session()->flash('success', trans('admin/settings/message.update.success'));
|
||||
}
|
||||
}
|
||||
|
||||
public function submit()
|
||||
{
|
||||
if (Helper::isDemoMode()) {
|
||||
session()->flash('error',trans('general.feature_disabled'));
|
||||
} else {
|
||||
if ($this->webhook_selected != 'general') {
|
||||
$this->validate($this->rules);
|
||||
}
|
||||
|
||||
$this->setting->webhook_selected = $this->webhook_selected;
|
||||
$this->setting->webhook_endpoint = $this->webhook_endpoint;
|
||||
$this->setting->webhook_channel = $this->webhook_channel;
|
||||
$this->setting->webhook_botname = $this->webhook_botname;
|
||||
|
||||
$this->setting->save();
|
||||
|
||||
session()->flash('success',trans('admin/settings/message.update.success'));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
"license": "AGPL-3.0-or-later",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": "8.0 - 8.2",
|
||||
"php": "^8.1",
|
||||
"ext-curl": "*",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-json": "*",
|
||||
|
@ -28,7 +28,6 @@
|
|||
"eduardokum/laravel-mail-auto-embed": "^2.0",
|
||||
"enshrined/svg-sanitize": "^0.15.0",
|
||||
"erusev/parsedown": "^1.7",
|
||||
"spatie/laravel-ignition": "^2.0",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"intervention/image": "^2.5",
|
||||
"javiereguiluz/easyslugger": "^1.0",
|
||||
|
@ -44,7 +43,7 @@
|
|||
"lcobucci/jwt": "^3.4.5|^4.0.4",
|
||||
"league/csv": "^9.7",
|
||||
"league/flysystem-aws-s3-v3": "^3.0",
|
||||
"livewire/livewire": "^2.4",
|
||||
"livewire/livewire": "^3.0",
|
||||
"neitanod/forceutf8": "^2.0",
|
||||
"nesbot/carbon": "^2.32",
|
||||
"nunomaduro/collision": "^6.1",
|
||||
|
@ -56,6 +55,7 @@
|
|||
"pragmarx/google2fa-laravel": "^1.3",
|
||||
"rollbar/rollbar-laravel": "^8.0",
|
||||
"spatie/laravel-backup": "^8.0",
|
||||
"spatie/laravel-ignition": "^2.0",
|
||||
"tecnickcom/tc-lib-barcode": "^1.15",
|
||||
"tecnickcom/tcpdf": "^6.5",
|
||||
"unicodeveloper/laravel-password": "^1.0",
|
||||
|
|
32
composer.lock
generated
32
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "7ae0b408bfe4312a67752d97db504e3b",
|
||||
"content-hash": "e9959a94ad795a6694fbc19bf5376817",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alek13/slack",
|
||||
|
@ -4329,33 +4329,33 @@
|
|||
},
|
||||
{
|
||||
"name": "livewire/livewire",
|
||||
"version": "v2.12.6",
|
||||
"version": "v3.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/livewire/livewire.git",
|
||||
"reference": "7d3a57b3193299cf1a0639a3935c696f4da2cf92"
|
||||
"reference": "2e426e8d47e03c4777334ec0c8397341bcfa15f3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/livewire/livewire/zipball/7d3a57b3193299cf1a0639a3935c696f4da2cf92",
|
||||
"reference": "7d3a57b3193299cf1a0639a3935c696f4da2cf92",
|
||||
"url": "https://api.github.com/repos/livewire/livewire/zipball/2e426e8d47e03c4777334ec0c8397341bcfa15f3",
|
||||
"reference": "2e426e8d47e03c4777334ec0c8397341bcfa15f3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/database": "^7.0|^8.0|^9.0|^10.0",
|
||||
"illuminate/support": "^7.0|^8.0|^9.0|^10.0",
|
||||
"illuminate/validation": "^7.0|^8.0|^9.0|^10.0",
|
||||
"illuminate/database": "^10.0|^11.0",
|
||||
"illuminate/support": "^10.0|^11.0",
|
||||
"illuminate/validation": "^10.0|^11.0",
|
||||
"league/mime-type-detection": "^1.9",
|
||||
"php": "^7.2.5|^8.0",
|
||||
"php": "^8.1",
|
||||
"symfony/http-kernel": "^5.0|^6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"calebporzio/sushi": "^2.1",
|
||||
"laravel/framework": "^7.0|^8.0|^9.0|^10.0",
|
||||
"laravel/framework": "^10.0|^11.0",
|
||||
"mockery/mockery": "^1.3.1",
|
||||
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",
|
||||
"orchestra/testbench-dusk": "^5.2|^6.0|^7.0|^8.0",
|
||||
"phpunit/phpunit": "^8.4|^9.0",
|
||||
"orchestra/testbench": "^7.0|^8.0",
|
||||
"orchestra/testbench-dusk": "^7.0|^8.0",
|
||||
"phpunit/phpunit": "^9.0",
|
||||
"psy/psysh": "@stable"
|
||||
},
|
||||
"type": "library",
|
||||
|
@ -4390,7 +4390,7 @@
|
|||
"description": "A front-end framework for Laravel.",
|
||||
"support": {
|
||||
"issues": "https://github.com/livewire/livewire/issues",
|
||||
"source": "https://github.com/livewire/livewire/tree/v2.12.6"
|
||||
"source": "https://github.com/livewire/livewire/tree/v3.0.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -4398,7 +4398,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-08-11T04:02:34+00:00"
|
||||
"time": "2023-08-25T18:13:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
|
@ -15913,7 +15913,7 @@
|
|||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "8.0 - 8.2",
|
||||
"php": "^8.1",
|
||||
"ext-curl": "*",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-json": "*",
|
||||
|
|
|
@ -15,7 +15,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'class_namespace' => 'App\\Http\\Livewire',
|
||||
'class_namespace' => 'App\\Livewire',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -41,48 +41,6 @@ return [
|
|||
|
||||
'layout' => 'layouts.app',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire Assets URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value sets the path to Livewire JavaScript assets, for cases where
|
||||
| your app's domain root is not the correct path. By default, Livewire
|
||||
| will load its JavaScript assets from the app's "relative root".
|
||||
|
|
||||
| Examples: "/assets", "myurl.com/app".
|
||||
|
|
||||
*/
|
||||
|
||||
'asset_url' => env('APP_URL'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire App URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value should be used if livewire assets are served from CDN.
|
||||
| Livewire will communicate with an app through this url.
|
||||
|
|
||||
| Examples: "https://my-app.com", "myurl.com/app".
|
||||
|
|
||||
*/
|
||||
|
||||
'app_url' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire Endpoint Middleware Group
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value sets the middleware group that will be applied to the main
|
||||
| Livewire "message" endpoint (the endpoint that gets hit everytime
|
||||
| a Livewire component updates). It is set to "web" by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware_group' => 'web',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire Temporary File Uploads Endpoint Configuration
|
||||
|
@ -108,38 +66,6 @@ return [
|
|||
'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated.
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Manifest File Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value sets the path to the Livewire manifest file.
|
||||
| The default should work for most cases (which is
|
||||
| "<app_root>/bootstrap/cache/livewire-components.php"), but for specific
|
||||
| cases like when hosting on Laravel Vapor, it could be set to a different value.
|
||||
|
|
||||
| Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php".
|
||||
|
|
||||
*/
|
||||
|
||||
'manifest_path' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Back Button Cache
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines whether the back button cache will be used on pages
|
||||
| that contain Livewire. By disabling back button cache, it ensures that
|
||||
| the back button shows the correct state of components, instead of
|
||||
| potentially stale, cached data.
|
||||
|
|
||||
| Setting it to "false" (default) will disable back button cache.
|
||||
|
|
||||
*/
|
||||
|
||||
'back_button_cache' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Render On Redirect
|
||||
|
@ -155,4 +81,61 @@ return [
|
|||
|
||||
'render_on_redirect' => false,
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
| Eloquent Model Binding
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| Previous versions of Livewire supported binding directly to eloquent model
|
||||
| properties using wire:model by default. However, this behavior has been
|
||||
| deemed too "magical" and has therefore been put under a feature flag.
|
||||
|
|
||||
*/
|
||||
|
||||
'legacy_model_binding' => true, //I *do* think we use this
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
| Auto-inject Frontend Assets
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| By default, Livewire automatically injects its JavaScript and CSS into the
|
||||
| <head> and <body> of pages containing Livewire components. By disabling
|
||||
| this behavior, you need to use @livewireStyles and @livewireScripts.
|
||||
|
|
||||
*/
|
||||
|
||||
'inject_assets' => true,
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
| HTML Morph Markers
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| Livewire intelligently "morphs" existing HTML into the newly rendered HTML
|
||||
| after each update. To make this process more reliable, Livewire injects
|
||||
| "markers" into the rendered Blade surrounding @if, @class & @foreach.
|
||||
|
|
||||
*/
|
||||
|
||||
'inject_morph_markers' => true,
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
| Navigate (SPA mode)
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| By adding `wire:navigate` to links in your Livewire application, Livewire
|
||||
| will prevent the default link handling and instead request those pages
|
||||
| via AJAX, creating an SPA-like effect. Configure this behavior here.
|
||||
|
|
||||
*/
|
||||
|
||||
'navigate' => [
|
||||
'show_progress_bar' => false,
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
|
|
22
package-lock.json
generated
22
package-lock.json
generated
|
@ -10,7 +10,6 @@
|
|||
"acorn-import-assertions": "^1.9.0",
|
||||
"admin-lte": "^2.4.18",
|
||||
"ajv": "^6.12.6",
|
||||
"alpinejs": "^3.10.5",
|
||||
"blueimp-file-upload": "^9.34.0",
|
||||
"bootstrap": "^3.4.1",
|
||||
"bootstrap-colorpicker": "^2.5.3",
|
||||
|
@ -2291,19 +2290,6 @@
|
|||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/@vue/reactivity": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz",
|
||||
"integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.1.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/shared": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz",
|
||||
"integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA=="
|
||||
},
|
||||
"node_modules/@webassemblyjs/ast": {
|
||||
"version": "1.11.5",
|
||||
"license": "MIT",
|
||||
|
@ -2619,14 +2605,6 @@
|
|||
"ajv": "^6.9.1"
|
||||
}
|
||||
},
|
||||
"node_modules/alpinejs": {
|
||||
"version": "3.12.3",
|
||||
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.12.3.tgz",
|
||||
"integrity": "sha512-fLz2dfYQ3xCk7Ip8LiIpV2W+9brUyex2TAE7Z0BCvZdUDklJE+n+a8gCgLWzfZ0GzZNZu7HUP8Z0z6Xbm6fsSA==",
|
||||
"dependencies": {
|
||||
"@vue/reactivity": "~3.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-html-community": {
|
||||
"version": "0.0.8",
|
||||
"dev": true,
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
"acorn-import-assertions": "^1.9.0",
|
||||
"admin-lte": "^2.4.18",
|
||||
"ajv": "^6.12.6",
|
||||
"alpinejs": "^3.10.5",
|
||||
"blueimp-file-upload": "^9.34.0",
|
||||
"bootstrap": "^3.4.1",
|
||||
"bootstrap-colorpicker": "^2.5.3",
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/css/dist/all.css
vendored
BIN
public/css/dist/all.css
vendored
Binary file not shown.
BIN
public/css/dist/bootstrap-table.css
vendored
BIN
public/css/dist/bootstrap-table.css
vendored
Binary file not shown.
BIN
public/css/dist/signature-pad.min.css
vendored
BIN
public/css/dist/signature-pad.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-black-dark.css
vendored
BIN
public/css/dist/skins/skin-black-dark.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-black-dark.min.css
vendored
BIN
public/css/dist/skins/skin-black-dark.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-black.css
vendored
BIN
public/css/dist/skins/skin-black.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-black.min.css
vendored
BIN
public/css/dist/skins/skin-black.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-blue-dark.css
vendored
BIN
public/css/dist/skins/skin-blue-dark.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-blue-dark.min.css
vendored
BIN
public/css/dist/skins/skin-blue-dark.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-blue.css
vendored
BIN
public/css/dist/skins/skin-blue.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-blue.min.css
vendored
BIN
public/css/dist/skins/skin-blue.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-contrast.css
vendored
BIN
public/css/dist/skins/skin-contrast.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-contrast.min.css
vendored
BIN
public/css/dist/skins/skin-contrast.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-green-dark.css
vendored
BIN
public/css/dist/skins/skin-green-dark.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-green-dark.min.css
vendored
BIN
public/css/dist/skins/skin-green-dark.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-green.css
vendored
BIN
public/css/dist/skins/skin-green.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-green.min.css
vendored
BIN
public/css/dist/skins/skin-green.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-orange-dark.css
vendored
BIN
public/css/dist/skins/skin-orange-dark.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-orange-dark.min.css
vendored
BIN
public/css/dist/skins/skin-orange-dark.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-orange.css
vendored
BIN
public/css/dist/skins/skin-orange.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-orange.min.css
vendored
BIN
public/css/dist/skins/skin-orange.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-purple-dark.css
vendored
BIN
public/css/dist/skins/skin-purple-dark.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-purple-dark.min.css
vendored
BIN
public/css/dist/skins/skin-purple-dark.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-purple.css
vendored
BIN
public/css/dist/skins/skin-purple.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-purple.min.css
vendored
BIN
public/css/dist/skins/skin-purple.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-red-dark.css
vendored
BIN
public/css/dist/skins/skin-red-dark.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-red-dark.min.css
vendored
BIN
public/css/dist/skins/skin-red-dark.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-red.css
vendored
BIN
public/css/dist/skins/skin-red.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-red.min.css
vendored
BIN
public/css/dist/skins/skin-red.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-yellow-dark.css
vendored
BIN
public/css/dist/skins/skin-yellow-dark.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-yellow-dark.min.css
vendored
BIN
public/css/dist/skins/skin-yellow-dark.min.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-yellow.css
vendored
BIN
public/css/dist/skins/skin-yellow.css
vendored
Binary file not shown.
BIN
public/css/dist/skins/skin-yellow.min.css
vendored
BIN
public/css/dist/skins/skin-yellow.min.css
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/js/dist/all.js
vendored
BIN
public/js/dist/all.js
vendored
Binary file not shown.
BIN
public/js/dist/bootstrap-table.js
vendored
BIN
public/js/dist/bootstrap-table.js
vendored
Binary file not shown.
|
@ -1,24 +1,24 @@
|
|||
{
|
||||
"/js/build/app.js": "/js/build/app.js?id=43fc984e5d0f901e04cef2474972e97f",
|
||||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=392cc93cfc0be0349bab9697669dd091",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=eb013ebb79d92e25ce24b0c0b53185e4",
|
||||
"/css/build/app.css": "/css/build/app.css?id=ac51a0600b419996e705675b6fcf1a8b",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=a67bd93bed52e6a29967fe472de66d6c",
|
||||
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=268041e902b019730c23ee3875838005",
|
||||
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=d409d9b1a3b69247df8b98941ba06e33",
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=4a9e8c5e7b09506fa3e3a3f42849e07f",
|
||||
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=21fef066e0bb1b02fd83fcb6694fad5f",
|
||||
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=fc7adb943668ac69fe4b646625a7571f",
|
||||
"/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=9f944e8021781af1ce45d27765d1c0c2",
|
||||
"/css/dist/skins/skin-purple.css": "/css/dist/skins/skin-purple.css?id=cf6c8c340420724b02d6e787ef9bded5",
|
||||
"/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=7f0eb9e355b36b41c61c3af3b4d41143",
|
||||
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=f4d95ad9d0944587549e35b6929b4b04",
|
||||
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=1f33ca3d860461c1127ec465ab3ebb6b",
|
||||
"/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=44f9320d0739f419c9246f7f39395b02",
|
||||
"/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=b48f4d8af0e1ca5621c161e93951109f",
|
||||
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=f0fbbb0ac729ea092578fb05ca615460",
|
||||
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=b9a74ec0cd68f83e7480d5ae39919beb",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=c5f8982eb14ba2c7e0c0fec60519afc6",
|
||||
"/js/build/app.js": "/js/build/app.js?id=75701cda1dcce0fdc67ea42761c97e98",
|
||||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=5166569ede5a36802eadeea982686ca6",
|
||||
"/css/build/app.css": "/css/build/app.css?id=b612c48e78fece2e1e8042ae24cc5f1e",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=4ea0068716c1bb2434d87a16d51b98c9",
|
||||
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=6f0563e726c2fe4fab4026daaa5bfdf2",
|
||||
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=e6e53eef152bba01a4c666a4d8b01117",
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=07273f6ca3c698a39e8fc2075af4fa07",
|
||||
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=c1f33574ecb9d3e69d9b8fe5bd68e101",
|
||||
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690",
|
||||
"/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=7d92dea45d94be7e1d4e427c728d335d",
|
||||
"/css/dist/skins/skin-purple.css": "/css/dist/skins/skin-purple.css?id=6fe68325d5356197672c27bc77cedcb4",
|
||||
"/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=8ca888bbc050d9680cbb65021382acba",
|
||||
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=bdfc704731682c67645a2248b0b8d2d7",
|
||||
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb",
|
||||
"/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=e36e83c2aa3c3afdbb8ebe2c0309e91d",
|
||||
"/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",
|
||||
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=da6c7997d9de2f8329142399f0ce50da",
|
||||
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=44bf834f2110504a793dadec132a5898",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=e907c22c9a9fd1a4c5421f28125338ba",
|
||||
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/css/webfonts/fa-brands-400.ttf": "/css/webfonts/fa-brands-400.ttf?id=e2e2b1797606a266ed55549f5bb5a179",
|
||||
|
@ -32,21 +32,20 @@
|
|||
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=281bcfe26549412d128f695234961081",
|
||||
"/js/build/vendor.js": "/js/build/vendor.js?id=8ac1d250496313e93744790e5138305d",
|
||||
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=df78f0c4cc93c29c02a41144590f6350",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=b487452bd6bef7fa6201586415d383f2",
|
||||
"/js/dist/all-defer.js": "/js/dist/all-defer.js?id=7829a391ab2f89926465398bebb7df8d",
|
||||
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=b48f4d8af0e1ca5621c161e93951109f",
|
||||
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=44f9320d0739f419c9246f7f39395b02",
|
||||
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=1f33ca3d860461c1127ec465ab3ebb6b",
|
||||
"/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=f4d95ad9d0944587549e35b6929b4b04",
|
||||
"/css/dist/skins/skin-blue.min.css": "/css/dist/skins/skin-blue.min.css?id=392cc93cfc0be0349bab9697669dd091",
|
||||
"/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=4a9e8c5e7b09506fa3e3a3f42849e07f",
|
||||
"/css/dist/skins/skin-yellow.min.css": "/css/dist/skins/skin-yellow.min.css?id=fc7adb943668ac69fe4b646625a7571f",
|
||||
"/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=21fef066e0bb1b02fd83fcb6694fad5f",
|
||||
"/css/dist/skins/skin-red.min.css": "/css/dist/skins/skin-red.min.css?id=b9a74ec0cd68f83e7480d5ae39919beb",
|
||||
"/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=7f0eb9e355b36b41c61c3af3b4d41143",
|
||||
"/css/dist/skins/skin-purple.min.css": "/css/dist/skins/skin-purple.min.css?id=cf6c8c340420724b02d6e787ef9bded5",
|
||||
"/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=9f944e8021781af1ce45d27765d1c0c2",
|
||||
"/css/dist/skins/skin-orange.min.css": "/css/dist/skins/skin-orange.min.css?id=268041e902b019730c23ee3875838005",
|
||||
"/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=d409d9b1a3b69247df8b98941ba06e33",
|
||||
"/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=f0fbbb0ac729ea092578fb05ca615460"
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=2961f40174dda4743e62c8e4c8891b42",
|
||||
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",
|
||||
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=e36e83c2aa3c3afdbb8ebe2c0309e91d",
|
||||
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb",
|
||||
"/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=bdfc704731682c67645a2248b0b8d2d7",
|
||||
"/css/dist/skins/skin-blue.min.css": "/css/dist/skins/skin-blue.min.css?id=f677207c6cf9678eb539abecb408c374",
|
||||
"/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=07273f6ca3c698a39e8fc2075af4fa07",
|
||||
"/css/dist/skins/skin-yellow.min.css": "/css/dist/skins/skin-yellow.min.css?id=7b315b9612b8fde8f9c5b0ddb6bba690",
|
||||
"/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=c1f33574ecb9d3e69d9b8fe5bd68e101",
|
||||
"/css/dist/skins/skin-red.min.css": "/css/dist/skins/skin-red.min.css?id=44bf834f2110504a793dadec132a5898",
|
||||
"/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=8ca888bbc050d9680cbb65021382acba",
|
||||
"/css/dist/skins/skin-purple.min.css": "/css/dist/skins/skin-purple.min.css?id=6fe68325d5356197672c27bc77cedcb4",
|
||||
"/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=7d92dea45d94be7e1d4e427c728d335d",
|
||||
"/css/dist/skins/skin-orange.min.css": "/css/dist/skins/skin-orange.min.css?id=6f0563e726c2fe4fab4026daaa5bfdf2",
|
||||
"/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=e6e53eef152bba01a4c666a4d8b01117",
|
||||
"/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=da6c7997d9de2f8329142399f0ce50da"
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
.select2({
|
||||
data: this.options
|
||||
})
|
||||
.on('change', function() { vm.$emit('input', this.value) } )
|
||||
.on('change', function() { vm.$dispatch('input', this.value) } )
|
||||
.val(this.value).trigger('change');
|
||||
},
|
||||
watch: {
|
||||
|
@ -35,7 +35,7 @@
|
|||
options: function (options) {
|
||||
var vm = this;
|
||||
$(this.$el).select2('destroy').empty().select2({data: options})
|
||||
.on('change', function() { vm.$emit('input', this.value) } )
|
||||
.on('change', function() { vm.$dispatch('input', this.value) } )
|
||||
.val(this.value).trigger('change');
|
||||
},
|
||||
destroyed: function() {
|
||||
|
|
|
@ -605,8 +605,8 @@ function htmlEntities(str) {
|
|||
*
|
||||
* 1. Set the class of your select2 elements to 'livewire-select2').
|
||||
* 2. Name your element to match a property in your Livewire component
|
||||
* 3. Add an attribute called 'data-livewire-component' that points to $_instance->id (via `{{ }}` if you're in a blade,
|
||||
* or just $_instance->id if not).
|
||||
* 3. Add an attribute called 'data-livewire-component' that points to $_instance->getId() (via `{{ }}` if you're in a blade,
|
||||
* or just $_instance->getId() if not).
|
||||
*/
|
||||
$(function () {
|
||||
$('.livewire-select2').select2()
|
||||
|
@ -615,14 +615,16 @@ $(function () {
|
|||
var target = $(event.target)
|
||||
if(!event.target.name || !target.data('livewire-component')) {
|
||||
console.error("You need to set both name (which should match a Livewire property) and data-livewire-component on your Livewire-ed select2 elements!")
|
||||
console.error("For data-livewire-component, you probably want to use $_instance->id or {{ $_instance->id }}, as appropriate")
|
||||
console.error("For data-livewire-component, you probably want to use $_instance->getId() or {{ $_instance->getId() }}, as appropriate")
|
||||
return false
|
||||
}
|
||||
window.livewire.find(target.data('livewire-component')).set(event.target.name, this.options[this.selectedIndex].value)
|
||||
})
|
||||
|
||||
window.livewire.hook('message.processed', function (el,component) {
|
||||
$('.livewire-select2').select2();
|
||||
});
|
||||
|
||||
if(window.Livewire) {
|
||||
window.Livewire.hook('message.processed', function (el, component) {
|
||||
console.warn("MESSAGE PROCESSED! This hook needs to bhere!"); // FIXME!
|
||||
$('.livewire-select2').select2();
|
||||
});
|
||||
}
|
||||
})
|
|
@ -20,7 +20,6 @@
|
|||
}
|
||||
};
|
||||
</script>
|
||||
@livewireStyles
|
||||
|
||||
|
||||
@if (($snipeSettings) && ($snipeSettings->header_color))
|
||||
|
@ -75,7 +74,6 @@
|
|||
|
||||
|
||||
@stack('js')
|
||||
@livewireScripts
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -82,8 +82,6 @@
|
|||
<script src="{{ url(asset('js/html5shiv.js')) }}" nonce="{{ csrf_token() }}"></script>
|
||||
<script src="{{ url(asset('js/respond.js')) }}" nonce="{{ csrf_token() }}"></script>
|
||||
|
||||
@livewireStyles
|
||||
|
||||
</head>
|
||||
|
||||
@if (($snipeSettings) && ($snipeSettings->allow_user_skin==1) && Auth::check() && Auth::user()->present()->skin != '')
|
||||
|
@ -947,7 +945,6 @@
|
|||
|
||||
{{-- Javascript files --}}
|
||||
<script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>
|
||||
<script defer src="{{ url(mix('js/dist/all-defer.js')) }}" nonce="{{ csrf_token() }}"></script>
|
||||
|
||||
<!-- v5-beta: This pGenerator call must remain here for v5 - until fixed - so that the JS password generator works for the user create modal. -->
|
||||
<script src="{{ url('js/pGenerator.jquery.js') }}"></script>
|
||||
|
@ -963,13 +960,13 @@
|
|||
|
||||
|
||||
// ignore: 'input[type=hidden]' is required here to validate the select2 lists
|
||||
$.validate({
|
||||
form: '#create-form',
|
||||
modules: 'date, toggleDisabled',
|
||||
disabledFormFilter: '#create-form',
|
||||
showErrorDialogs: true,
|
||||
ignore: 'input[type=hidden]'
|
||||
});
|
||||
// $.validate({ // FIXME! This shouldn't be commented out!
|
||||
// form: '#create-form',
|
||||
// modules: 'date, toggleDisabled',
|
||||
// disabledFormFilter: '#create-form',
|
||||
// showErrorDialogs: true,
|
||||
// ignore: 'input[type=hidden]'
|
||||
// });
|
||||
|
||||
|
||||
$(function () {
|
||||
|
@ -1021,7 +1018,5 @@
|
|||
|
||||
@include('partials.bpay')
|
||||
|
||||
@livewireScripts
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<div class="form-group{{ $errors->has('custom_fieldset') ? ' has-error' : '' }}">
|
||||
<label for="custom_fieldset" class="col-md-3 control-label">{{ trans('admin/models/general.fieldset') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::select('fieldset_id', Helper::customFieldsetList(), old('fieldset_id', $fieldset_id), array('class'=>'select2 js-fieldset-field livewire-select2', 'style'=>'width:100%; min-width:350px', 'aria-label'=>'custom_fieldset', 'data-livewire-component' => $_instance->id)) }}
|
||||
{{ Form::select('fieldset_id', Helper::customFieldsetList(), old('fieldset_id', $fieldset_id), array('class'=>'select2 js-fieldset-field livewire-select2', 'style'=>'width:100%; min-width:350px', 'aria-label'=>'custom_fieldset', 'data-livewire-component' => $_instance->getId())) }}
|
||||
{!! $errors->first('custom_fieldset', '<span class="alert-msg" aria-hidden="true"><br><i class="fas fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('add_default_values', 1, old('add_default_values', $add_default_values), ['data-livewire-component' => $_instance->id, 'id' => 'add_default_values', 'wire:model' => 'add_default_values']) }}
|
||||
{{ Form::checkbox('add_default_values', 1, old('add_default_values', $add_default_values), ['data-livewire-component' => $_instance->getId(), 'id' => 'add_default_values', 'wire:model' => 'add_default_values']) }}
|
||||
{{ trans('admin/models/general.add_default_values') }}
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
'data-placeholder' => trans('general.select_var', ['thing' => trans('general.import_type')]),
|
||||
'placeholder' => '', //needed so that the form-helper will put an empty option first
|
||||
'data-minimum-results-for-search' => '-1', // Remove this if the list gets long enough that we need to search
|
||||
'data-livewire-component' => $_instance->id
|
||||
'data-livewire-component' => $_instance->getId()
|
||||
]) }}
|
||||
@if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 0)
|
||||
<p class="help-block">
|
||||
|
@ -164,7 +164,7 @@
|
|||
|
||||
<div class="form-group col-md-9 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" name="update" data-livewire-component="{{ $_instance->id }}" wire:model="update">
|
||||
<input type="checkbox" name="update" data-livewire-component="{{ $_instance->getId() }}" wire:model="update">
|
||||
{{ trans('general.update_existing_values') }}
|
||||
</label>
|
||||
@if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 1 && $update)
|
||||
|
@ -174,12 +174,12 @@
|
|||
@endif
|
||||
|
||||
<label class="form-control">
|
||||
<input type="checkbox" name="send_welcome" data-livewire-component="{{ $_instance->id }}" wire:model="send_welcome">
|
||||
<input type="checkbox" name="send_welcome" data-livewire-component="{{ $_instance->getId() }}" wire:model="send_welcome">
|
||||
{{ trans('general.send_welcome_email_to_users') }}
|
||||
</label>
|
||||
|
||||
<label class="form-control">
|
||||
<input type="checkbox" name="run_backup" data-livewire-component="{{ $_instance->id }}" wire:model="run_backup">
|
||||
<input type="checkbox" name="run_backup" data-livewire-component="{{ $_instance->getId() }}" wire:model="run_backup">
|
||||
{{ trans('general.back_before_importing') }}
|
||||
</label>
|
||||
|
||||
|
@ -225,7 +225,7 @@
|
|||
'class' => 'mappings livewire-select2',
|
||||
'placeholder' => trans('general.importer.do_not_import'),
|
||||
'style' => 'min-width: 100%',
|
||||
'data-livewire-component' => $_instance->id
|
||||
'data-livewire-component' => $_instance->getId()
|
||||
],[
|
||||
'-' => ['disabled' => true] // this makes the "-----" line unclickable
|
||||
])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div>
|
||||
<form role="form" method="POST" action="{{ route('login') }}" autocomplete="false" wire:submit.prevent="submitForm">
|
||||
<form role="form" method="POST" action="{{ route('login') }}" autocomplete="false" wire:submit="submitForm">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<!-- this is a hack to prevent Chrome from trying to autocomplete fields -->
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
@section('content')
|
||||
|
||||
<div><!-- livewire div - do not remove -->
|
||||
<form class="form-horizontal" role="form" wire:submit.prevent="submit">
|
||||
<form class="form-horizontal" role="form" wire:submit="submit">
|
||||
{{csrf_field()}}
|
||||
|
||||
<div class="row">
|
||||
|
@ -175,7 +175,7 @@
|
|||
});
|
||||
|
||||
// Re-render select2
|
||||
window.livewire.hook('message.processed', function (el, component) {
|
||||
Livewire.hook('message.processed', function (el, component) {
|
||||
$('.select2').select2();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -62,6 +62,8 @@
|
|||
|
||||
|
||||
@if ($setting->label2_enable)
|
||||
{{-- Yes, this is gross, but this is the *ONLY* place we use this! --}}
|
||||
{{ \Livewire\Livewire::forceAssetInjection() }}
|
||||
<!-- New Settings -->
|
||||
|
||||
<!-- Template -->
|
||||
|
|
|
@ -245,7 +245,7 @@ Route::group(['prefix' => 'admin', 'middleware' => ['auth', 'authorize:superuser
|
|||
*/
|
||||
|
||||
Route::get('/import',
|
||||
\App\Http\Livewire\Importer::class
|
||||
\App\Livewire\Importer::class
|
||||
)->middleware('auth')->name('imports.index');
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Tests\Feature\Livewire;
|
||||
|
||||
use App\Http\Livewire\CategoryEditForm;
|
||||
use App\Livewire\CategoryEditForm;
|
||||
use Livewire\Livewire;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
|
|
@ -187,13 +187,6 @@ mix
|
|||
)
|
||||
.version();
|
||||
|
||||
mix
|
||||
.combine(
|
||||
['./node_modules/alpinejs/dist/cdn.js'],
|
||||
'./public/js/dist/all-defer.js'
|
||||
)
|
||||
.version();
|
||||
|
||||
/**
|
||||
* Copy, minify and version skins
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue