mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
Import latest app updates from streamline
An updated set of source files and initialization was provided by streamline to address issues observed during initial testing. These files have been updated in order to generate a new set of app images.
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Streamline\Models;
|
||||
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
use OwenIt\Auditing\Contracts\Auditable;
|
||||
use Illuminate\Support\Carbon;
|
||||
@@ -13,12 +14,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class User extends Authenticatable implements Auditable {
|
||||
|
||||
// use HasApiTokens;
|
||||
use Notifiable;
|
||||
use HasRoles;
|
||||
/*
|
||||
* use laravel-auditing to track database changes
|
||||
*/
|
||||
use \OwenIt\Auditing\Auditable;
|
||||
|
||||
use SoftDeletes;
|
||||
@@ -50,12 +47,16 @@ class User extends Authenticatable implements Auditable {
|
||||
/*
|
||||
* Below are some mutators
|
||||
*/
|
||||
private string $first_name;
|
||||
private string $last_name;
|
||||
|
||||
public function setExpiryDateAttribute($expiry_date) {
|
||||
public function setExpiryDateAttribute($expiry_date): void
|
||||
{
|
||||
$this->attributes['expiry_date'] = empty($expiry_date) ? NULL : Carbon::createFromFormat('d/m/Y', $expiry_date)->format('Y-m-d');
|
||||
}
|
||||
|
||||
public function setLastDonationDateAttribute($last_donation_date) {
|
||||
public function setLastDonationDateAttribute($last_donation_date): void
|
||||
{
|
||||
$this->attributes['last_donation_date'] = empty($last_donation_date) ? NULL : Carbon::createFromFormat('d/m/Y', $last_donation_date)->format('Y-m-d');
|
||||
}
|
||||
|
||||
@@ -63,20 +64,17 @@ class User extends Authenticatable implements Auditable {
|
||||
* Accessors
|
||||
*/
|
||||
|
||||
public function getExpiryDateAttribute($expiry_date) {
|
||||
$slash_date = $expiry_date == NULL ? '' : Carbon::createFromFormat('Y-m-d', $expiry_date)->format('d/m/Y');
|
||||
return $slash_date;
|
||||
public function getExpiryDateAttribute($expiry_date): string
|
||||
{
|
||||
return $expiry_date == NULL ? '' : Carbon::createFromFormat('Y-m-d', $expiry_date)->format('d/m/Y');
|
||||
}
|
||||
|
||||
public function getLastDonationDateAttribute($last_donation_date) {
|
||||
$slash_date = '';//$last_donation_date == NULL ? '' : Carbon::createFromFormat('Y-m-d', $last_donation_date)->format('d/m/Y');
|
||||
return $slash_date;
|
||||
public function getLastDonationDateAttribute($last_donation_date): string
|
||||
{
|
||||
//$last_donation_date == NULL ? '' : Carbon::createFromFormat('Y-m-d', $last_donation_date)->format('d/m/Y');
|
||||
return '';
|
||||
}
|
||||
|
||||
/*
|
||||
* Other methods
|
||||
*/
|
||||
|
||||
public static function resolveId() {
|
||||
return Auth::check() ? Auth::user()->getAuthIdentifier() : null;
|
||||
}
|
||||
@@ -86,4 +84,9 @@ class User extends Authenticatable implements Auditable {
|
||||
return $this->hasOne('Streamline\Models\PasswordSecurity');
|
||||
}
|
||||
|
||||
public function getFullNameAttribute(): string
|
||||
{
|
||||
return $this->first_name . ' ' . $this->last_name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user