update upload ảnh nhân viên

This commit is contained in:
2020-10-26 11:07:13 +07:00
parent 7204a46da7
commit e97496a628
6 changed files with 2126 additions and 2053 deletions

View File

@@ -16,6 +16,7 @@ use Yii;
* @property int $birthday
* @property string $email
* @property string $phone
* @property string $image
* @property int $date_in
* @property string $address
* @property int $created_at
@@ -41,7 +42,7 @@ class Staff extends \yii\db\ActiveRecord {
return [
[['code', 'name', 'gender'], 'required'],
[['code', 'card_number', 'department_id', 'birthday', 'date_in', 'created_at', 'modified_at', 'card_register_time', 'schedule_id'], 'integer'],
[['address', 'door_access', 'door_access_old'], 'string'],
[['address', 'door_access', 'door_access_old', 'image'], 'string'],
[['name', 'email'], 'string', 'max' => 100],
[['gender'], 'string', 'max' => 10],
[['phone'], 'string', 'max' => 20],
@@ -92,7 +93,8 @@ class Staff extends \yii\db\ActiveRecord {
"address" => $data["Address"],
"created_at" => time(),
"modified_at" => time(),
"card_register_time" => time()
"card_register_time" => time(),
"image" => $data['Image']
], '');
if ($r) {
try {