This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// open modal from livewire component | |
$this->dispatch('open-modal', name: 'user-details'); | |
// close modal | |
$this->dispatch('close-modal'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createFormData(object: Object, form?: FormData, namespace?: string): FormData { | |
const formData = form || new FormData(); | |
for (let property in object) { | |
if (!object.hasOwnProperty(property) || !object[property]) { | |
continue; | |
} | |
const formKey = namespace ? `${namespace}[${property}]` : property; | |
if (object[property] instanceof Date) { | |
formData.append(formKey, object[property].toISOString()); | |
} else if (typeof object[property] === 'object' && !(object[property] instanceof File)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// takes a {} object and returns a FormData object | |
var objectToFormData = function(obj, form, namespace) { | |
var fd = form || new FormData(); | |
var formKey; | |
for(var property in obj) { | |
if(obj.hasOwnProperty(property)) { | |
if(namespace) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { JWT_OPTIONS, JwtInterceptor, JwtModule } from '@auth0/angular-jwt'; | |
import { AuthorizationService } from './authorization.service'; | |
import { environment } from '../../environments/environment'; | |
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; | |
import { RefreshTokenInterceptor } from './refresh-token-interceptor'; | |
function jwtOptionsFactory (authorizationService: AuthorizationService) { | |
return { |