mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
Build modified streamline images
The official image from streamline does not currently work for the arm64 platform. As a temporary measure, the source code and docker build scripts have been lifted from the official images and are used to build locally. Some additional modifications are made to reduce overall image size, these are documented in docker/README.md
This commit is contained in:
Executable
+89
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
namespace Streamline\Models;
|
||||
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
use OwenIt\Auditing\Contracts\Auditable;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
//use Laravel\Passport\HasApiTokens;
|
||||
|
||||
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;
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'first_name', 'last_name', 'username', 'phone', 'position_id', 'email', 'photo', 'council_registration', 'willing_to_donate', 'last_donation_date', 'council_id', 'registration_number', 'expiry_date', 'password',
|
||||
'pin', 'blood_group_id', 'created_by', 'updated_by', 'last_seen'
|
||||
];
|
||||
public $timestamps = true;
|
||||
protected $rememberTokenName = false;
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token'
|
||||
];
|
||||
protected $casts = [
|
||||
'expiry_date' => 'datetime',
|
||||
'last_donation_date' => 'datetime'
|
||||
];
|
||||
|
||||
/*
|
||||
* Below are some mutators
|
||||
*/
|
||||
|
||||
public function setExpiryDateAttribute($expiry_date) {
|
||||
$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) {
|
||||
$this->attributes['last_donation_date'] = empty($last_donation_date) ? NULL : Carbon::createFromFormat('d/m/Y', $last_donation_date)->format('Y-m-d');
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 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;
|
||||
}
|
||||
|
||||
/*
|
||||
* Other methods
|
||||
*/
|
||||
|
||||
public static function resolveId() {
|
||||
return Auth::check() ? Auth::user()->getAuthIdentifier() : null;
|
||||
}
|
||||
|
||||
public function passwordSecurity()
|
||||
{
|
||||
return $this->hasOne('Streamline\Models\PasswordSecurity');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user