Merge pull request #87 from apuc/add_a_test_task_completion_date_to_user_card
Add a test task completion date to user card
This commit is contained in:
		| @@ -6,7 +6,7 @@ $this->title = 'Календарь ДР'; | |||||||
| ?> | ?> | ||||||
| <?= \backend\widgets\Calendar::widget([ | <?= \backend\widgets\Calendar::widget([ | ||||||
|  |  | ||||||
|     'css' => '.success{color: orange;}', |     'css' => '.success{color: green;}', | ||||||
|  |  | ||||||
|     'button' => Html::a('<i class="fa fa-table" aria-hidden="true"></i> Таблица', |     'button' => Html::a('<i class="fa fa-table" aria-hidden="true"></i> Таблица', | ||||||
|         ['table'], ['class' => 'btn btn-primary',]), |         ['table'], ['class' => 'btn btn-primary',]), | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ class UserCardSearch extends UserCard | |||||||
|     { |     { | ||||||
|         return [ |         return [ | ||||||
|             [['id', 'gender', 'status'], 'integer'], |             [['id', 'gender', 'status'], 'integer'], | ||||||
|             [['fio', 'passport', 'photo', 'email', 'dob', 'created_at', 'updated_at', 'city'], 'safe'], |             [['fio', 'passport', 'photo', 'email', 'dob', 'created_at', 'updated_at', 'city', 'test_task_getting_date', 'test_task_complete_date'], 'safe'], | ||||||
|             ['skills', 'each', 'rule' => ['integer']], |             ['skills', 'each', 'rule' => ['integer']], | ||||||
|         ]; |         ]; | ||||||
|     } |     } | ||||||
| @@ -83,6 +83,8 @@ class UserCardSearch extends UserCard | |||||||
|             'city' => $this->city, |             'city' => $this->city, | ||||||
|             'created_at' => $this->created_at, |             'created_at' => $this->created_at, | ||||||
|             'updated_at' => $this->updated_at, |             'updated_at' => $this->updated_at, | ||||||
|  |             'test_task_getting_date' => $this->test_task_getting_date, | ||||||
|  |             'test_task_complete_date' => $this->test_task_complete_date, | ||||||
|         ]); |         ]); | ||||||
|  |  | ||||||
|         $query->andFilterWhere(['like', 'fio', $this->fio]) |         $query->andFilterWhere(['like', 'fio', $this->fio]) | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ use yii\widgets\ActiveForm; | |||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|     <div class="row" style="padding-bottom: 15px"> |     <div class="row" style="padding-bottom: 15px">add_a_test_task_completion_date_to_ucer_card | ||||||
|         <div class="imgUpload col-xs-6"> |         <div class="imgUpload col-xs-6"> | ||||||
|             <div class="media__upload_img"><img src="<?= $model->photo; ?>" width="100px"/></div> |             <div class="media__upload_img"><img src="<?= $model->photo; ?>" width="100px"/></div> | ||||||
|             <?php |             <?php | ||||||
| @@ -176,6 +176,28 @@ use yii\widgets\ActiveForm; | |||||||
|             'language' => 'ru', |             'language' => 'ru', | ||||||
|         ] |         ] | ||||||
|     ]); ?> |     ]); ?> | ||||||
|  |  | ||||||
|  |     <div class="row"> | ||||||
|  |         <div class="col-xs-6"> | ||||||
|  |             <?= $form->field($model, 'test_task_getting_date')->input( | ||||||
|  |                 'date', | ||||||
|  |                 [ | ||||||
|  |                     'language' => 'en', | ||||||
|  |                     "data-format" => "DD MMMM YYYY", | ||||||
|  |                 ] | ||||||
|  |             ) ?> | ||||||
|  |         </div> | ||||||
|  |         <div class="col-xs-6"> | ||||||
|  |             <?= $form->field($model, 'test_task_complete_date')->input( | ||||||
|  |                 'date', | ||||||
|  |                 [ | ||||||
|  |                     'language' => 'en', | ||||||
|  |                     "data-format" => "DD MMMM YYYY", | ||||||
|  |                 ] | ||||||
|  |             ) ?> | ||||||
|  |         </div> | ||||||
|  |     </div> | ||||||
|  |  | ||||||
|     <div class="row"> |     <div class="row"> | ||||||
|         <div class="col-xs-12"> |         <div class="col-xs-12"> | ||||||
|             <?= $form->field($model, 'achievements')->widget(Select2::class, |             <?= $form->field($model, 'achievements')->widget(Select2::class, | ||||||
|   | |||||||
| @@ -88,7 +88,15 @@ $this->params['breadcrumbs'][] = $this->title; | |||||||
|             [ |             [ | ||||||
|                 'attribute' => 'vc_text', |                 'attribute' => 'vc_text', | ||||||
|                 'format' => 'raw' |                 'format' => 'raw' | ||||||
|             ] |             ], | ||||||
|  |             [ | ||||||
|  |                 'attribute' => 'test_task_getting_date', | ||||||
|  |                 'format' => ['datetime', 'php:d.m.Y'] | ||||||
|  |             ], | ||||||
|  |             [ | ||||||
|  |                 'attribute' => 'test_task_complete_date', | ||||||
|  |                 'format' => ['datetime', 'php:d.m.Y'] | ||||||
|  |             ], | ||||||
|         ], |         ], | ||||||
|     ]) ?> |     ]) ?> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -378,6 +378,14 @@ | |||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .fully_day { | ||||||
|  |     background-color: #99ff99; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .empty_day { | ||||||
|  |     background-color: #ff9999; | ||||||
|  | } | ||||||
|  |  | ||||||
| .active_day { | .active_day { | ||||||
|     background: #cdcfce; |     background: #cdcfce; | ||||||
| } | } | ||||||
| @@ -384,6 +384,14 @@ | |||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .fully_day { | ||||||
|  |     background-color: #99ff99; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .empty_day { | ||||||
|  |     background-color: #ff9999; | ||||||
|  | } | ||||||
|  |  | ||||||
| .active_day { | .active_day { | ||||||
|     background: #cdcfce; |     background: #cdcfce; | ||||||
| } | } | ||||||
| @@ -151,7 +151,15 @@ class CalendarHelper { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     static _getCalendarDay(dayNum, className = ``, color = ``) { |     static _getCalendarDay(dayNum, className = ``, color = ``) { | ||||||
|         return `<div class="calendar__day ${className}"> |         let day = '' | ||||||
|  |         if (color === 'danger' && className !== 'inactive') { | ||||||
|  |             day = 'empty_day' | ||||||
|  |         } | ||||||
|  |         else if (color === 'success' && className !== 'inactive') { | ||||||
|  |             day = 'fully_day' | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         return `<div class="calendar__day ${className} ${day} "> | ||||||
|                 <span class="calendar__date ${color}">${dayNum}</span> |                 <span class="calendar__date ${color}">${dayNum}</span> | ||||||
|             </div>`; |             </div>`; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -36,6 +36,8 @@ use yii\helpers\ArrayHelper; | |||||||
|  * @property int $position_id |  * @property int $position_id | ||||||
|  * @property int $city |  * @property int $city | ||||||
|  * @property int $level |  * @property int $level | ||||||
|  |  * @property string $test_task_getting_date | ||||||
|  |  * @property string $test_task_complete_date | ||||||
|  * |  * | ||||||
|  * @property FieldsValue[] $fieldsValues |  * @property FieldsValue[] $fieldsValues | ||||||
|  * @property ProjectUser[] $projectUsers |  * @property ProjectUser[] $projectUsers | ||||||
| @@ -103,7 +105,7 @@ class UserCard extends \yii\db\ActiveRecord | |||||||
|         return [ |         return [ | ||||||
|             [['fio', 'status', 'gender', 'email', 'level', 'position_id'], 'required'], |             [['fio', 'status', 'gender', 'email', 'level', 'position_id'], 'required'], | ||||||
|             [['gender', 'status', 'position_id', 'id_user', 'level', 'years_of_exp'], 'integer'], |             [['gender', 'status', 'position_id', 'id_user', 'level', 'years_of_exp'], 'integer'], | ||||||
|             [['dob', 'created_at', 'updated_at', 'deleted_at', 'vc_text', 'vc_text_short'], 'safe'], |             [['dob', 'created_at', 'updated_at', 'deleted_at', 'vc_text', 'vc_text_short', 'test_task_getting_date', 'test_task_complete_date'], 'safe'], | ||||||
|             ['email', 'unique', 'message'=>'Почтовый адрес уже используется'], |             ['email', 'unique', 'message'=>'Почтовый адрес уже используется'], | ||||||
|             [['fio', 'passport', 'photo', 'email', 'resume', 'city', 'link_vk', 'link_telegram', 'specification'], 'string', 'max' => 255], |             [['fio', 'passport', 'photo', 'email', 'resume', 'city', 'link_vk', 'link_telegram', 'specification'], 'string', 'max' => 255], | ||||||
|             [['salary'], 'string', 'max' => 100], |             [['salary'], 'string', 'max' => 100], | ||||||
| @@ -140,7 +142,9 @@ class UserCard extends \yii\db\ActiveRecord | |||||||
|             'vc_text_short' => 'Резюме короткий текст', |             'vc_text_short' => 'Резюме короткий текст', | ||||||
|             'level' => 'Уровень', |             'level' => 'Уровень', | ||||||
|             'years_of_exp' => 'Лет опыта', |             'years_of_exp' => 'Лет опыта', | ||||||
|             'specification' => 'Спецификация' |             'specification' => 'Спецификация', | ||||||
|  |             'test_task_getting_date' => 'Дата получения тестового', | ||||||
|  |             'test_task_complete_date' => 'Дата выполнения тестового', | ||||||
|         ]; |         ]; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -0,0 +1,27 @@ | |||||||
|  | <?php | ||||||
|  |  | ||||||
|  | use yii\db\Migration; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Handles adding columns to table `{{%user_card}}`. | ||||||
|  |  */ | ||||||
|  | class m220307_081259_add_test_task_completion_date_column_to_user_card_table extends Migration | ||||||
|  | { | ||||||
|  |     /** | ||||||
|  |      * {@inheritdoc} | ||||||
|  |      */ | ||||||
|  |     public function safeUp() | ||||||
|  |     { | ||||||
|  |         $this->addColumn('user_card', 'test_task_getting_date', $this->date()->defaultValue(null)); | ||||||
|  |         $this->addColumn('user_card', 'test_task_complete_date', $this->date()->defaultValue(null)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * {@inheritdoc} | ||||||
|  |      */ | ||||||
|  |     public function safeDown() | ||||||
|  |     { | ||||||
|  |         $this->dropColumn('user_card', 'test_task_getting_date'); | ||||||
|  |         $this->dropColumn('user_card', 'test_task_complete_date'); | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										2070
									
								
								frontend-access.log
									
									
									
									
									
								
							
							
						
						
									
										2070
									
								
								frontend-access.log
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -15365,3 +15365,9 @@ Stack trace: | |||||||
| 2022/01/14 17:32:10 [error] 746#746: *663 FastCGI sent in stderr: "PHP message: PHP Warning:  Use of undefined constant IMG_GIF - assumed 'IMG_GIF' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_JPG - assumed 'IMG_JPG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_PNG - assumed 'IMG_PNG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_WBMP - assumed 'IMG_WBMP' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /api/template/get-template-list HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc" | 2022/01/14 17:32:10 [error] 746#746: *663 FastCGI sent in stderr: "PHP message: PHP Warning:  Use of undefined constant IMG_GIF - assumed 'IMG_GIF' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_JPG - assumed 'IMG_JPG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_PNG - assumed 'IMG_PNG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_WBMP - assumed 'IMG_WBMP' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /api/template/get-template-list HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc" | ||||||
| 2022/01/14 17:32:16 [error] 746#746: *663 FastCGI sent in stderr: "PHP message: PHP Warning:  Use of undefined constant IMG_GIF - assumed 'IMG_GIF' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_JPG - assumed 'IMG_JPG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_PNG - assumed 'IMG_PNG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_WBMP - assumed 'IMG_WBMP' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /api/template/get-template-list?document_type=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc" | 2022/01/14 17:32:16 [error] 746#746: *663 FastCGI sent in stderr: "PHP message: PHP Warning:  Use of undefined constant IMG_GIF - assumed 'IMG_GIF' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_JPG - assumed 'IMG_JPG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_PNG - assumed 'IMG_PNG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_WBMP - assumed 'IMG_WBMP' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /api/template/get-template-list?document_type=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc" | ||||||
| 2022/01/14 17:32:22 [error] 746#746: *663 FastCGI sent in stderr: "PHP message: PHP Warning:  Use of undefined constant IMG_GIF - assumed 'IMG_GIF' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_JPG - assumed 'IMG_JPG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_PNG - assumed 'IMG_PNG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_WBMP - assumed 'IMG_WBMP' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /api/template/get-template-list?document_type=2 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc" | 2022/01/14 17:32:22 [error] 746#746: *663 FastCGI sent in stderr: "PHP message: PHP Warning:  Use of undefined constant IMG_GIF - assumed 'IMG_GIF' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_JPG - assumed 'IMG_JPG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_PNG - assumed 'IMG_PNG' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Warning:  Use of undefined constant IMG_WBMP - assumed 'IMG_WBMP' (this will throw an Error in a future version of PHP) in /var/www/guild.loc/common/config/main.php on line 42PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /api/template/get-template-list?document_type=2 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc" | ||||||
|  | 2022/03/08 09:58:06 [error] 853#853: *1 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /reports/reports/index?id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/reports/reports/view?id=5" | ||||||
|  | 2022/03/08 09:58:06 [error] 853#853: *1 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /debug/default/toolbar?tag=6226fe7e0e530 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/reports/reports/index?id=5" | ||||||
|  | 2022/03/08 09:58:08 [error] 853#853: *1 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /gii/crud HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/gii/crud" | ||||||
|  | 2022/03/08 09:58:09 [error] 852#852: *5 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /debug/default/toolbar?tag=6226fe80ac65e HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/gii/crud" | ||||||
|  | 2022/03/08 09:58:18 [error] 853#853: *8 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/reports/reports/index?id=5" | ||||||
|  | 2022/03/08 09:58:19 [error] 853#853: *8 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: telegramBotToken in /var/www/guild.loc/frontend/config/main.php on line 102PHP message: PHP Notice:  Undefined index: telegramBotChatId in /var/www/guild.loc/frontend/config/main.php on line 103" while reading response header from upstream, client: 127.0.0.1, server: guild.loc, request: "GET /debug/default/toolbar?tag=6226fe8aa581c HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 GitHub
						GitHub