diff --git a/app/Http/Livewire/CategoryEditForm.php b/app/Http/Livewire/CategoryEditForm.php deleted file mode 100644 index 05a1fe9d45..0000000000 --- a/app/Http/Livewire/CategoryEditForm.php +++ /dev/null @@ -1,67 +0,0 @@ -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; - } -} diff --git a/app/Http/Livewire/CustomFieldSetDefaultValuesForModel.php b/app/Http/Livewire/CustomFieldSetDefaultValuesForModel.php deleted file mode 100644 index e1487d2151..0000000000 --- a/app/Http/Livewire/CustomFieldSetDefaultValuesForModel.php +++ /dev/null @@ -1,48 +0,0 @@ -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'); - } -} diff --git a/app/Http/Livewire/Importer.php b/app/Http/Livewire/Importer.php deleted file mode 100644 index 7899182a60..0000000000 --- a/app/Http/Livewire/Importer.php +++ /dev/null @@ -1,530 +0,0 @@ - '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'); - } -} diff --git a/app/Http/Livewire/LoginForm.php b/app/Http/Livewire/LoginForm.php deleted file mode 100644 index f4fe02f28f..0000000000 --- a/app/Http/Livewire/LoginForm.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @version v6.0 - * @return Array - */ - public function rules() - { - return [ - 'username' => 'required|string|max:255', - 'password' => 'required', - ]; - } - - /** - * Perform the validation - * - * @author A. Gianotto - * @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 - * @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')); - } - - } - - -} diff --git a/app/Http/Livewire/SlackSettingsForm.php b/app/Http/Livewire/SlackSettingsForm.php deleted file mode 100644 index bb3a7bd7f6..0000000000 --- a/app/Http/Livewire/SlackSettingsForm.php +++ /dev/null @@ -1,177 +0,0 @@ - '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')); - - } - - } -} diff --git a/composer.json b/composer.json index ec48f460a5..659f29a11a 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/composer.lock b/composer.lock index 09f51d3c98..24f3be10d3 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "*", diff --git a/config/livewire.php b/config/livewire.php index 347402f9d2..63a85937df 100644 --- a/config/livewire.php +++ b/config/livewire.php @@ -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 - | "/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 + | and 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, + ], + + + + ]; diff --git a/package-lock.json b/package-lock.json index e3d3350493..a5c20217b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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, diff --git a/package.json b/package.json index 8f8c5ed7b4..353a32381f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/public/css/build/AdminLTE.css b/public/css/build/AdminLTE.css index ca7aa7a66c..46885f5f02 100644 Binary files a/public/css/build/AdminLTE.css and b/public/css/build/AdminLTE.css differ diff --git a/public/css/build/app.css b/public/css/build/app.css index 7b81fc9cc3..c8fc025597 100644 Binary files a/public/css/build/app.css and b/public/css/build/app.css differ diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index 507a8a07af..5111695ac7 100644 Binary files a/public/css/build/overrides.css and b/public/css/build/overrides.css differ diff --git a/public/css/dist/all.css b/public/css/dist/all.css index d21c7b875a..f6150efa32 100644 Binary files a/public/css/dist/all.css and b/public/css/dist/all.css differ diff --git a/public/css/dist/bootstrap-table.css b/public/css/dist/bootstrap-table.css index 360890294c..301c592a5d 100644 Binary files a/public/css/dist/bootstrap-table.css and b/public/css/dist/bootstrap-table.css differ diff --git a/public/css/dist/signature-pad.min.css b/public/css/dist/signature-pad.min.css index 7065929572..218b9c2365 100644 Binary files a/public/css/dist/signature-pad.min.css and b/public/css/dist/signature-pad.min.css differ diff --git a/public/css/dist/skins/skin-black-dark.css b/public/css/dist/skins/skin-black-dark.css index 2a32df6c9c..3e17735603 100644 Binary files a/public/css/dist/skins/skin-black-dark.css and b/public/css/dist/skins/skin-black-dark.css differ diff --git a/public/css/dist/skins/skin-black-dark.min.css b/public/css/dist/skins/skin-black-dark.min.css index d4bd93ca18..3e17735603 100644 Binary files a/public/css/dist/skins/skin-black-dark.min.css and b/public/css/dist/skins/skin-black-dark.min.css differ diff --git a/public/css/dist/skins/skin-black.css b/public/css/dist/skins/skin-black.css index 2d3d0edc3b..ab4d845e2a 100644 Binary files a/public/css/dist/skins/skin-black.css and b/public/css/dist/skins/skin-black.css differ diff --git a/public/css/dist/skins/skin-black.min.css b/public/css/dist/skins/skin-black.min.css index 5a5decc906..ab4d845e2a 100644 Binary files a/public/css/dist/skins/skin-black.min.css and b/public/css/dist/skins/skin-black.min.css differ diff --git a/public/css/dist/skins/skin-blue-dark.css b/public/css/dist/skins/skin-blue-dark.css index 9c1e130515..c4f2672931 100644 Binary files a/public/css/dist/skins/skin-blue-dark.css and b/public/css/dist/skins/skin-blue-dark.css differ diff --git a/public/css/dist/skins/skin-blue-dark.min.css b/public/css/dist/skins/skin-blue-dark.min.css index a70912484e..c4f2672931 100644 Binary files a/public/css/dist/skins/skin-blue-dark.min.css and b/public/css/dist/skins/skin-blue-dark.min.css differ diff --git a/public/css/dist/skins/skin-blue.css b/public/css/dist/skins/skin-blue.css index cdc62766ec..cac9000174 100644 Binary files a/public/css/dist/skins/skin-blue.css and b/public/css/dist/skins/skin-blue.css differ diff --git a/public/css/dist/skins/skin-blue.min.css b/public/css/dist/skins/skin-blue.min.css index 09b0bba755..cac9000174 100644 Binary files a/public/css/dist/skins/skin-blue.min.css and b/public/css/dist/skins/skin-blue.min.css differ diff --git a/public/css/dist/skins/skin-contrast.css b/public/css/dist/skins/skin-contrast.css index 8f5c99c013..50dfc577e2 100644 Binary files a/public/css/dist/skins/skin-contrast.css and b/public/css/dist/skins/skin-contrast.css differ diff --git a/public/css/dist/skins/skin-contrast.min.css b/public/css/dist/skins/skin-contrast.min.css index 25ebe1f277..50dfc577e2 100644 Binary files a/public/css/dist/skins/skin-contrast.min.css and b/public/css/dist/skins/skin-contrast.min.css differ diff --git a/public/css/dist/skins/skin-green-dark.css b/public/css/dist/skins/skin-green-dark.css index 13eb13abe0..8e5430e5cd 100644 Binary files a/public/css/dist/skins/skin-green-dark.css and b/public/css/dist/skins/skin-green-dark.css differ diff --git a/public/css/dist/skins/skin-green-dark.min.css b/public/css/dist/skins/skin-green-dark.min.css index 58d0f21d0a..8e5430e5cd 100644 Binary files a/public/css/dist/skins/skin-green-dark.min.css and b/public/css/dist/skins/skin-green-dark.min.css differ diff --git a/public/css/dist/skins/skin-green.css b/public/css/dist/skins/skin-green.css index cd113d5e54..fe0b851609 100644 Binary files a/public/css/dist/skins/skin-green.css and b/public/css/dist/skins/skin-green.css differ diff --git a/public/css/dist/skins/skin-green.min.css b/public/css/dist/skins/skin-green.min.css index 620d48e3f4..fe0b851609 100644 Binary files a/public/css/dist/skins/skin-green.min.css and b/public/css/dist/skins/skin-green.min.css differ diff --git a/public/css/dist/skins/skin-orange-dark.css b/public/css/dist/skins/skin-orange-dark.css index b52b17dd02..1ec2c0701a 100644 Binary files a/public/css/dist/skins/skin-orange-dark.css and b/public/css/dist/skins/skin-orange-dark.css differ diff --git a/public/css/dist/skins/skin-orange-dark.min.css b/public/css/dist/skins/skin-orange-dark.min.css index 8c0492a9b5..1ec2c0701a 100644 Binary files a/public/css/dist/skins/skin-orange-dark.min.css and b/public/css/dist/skins/skin-orange-dark.min.css differ diff --git a/public/css/dist/skins/skin-orange.css b/public/css/dist/skins/skin-orange.css index 411d4994ac..b26415b6a3 100644 Binary files a/public/css/dist/skins/skin-orange.css and b/public/css/dist/skins/skin-orange.css differ diff --git a/public/css/dist/skins/skin-orange.min.css b/public/css/dist/skins/skin-orange.min.css index af01a70cff..b26415b6a3 100644 Binary files a/public/css/dist/skins/skin-orange.min.css and b/public/css/dist/skins/skin-orange.min.css differ diff --git a/public/css/dist/skins/skin-purple-dark.css b/public/css/dist/skins/skin-purple-dark.css index 33a21545b3..cec9819d7d 100644 Binary files a/public/css/dist/skins/skin-purple-dark.css and b/public/css/dist/skins/skin-purple-dark.css differ diff --git a/public/css/dist/skins/skin-purple-dark.min.css b/public/css/dist/skins/skin-purple-dark.min.css index 0c0a5bd957..cec9819d7d 100644 Binary files a/public/css/dist/skins/skin-purple-dark.min.css and b/public/css/dist/skins/skin-purple-dark.min.css differ diff --git a/public/css/dist/skins/skin-purple.css b/public/css/dist/skins/skin-purple.css index 344cbfce10..d4f67fee9b 100644 Binary files a/public/css/dist/skins/skin-purple.css and b/public/css/dist/skins/skin-purple.css differ diff --git a/public/css/dist/skins/skin-purple.min.css b/public/css/dist/skins/skin-purple.min.css index 8a89eae1a6..d4f67fee9b 100644 Binary files a/public/css/dist/skins/skin-purple.min.css and b/public/css/dist/skins/skin-purple.min.css differ diff --git a/public/css/dist/skins/skin-red-dark.css b/public/css/dist/skins/skin-red-dark.css index b92ad70dfa..17d495cbbb 100644 Binary files a/public/css/dist/skins/skin-red-dark.css and b/public/css/dist/skins/skin-red-dark.css differ diff --git a/public/css/dist/skins/skin-red-dark.min.css b/public/css/dist/skins/skin-red-dark.min.css index afe056285f..17d495cbbb 100644 Binary files a/public/css/dist/skins/skin-red-dark.min.css and b/public/css/dist/skins/skin-red-dark.min.css differ diff --git a/public/css/dist/skins/skin-red.css b/public/css/dist/skins/skin-red.css index c6167ad739..0dc3658056 100644 Binary files a/public/css/dist/skins/skin-red.css and b/public/css/dist/skins/skin-red.css differ diff --git a/public/css/dist/skins/skin-red.min.css b/public/css/dist/skins/skin-red.min.css index 4f73db5918..0dc3658056 100644 Binary files a/public/css/dist/skins/skin-red.min.css and b/public/css/dist/skins/skin-red.min.css differ diff --git a/public/css/dist/skins/skin-yellow-dark.css b/public/css/dist/skins/skin-yellow-dark.css index aea34738e2..09babaa6ab 100644 Binary files a/public/css/dist/skins/skin-yellow-dark.css and b/public/css/dist/skins/skin-yellow-dark.css differ diff --git a/public/css/dist/skins/skin-yellow-dark.min.css b/public/css/dist/skins/skin-yellow-dark.min.css index 73b2bba0df..09babaa6ab 100644 Binary files a/public/css/dist/skins/skin-yellow-dark.min.css and b/public/css/dist/skins/skin-yellow-dark.min.css differ diff --git a/public/css/dist/skins/skin-yellow.css b/public/css/dist/skins/skin-yellow.css index 5424b7f75d..8aef4cb90e 100644 Binary files a/public/css/dist/skins/skin-yellow.css and b/public/css/dist/skins/skin-yellow.css differ diff --git a/public/css/dist/skins/skin-yellow.min.css b/public/css/dist/skins/skin-yellow.min.css index f64159f334..8aef4cb90e 100644 Binary files a/public/css/dist/skins/skin-yellow.min.css and b/public/css/dist/skins/skin-yellow.min.css differ diff --git a/public/js/build/app.js b/public/js/build/app.js index ef046b2919..59cb31aef5 100644 Binary files a/public/js/build/app.js and b/public/js/build/app.js differ diff --git a/public/js/build/vendor.js b/public/js/build/vendor.js index f511600bb9..31b1ae30a5 100644 Binary files a/public/js/build/vendor.js and b/public/js/build/vendor.js differ diff --git a/public/js/dist/all.js b/public/js/dist/all.js index 919a54bd67..253a5f16fb 100644 Binary files a/public/js/dist/all.js and b/public/js/dist/all.js differ diff --git a/public/js/dist/bootstrap-table.js b/public/js/dist/bootstrap-table.js index a2298ba8bd..c01fba3e19 100644 Binary files a/public/js/dist/bootstrap-table.js and b/public/js/dist/bootstrap-table.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index b865b26121..6c34028c75 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -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" } diff --git a/resources/assets/js/components/select2.vue b/resources/assets/js/components/select2.vue index 7b679800e9..cab9f35ca3 100644 --- a/resources/assets/js/components/select2.vue +++ b/resources/assets/js/components/select2.vue @@ -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() { diff --git a/resources/assets/js/snipeit.js b/resources/assets/js/snipeit.js index 70e4f80a8f..cf6e33066c 100755 --- a/resources/assets/js/snipeit.js +++ b/resources/assets/js/snipeit.js @@ -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(); + }); + } }) \ No newline at end of file diff --git a/resources/views/layouts/basic.blade.php b/resources/views/layouts/basic.blade.php index 1a56a77b0a..c3296cc66c 100644 --- a/resources/views/layouts/basic.blade.php +++ b/resources/views/layouts/basic.blade.php @@ -20,7 +20,6 @@ } }; - @livewireStyles @if (($snipeSettings) && ($snipeSettings->header_color)) @@ -75,7 +74,6 @@ @stack('js') - @livewireScripts diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index a9f547f4f5..826a4722f4 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -82,8 +82,6 @@ - @livewireStyles - @if (($snipeSettings) && ($snipeSettings->allow_user_skin==1) && Auth::check() && Auth::user()->present()->skin != '') @@ -947,7 +945,6 @@ {{-- Javascript files --}} - @@ -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 - diff --git a/resources/views/livewire/custom-field-set-default-values-for-model.blade.php b/resources/views/livewire/custom-field-set-default-values-for-model.blade.php index 19b2b4dbe3..706fb2b636 100644 --- a/resources/views/livewire/custom-field-set-default-values-for-model.blade.php +++ b/resources/views/livewire/custom-field-set-default-values-for-model.blade.php @@ -2,12 +2,12 @@
- {{ 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', '') !!}
diff --git a/resources/views/livewire/importer.blade.php b/resources/views/livewire/importer.blade.php index 60f4502b22..eaa790a8a8 100644 --- a/resources/views/livewire/importer.blade.php +++ b/resources/views/livewire/importer.blade.php @@ -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)

@@ -164,7 +164,7 @@

@if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 1 && $update) @@ -174,12 +174,12 @@ @endif @@ -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 ]) diff --git a/resources/views/livewire/login-form.blade.php b/resources/views/livewire/login-form.blade.php index 264361c133..0b3848cd5e 100644 --- a/resources/views/livewire/login-form.blade.php +++ b/resources/views/livewire/login-form.blade.php @@ -1,5 +1,5 @@
-
+ diff --git a/resources/views/livewire/slack-settings-form.blade.php b/resources/views/livewire/slack-settings-form.blade.php index a3c6ddc0fa..905916bb7d 100644 --- a/resources/views/livewire/slack-settings-form.blade.php +++ b/resources/views/livewire/slack-settings-form.blade.php @@ -13,7 +13,7 @@ @section('content')
- + {{csrf_field()}}
@@ -175,7 +175,7 @@ }); // Re-render select2 - window.livewire.hook('message.processed', function (el, component) { + Livewire.hook('message.processed', function (el, component) { $('.select2').select2(); }); }); diff --git a/resources/views/settings/labels.blade.php b/resources/views/settings/labels.blade.php index 46ce4fe610..4d811c7177 100644 --- a/resources/views/settings/labels.blade.php +++ b/resources/views/settings/labels.blade.php @@ -62,6 +62,8 @@ @if ($setting->label2_enable) + {{-- Yes, this is gross, but this is the *ONLY* place we use this! --}} + {{ \Livewire\Livewire::forceAssetInjection() }} diff --git a/routes/web.php b/routes/web.php index 4bc8b3bb58..1ce0fd2fee 100644 --- a/routes/web.php +++ b/routes/web.php @@ -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'); /* diff --git a/tests/Feature/Livewire/CategoryEditFormTest.php b/tests/Feature/Livewire/CategoryEditFormTest.php index 26719e4041..a439f544ac 100644 --- a/tests/Feature/Livewire/CategoryEditFormTest.php +++ b/tests/Feature/Livewire/CategoryEditFormTest.php @@ -2,7 +2,7 @@ namespace Tests\Feature\Livewire; -use App\Http\Livewire\CategoryEditForm; +use App\Livewire\CategoryEditForm; use Livewire\Livewire; use Tests\TestCase; diff --git a/webpack.mix.js b/webpack.mix.js index 122a605723..277543da36 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -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 */