-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: Various corrections,improvements and filesystems cleanup
- Loading branch information
Todd Cytra
committed
Jan 21, 2024
1 parent
2856e86
commit 29e23b1
Showing
25 changed files
with
215 additions
and
353 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use Enraiged\Enums\FileTypes as Enum; | ||
|
||
class FileTypes extends Enum | ||
{ | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,8 +41,9 @@ public function getFillable() | |
'first_name', | ||
'last_name', | ||
'gender', | ||
'phone', | ||
'salut', | ||
'title' | ||
'title', | ||
]; | ||
} | ||
} |
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
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
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
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
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
2 changes: 1 addition & 1 deletion
2
.../Users/Services/UserProfileAttributes.php → ...ervices/Support/UserProfileAttributes.php
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<template> | ||
<div class="actions flex"> | ||
<span class="action" v-for="(action, index) in actions" :key="index"> | ||
<primevue-button class="p-button-rounded p-button-sm p-button-text" | ||
:class="action.class" | ||
:disabled="action.disabled || disabled" | ||
:icon="action.icon" | ||
:key="index" | ||
v-tooltip.top="i18n(action.tooltip || index)" | ||
@click="actionHandler(action, index)"/> | ||
</span> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import PrimevueButton from 'primevue/button/Button.vue'; | ||
import PrimevueTooltip from 'primevue/tooltip/tooltip.esm.js'; | ||
export default { | ||
components: { | ||
PrimevueButton, | ||
}, | ||
directives: { | ||
tooltip: PrimevueTooltip, | ||
}, | ||
inject: [ | ||
'back', | ||
'errorHandler', | ||
'flash', | ||
'flashSuccess', | ||
'i18n', | ||
'isSuccess', | ||
'initState', | ||
'meta', | ||
], | ||
props: { | ||
actions: { | ||
type: Object, | ||
required: true, | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
methods: { | ||
actionHandler(action, index, confirmed) { | ||
if (typeof action.uri === 'object') { | ||
const method = typeof action.uri.method !== 'undefined' | ||
? action.uri.method | ||
: 'get'; | ||
if (action.confirm && confirmed !== true) { | ||
this.$confirm.require({ | ||
message: typeof action.confirm === 'string' | ||
? this.i18n(action.confirm) | ||
: this.i18n('Are you sure you want to proceed?'), | ||
header: this.i18n('Please confirm'), | ||
icon: 'pi pi-exclamation-triangle', | ||
acceptClass: 'p-button-danger', | ||
acceptLabel: this.i18n('Yes'), | ||
rejectLabel: this.i18n('No'), | ||
accept: () => this.actionHandler(action, index, true), | ||
}); | ||
} else if (typeof action.method !== 'undefined' && action.method === 'emit') { | ||
const emit = action.emit || `action:${index}`; | ||
this.$emit(emit, action); | ||
} else if (typeof action.uri.api !== 'undefined' && action.uri.api === true) { | ||
this.axios[method](action.uri.route) | ||
.then(({ data, status }) => { | ||
if (this.isSuccess(status)) { | ||
if (action.emit) { | ||
this.$emit('action', action); | ||
} | ||
if (data.success) { | ||
this.flashSuccess(data.success); | ||
} else | ||
if (data.message) { | ||
this.flash(data.message); | ||
} | ||
if (status === 205) { | ||
this.initState(); | ||
} | ||
if (data.redirect) { | ||
this.$inertia.get(data.redirect); | ||
} else | ||
if (action.uri.redirect) { | ||
if (action.uri.redirect === 'back') { | ||
this.back(); | ||
} | ||
if (action.uri.redirect === 'default') { | ||
this.actionHandler(this.default); | ||
} | ||
//if (action.uri.redirect.match(/[a-z]+/)) { | ||
// | ||
//} | ||
} | ||
} | ||
}) | ||
.catch((error) => this.errorHandler(error)); | ||
} | ||
} else { | ||
if (action.emit) { | ||
this.$emit('action', action); | ||
} | ||
if (typeof action.uri === 'string') { | ||
this.$inertia.get(action.uri); | ||
} | ||
} | ||
}, | ||
}, | ||
}; | ||
</script> |
Oops, something went wrong.