This commit is contained in:
andrey 2022-10-26 13:18:23 +03:00
commit 7db30b4d90
74 changed files with 9817 additions and 933 deletions

View File

@ -21,7 +21,14 @@ $this->params['breadcrumbs'][] = $this->title;
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'id',
[
'attribute' => 'img',
'format' => 'raw',
'value' => function ($model) {
return Html::tag('img', null, ['src' => $model->img, 'width' => '100px']);
}
],
'title',
'slug',
'description',

View File

@ -2,24 +2,20 @@
namespace backend\modules\card\controllers;
use common\classes\Debug;
use common\models\AchievementUserCard;
use common\models\AdditionalFields;
use common\models\CardSkill;
use common\Models\ChangeHistory;
use common\models\User;
use common\models\FieldsValue;
use common\models\FieldsValueNew;
use common\models\Status;
use Yii;
use backend\modules\card\models\UserCard;
use backend\modules\card\models\UserCardSearch;
use common\models\AchievementUserCard;
use common\models\CardSkill;
use common\models\FieldsValueNew;
use common\models\User;
use kartik\mpdf\Pdf;
use PhpOffice\PhpWord\PhpWord;
use Yii;
use yii\data\ActiveDataProvider;
use yii\db\Expression;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* UserCardController implements the CRUD actions for UserCard model.
@ -205,4 +201,56 @@ class UserCardController extends Controller
throw new NotFoundHttpException('The requested page does not exist.');
}
public function actionDownloadResume($id, $pdf = false)
{
$model = $this->findModel($id);
if ($pdf) {
self::getResumePdf($model);
}
self::getResumeDocx($model);
}
private function getResumePdf(UserCard $model)
{
$pdf = new Pdf(); // or new Pdf();
$mpdf = $pdf->api; // fetches mpdf api
$mpdf->SetHeader('Resume ' . $model->fio . '||Generated At: ' . date("d/m/Y")); // call methods or set any properties
$mpdf->SetFooter('{PAGENO}');
$mpdf->WriteHtml($model->vc_text); // call mpdf write html
echo $mpdf->Output("Resume - {$model->fio}", 'D'); // call the mpdf api output as needed
}
private function getResumeDocx(UserCard $model)
{
$phpWord = new PhpWord();
$sectionStyle = array(
'orientation' => 'portrait',
'marginTop' => \PhpOffice\PhpWord\Shared\Converter::pixelToTwip(10),
'marginLeft' => 600,
'marginRight' => 600,
'colsNum' => 1,
'pageNumberingStart' => 1,
'borderBottomSize'=>100,
'borderBottomColor'=>'C0C0C0'
);
$section = $phpWord->addSection($sectionStyle);
$text = $model->vc_text;
$fontStyle = array('name'=>'Times New Roman', 'size'=>14, 'color'=>'000000', 'bold'=>FALSE, 'italic'=>FALSE);
$parStyle = array('align'=>'both','spaceBefore'=>10);
$section->addText(htmlspecialchars($text), $fontStyle,$parStyle);
header("Content-Type: application/msword");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment;filename=Resume - {$model->fio}.docx");
header('Cache-Control: max-age=0');
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
ob_clean();
$objWriter->save("php://output");
exit;
}
}

View File

@ -1,7 +1,8 @@
<?php
use yii\grid\GridView;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\GridView;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
@ -100,6 +101,11 @@ $this->params['breadcrumbs'][] = $this->title;
],
]) ?>
<p>
<?= Html::a('Resume pdf', ['download-resume', 'id' => $model->id, 'pdf' => true], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Resume docx', ['download-resume', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
</p>
<h2>Навыки</h2>
<?php foreach ($skills as $skill) : ?>
<span class="btn btn-default btn-sm"><?= $skill['skill']->name; ?></span>

View File

@ -2,6 +2,8 @@
namespace backend\modules\document\controllers;
use PhpOffice\PhpWord\Exception\CopyFileException;
use PhpOffice\PhpWord\Exception\CreateTemporaryFileException;
use Yii;
use backend\modules\document\models\Document;
use backend\modules\document\models\DocumentSearch;
@ -10,7 +12,8 @@ use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use common\services\DocumentService;
use common\services\DocumentFileService;
use yii\web\Response;
/**
* DocumentController implements the CRUD actions for Document model.
@ -142,10 +145,15 @@ class DocumentController extends Controller
}
public function actionCreateDocument($id)
/**
* @throws CopyFileException
* @throws NotFoundHttpException
* @throws CreateTemporaryFileException
*/
public function actionCreateDocument($id): Response
{
if(!empty($this->findModel($id)->template->template_file_name)){
$documentService = new DocumentService($id);
$documentService = new DocumentFileService($id);
$documentService->setFields();
$documentService->downloadDocument();
}

View File

@ -33,11 +33,11 @@ $this->params['breadcrumbs'][] = $this->title;
'id',
[
'attribute' => 'field_id',
'value' => ArrayHelper::getValue($model, 'field.title') // AnswerHelper::answerFlagLabel($model->answer_flag),
'value' => ArrayHelper::getValue($model, 'field.title')
],
[
'attribute' => 'document_id',
'value' => ArrayHelper::getValue($model, 'document.title') // AnswerHelper::answerFlagLabel($model->answer_flag),
'value' => ArrayHelper::getValue($model, 'document.title')
],
'value',
],

View File

@ -4,7 +4,7 @@ namespace backend\modules\questionnaire\controllers;
use backend\modules\questionnaire\models\Questionnaire;
use backend\modules\questionnaire\models\QuestionnaireCategory;
use common\helpers\ScoreCalculatorHelper;
use common\services\ScoreCalculatorService;
use Yii;
use backend\modules\questionnaire\models\UserQuestionnaire;
use backend\modules\questionnaire\models\UserQuestionnaireSearch;
@ -169,7 +169,7 @@ class UserQuestionnaireController extends Controller
public function actionRateResponses($id)
{
$user_questionnaire = $this->findModel($id);
ScoreCalculatorHelper::rateResponses($user_questionnaire);
ScoreCalculatorService::rateResponses($user_questionnaire);
return $this->actionView($id);
}
@ -177,7 +177,7 @@ class UserQuestionnaireController extends Controller
public function actionCalculateScore($id)
{
$user_questionnaire = $this->findModel($id);
ScoreCalculatorHelper::calculateScore($user_questionnaire);
ScoreCalculatorService::calculateScore($user_questionnaire);
return $this->actionView($id);
}

View File

@ -4,7 +4,6 @@ namespace backend\modules\questionnaire\models;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\questionnaire\models\UserQuestionnaire;
/**
* UserQuestionnaireSearch represents the model behind the search form of `backend\modules\questionnaire\models\UserQuestionnaire`.
@ -18,7 +17,7 @@ class UserQuestionnaireSearch extends UserQuestionnaire
{
return [
[['id', 'questionnaire_id', 'user_id', 'score', 'status'], 'integer'],
[['uuid', 'created_at', 'updated_at'], 'safe'],
[['uuid', 'created_at', 'updated_at', 'testing_date'], 'safe'],
[['percent_correct_answers'], 'number'],
];
}
@ -67,6 +66,7 @@ class UserQuestionnaireSearch extends UserQuestionnaire
'score' => $this->score,
'status' => $this->status,
'percent_correct_answers' => $this->percent_correct_answers,
'testing_date' => $this->testing_date,
]);
$query->andFilterWhere(['like', 'uuid', $this->uuid]);

View File

@ -47,7 +47,7 @@ $this->params['breadcrumbs'][] = $this->title;
'format' => 'raw',
'filter' => AnswerHelper::answerFlagsList(),
'value' => function ($model) {
return AnswerHelper::answerFlagLabel($model->answer_flag);
return AnswerHelper:: answerFlagLabel($model->answer_flag);
},
],
[

View File

@ -33,6 +33,8 @@ use yii\widgets\ActiveForm;
<?php // echo $form->field($model, 'percent_correct_answers') ?>
<?php // echo $form->field($model, 'testing_date') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>

View File

@ -1,8 +1,7 @@
<?php
use common\helpers\StatusHelper;
use common\helpers\UserQuestionnaireStatusHelper;
use common\models\User;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\grid\GridView;
use backend\modules\questionnaire\models\Questionnaire;
@ -46,13 +45,14 @@ $this->params['breadcrumbs'][] = $this->title;
[
'attribute' => 'status',
'format' => 'raw',
'filter' => StatusHelper::statusList(),
'filter' => UserQuestionnaireStatusHelper::statusList(),
'value' => function ($model) {
return StatusHelper::statusLabel($model->status);
return UserQuestionnaireStatusHelper::statusLabel($model->status);
},
],
'created_at',
'updated_at',
'testing_date',
['class' => 'yii\grid\ActionColumn'],
],

View File

@ -1,8 +1,8 @@
<?php
use common\helpers\ScoreCalculatorHelper;
use common\services\ScoreCalculatorService;
use common\helpers\AnswerHelper;
use common\helpers\StatusHelper;
use common\helpers\UserQuestionnaireStatusHelper;
use yii\bootstrap\Modal;
use yii\grid\GridView;
use yii\helpers\ArrayHelper;
@ -23,20 +23,8 @@ $this->params['breadcrumbs'][] = ['label' => 'User Questionnaires', 'url' => ['i
$this->params['breadcrumbs'][] = $this->title;
YiiAsset::register($this);
?>
<?php
//$this->registerJs(
// '$("document").ready(function(){
// $("#new_note").on("pjax:end", function() {
// $.pjax.reload({container:"#user_responses"}); //Reload GridView
// });
// });'
//);
?>
<div class="user-questionnaire-view">
<!-- --><?php //var_dump($model->setPercentCorrectAnswers(4)); die();?>
<p>
<?= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
@ -73,10 +61,11 @@ YiiAsset::register($this);
[
'attribute' => 'status',
'format' => 'raw',
'value' => StatusHelper::statusLabel($model->status),
'value' => UserQuestionnaireStatusHelper::statusLabel($model->status),
],
'created_at',
'updated_at',
'testing_date',
],
]) ?>
@ -97,7 +86,7 @@ YiiAsset::register($this);
'class' => 'btn btn-success',
],
]);
if(ScoreCalculatorHelper::checkAnswerFlagsForNull($model))
if(ScoreCalculatorService::checkAnswerFlagsForNull($model))
{
echo 'Ответы проверены. Посчитать баллы?';
echo Html::a('Посчитать баллы', ['calculate-score', 'id' => $model->id], [
@ -140,7 +129,7 @@ YiiAsset::register($this);
'attribute' => 'answer_flag',
'format' => 'raw',
'value' => function ($model) {
return AnswerHelper::answerStatusLabel($model->answer_flag);
return AnswerHelper::userResponseLabel($model->answer_flag);
},
],
@ -168,5 +157,4 @@ YiiAsset::register($this);
]);
?>
<?php Pjax::end(); ?>
</div>

View File

@ -38,12 +38,19 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'response_body')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'answer_flag')->dropDownList(
AnswerHelper::answerFlagsList(),
[
'prompt' => 'Выберите'
]
) ?>
<?= $form->field($model, 'answer_flag')->dropDownList([
'0.0' => 'Ошибочный',
'0.1' => '10%',
'0.2' => '20%',
'0.3' => '30%',
'0.4' => '40%',
'0.5' => '50%',
'0.6' => '60%',
'0.7' => '70%',
'0.8' => '80%',
'0.9' => '90%',
'1' => '100%',
]); ?>
<?= $form->field($model, 'user_questionnaire_uuid')->textInput(['maxlength' => true]) ?>

View File

@ -20,13 +20,6 @@ $this->params['breadcrumbs'][] = $this->title;
<?= Html::a('Новый ответ пользователя', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?php
//echo $this->render('_search_by_questionnaire', [
// 'model' => $searchModel,
// ])
?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
@ -50,7 +43,7 @@ $this->params['breadcrumbs'][] = $this->title;
'format' => 'raw',
'filter' => AnswerHelper::answerFlagsList(),
'value' => function ($model) {
return AnswerHelper::answerStatusLabel($model->answer_flag);
return AnswerHelper::userResponseLabel($model->answer_flag);
},
],
[

View File

@ -44,7 +44,7 @@ YiiAsset::register($this);
[
'attribute' => 'answer_flag',
'format' => 'raw',
'value' => AnswerHelper::answerFlagLabel($model->answer_flag),
'value' => AnswerHelper::userResponseLabel($model->answer_flag),
],
'user_questionnaire_uuid',
],

View File

@ -12,6 +12,14 @@ echo GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'format' => 'raw',
'attribute' => 'user_card_id',
'value' => function ($model) {
return Html::a(Reports::getFio($model) . ' ' . Html::tag('i', null, ['class' => 'far fa-calendar-alt']),
\yii\helpers\Url::base(true) . '/reports/reports/calendar?user_id=' . $model['user_card_id'], ['data-pjax' => 0]);
},
],
[
'attribute' => 'today',
'format' => 'raw',
@ -30,14 +38,6 @@ echo GridView::widget([
],
'difficulties',
'tomorrow',
[
'format' => 'raw',
'attribute' => 'user_card_id',
'value' => function ($model) {
return Html::a(Reports::getFio($model) . ' ' . Html::tag('i', null, ['class' => 'far fa-calendar-alt']),
\yii\helpers\Url::base(true) . '/reports/reports/calendar?user_id=' . $model['user_card_id'], ['data-pjax' => 0]);
},
],
[
'class' => 'yii\grid\ActionColumn',
'urlCreator' => function ($action, $model, $key, $index) {

View File

@ -0,0 +1,24 @@
<?php
namespace backend\modules\test;
/**
* test module definition class
*/
class Test extends \yii\base\Module
{
/**
* {@inheritdoc}
*/
public $controllerNamespace = 'backend\modules\test\controllers';
/**
* {@inheritdoc}
*/
public function init()
{
parent::init();
// custom initialization code goes here
}
}

View File

@ -0,0 +1,127 @@
<?php
namespace backend\modules\test\controllers;
use Yii;
use backend\modules\test\models\TestTask;
use backend\modules\test\models\TestTaskSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* TestTaskController implements the CRUD actions for TestTask model.
*/
class TestTaskController extends Controller
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all TestTask models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new TestTaskSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single TestTask model.
* @param integer $id
* @return mixed
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new TestTask model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new TestTask();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
}
return $this->render('create', [
'model' => $model,
]);
}
/**
* Updates an existing TestTask model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
}
return $this->render('update', [
'model' => $model,
]);
}
/**
* Deletes an existing TestTask model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the TestTask model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return TestTask the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = TestTask::findOne($id)) !== null) {
return $model;
}
throw new NotFoundHttpException('The requested page does not exist.');
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace backend\modules\test\models;
class TestTask extends \common\models\TestTask
{
}

View File

@ -0,0 +1,71 @@
<?php
namespace backend\modules\test\models;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\test\models\TestTask;
/**
* TestTaskSearch represents the model behind the search form of `backend\modules\test\models\TestTask`.
*/
class TestTaskSearch extends TestTask
{
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['id', 'level', 'status'], 'integer'],
[['description', 'link'], 'safe'],
];
}
/**
* {@inheritdoc}
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = TestTask::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'level' => $this->level,
'status' => $this->status,
]);
$query->andFilterWhere(['like', 'description', $this->description])
->andFilterWhere(['like', 'link', $this->link]);
return $dataProvider;
}
}

View File

@ -0,0 +1,38 @@
<?php
use common\helpers\StatusHelper;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\test\models\TestTask */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="test-task-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'description')->textarea(['rows' => 4]) ?>
<?= $form->field($model, 'link')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'level')->dropDownList(
backend\modules\test\models\TestTask::getLevelList(),
['prompt' => '...']
) ?>
<?= $form->field($model, 'status')->dropDownList(
StatusHelper::statusList(),
[
'prompt' => 'Выберите'
]
) ?>
<div class="form-group">
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@ -0,0 +1,35 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\test\models\TestTaskSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="test-task-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'id') ?>
<?= $form->field($model, 'description') ?>
<?= $form->field($model, 'link') ?>
<?= $form->field($model, 'level') ?>
<?= $form->field($model, 'status') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@ -0,0 +1,18 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\test\models\TestTask */
$this->title = 'Добавить тестовое задание';
$this->params['breadcrumbs'][] = ['label' => 'Test Tasks', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="test-task-create">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@ -0,0 +1,57 @@
<?php
use backend\modules\test\models\TestTask;
use common\helpers\StatusHelper;
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\test\models\TestTaskSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Тестовые задания';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="test-task-index">
<p>
<?= Html::a('Создать', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'id',
'description',
[
'attribute' => 'link',
'value' => function ($model) {
return Html::a(Html::encode($model->link), Url::to($model->link));
},
'format' => 'raw',
],
[
'attribute' => 'level',
'format' => 'raw',
'filter' => TestTask::getLevelList(),
'value' => function($model){
return TestTask::getLevelLabel($model->level);
}
],
[
'attribute' => 'status',
'format' => 'raw',
'filter' => StatusHelper::statusList(),
'value' => function($model){
return StatusHelper::statusLabel($model->status);
}
],
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>

View File

@ -0,0 +1,19 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\test\models\TestTask */
$this->title = 'Изменить тестовое задание';
$this->params['breadcrumbs'][] = ['label' => 'Test Tasks', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="test-task-update">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@ -0,0 +1,70 @@
<?php
use backend\modules\test\models\TestTask;
use common\helpers\StatusHelper;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\test\models\TestTask */
$this->title = cut_title($model->description);
$this->params['breadcrumbs'][] = ['label' => 'Test Tasks', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
function cut_title($str)
{
if(strlen($str) > 35){
return mb_substr($str, 0, 35, 'UTF-8') . '...';
}
return $str;
}
?>
<div class="test-task-view">
<p>
<?= Html::a('Список', ['index', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'description',
[
'attribute' => 'link',
'value' => function ($model) {
return Html::a(Html::encode($model->link), Url::to($model->link));
},
'format' => 'raw',
],
[
'attribute' => 'level',
'format' => 'raw',
'filter' => TestTask::getLevelList(),
'value' => function($model){
return TestTask::getLevelLabel($model->level);
}
],
[
'attribute' => 'status',
'format' => 'raw',
'filter' => StatusHelper::statusList(),
'value' => function($model){
return StatusHelper::statusLabel($model->status);
}
],
],
]) ?>
</div>

View File

@ -32,6 +32,7 @@
[
'label' => 'Профили', 'icon' => 'address-book-o', 'url' => '#', 'active' => \Yii::$app->controller->id == 'user-card',
'items' => $menuItems,
'visible' => Yii::$app->user->can('confidential_information')
],
[
'label' => 'Сотрудники', 'icon' => 'users', 'url' => '#',
@ -85,8 +86,8 @@
['label' => 'Достижения', 'icon' => 'trophy', 'url' => ['/achievements/achievements'], 'active' => \Yii::$app->controller->id == 'achievements', 'visible' => Yii::$app->user->can('confidential_information')],
['label' => 'Доступы', 'icon' => 'key', 'url' => ['/accesses/accesses'], 'active' => \Yii::$app->controller->id == 'accesses', 'visible' => Yii::$app->user->can('confidential_information')],
['label' => 'Заметки', 'icon' => 'sticky-note', 'url' => ['/notes/notes'], 'active' => \Yii::$app->controller->id == 'notes', 'visible' => Yii::$app->user->can('confidential_information')],
['label' => 'Календарь ДР', 'icon' => 'calendar', 'url' => ['/calendar/calendar'], 'active' => \Yii::$app->controller->id == 'calendar', 'visible' => Yii::$app->user->can('confidential_information')],
['label' => 'Отчеты', 'icon' => 'list-alt', 'url' => ['/reports/reports'], 'active' => \Yii::$app->controller->id == 'reports', 'visible' => Yii::$app->user->can('confidential_information')],
['label' => 'Календарь ДР', 'icon' => 'calendar-check-o', 'url' => ['/calendar/calendar'], 'active' => \Yii::$app->controller->id == 'calendar', 'visible' => Yii::$app->user->can('confidential_information')],
['label' => 'Отчеты', 'icon' => 'calendar', 'url' => ['/reports/reports'], 'active' => \Yii::$app->controller->id == 'reports', 'visible' => Yii::$app->user->can('confidential_information')],
['label' => 'Опции', 'icon' => 'list-alt', 'url' => ['/options/options'], 'active' => \Yii::$app->controller->id == 'options', 'visible' => Yii::$app->user->can('confidential_information')],
[
'label' => 'Запрос интервью (' . \common\models\InterviewRequest::getNewCount() . ')',
@ -109,6 +110,8 @@
],
'visible' => Yii::$app->user->can('confidential_information')
],
['label' => 'Тестовые задания', 'icon' => 'file-text-o', 'url' => ['/test/test-task'], 'active' => \Yii::$app->controller->id == 'options', 'visible' => Yii::$app->user->can('confidential_information')],
/*['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii']],
['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug']],

View File

@ -23,7 +23,7 @@ class DateHelper {
return 42
}
if (this.prevDay(this.nextMonth(date)).getDate() == 28) {
return 28;
return 35;
}
return 35

View File

@ -40,7 +40,7 @@ class AnswerHelper
]);
}
public static function answerStatusLabel($answer_flag): string
public static function userResponseLabel($answer_flag): string
{
$class = 'label label-warning';
$content = 'Не проверен';

View File

@ -0,0 +1,54 @@
<?php
namespace common\helpers;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use Exception;
class UserQuestionnaireStatusHelper
{
const STATUS_PASSIVE = 0;
const STATUS_ACTIVE = 1;
const STATUS_COMPLETED = 2;
const STATUS_ON_INSPECTION = 3;
public static function statusList() :array
{
return [
self::STATUS_PASSIVE => 'Не используется',
self::STATUS_ACTIVE => 'Активен',
self::STATUS_COMPLETED => 'Завершён',
self::STATUS_ON_INSPECTION => 'На проверке'
];
}
/**
* @throws Exception
*/
public static function statusName($status): string
{
return ArrayHelper::getValue(self::statusList(), $status);
}
/**
* @throws Exception
*/
public static function statusLabel($status): string
{
switch ($status) {
case self::STATUS_PASSIVE:
$class = 'label label-danger';
break;
case ($status === self::STATUS_ACTIVE or $status === self::STATUS_COMPLETED):
$class = 'label label-success';
break;
default:
$class = 'label label-default';
}
return Html::tag('span', ArrayHelper::getValue(self::statusList(), $status), [
'class' => $class,
]);
}
}

View File

@ -110,13 +110,4 @@ class Document extends \yii\db\ActiveRecord
{
return $this->hasMany(DocumentFieldValue::className(), ['document_id' => 'id']);
}
public static function getDocument($document_id)
{
return self::find()
->joinWith(['documentFieldValues.field'])
->where(['document.id' => $document_id])
->asArray()
->all();
}
}

View File

@ -41,4 +41,9 @@ class Position extends \yii\db\ActiveRecord
'name' => 'Название',
];
}
public function getUserCard(): \yii\db\ActiveQuery
{
return $this->hasMany(UserCard::class, ['position_id' => 'id']);
}
}

View File

@ -123,4 +123,10 @@ class Template extends \yii\db\ActiveRecord
{
return $this->title;
}
public function getFields()
{
return $this->hasMany(DocumentField::className(), ['id' => 'field_id'])
->via('templateDocumentFields');
}
}

View File

@ -0,0 +1,75 @@
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "test_task".
*
* @property int $id
* @property string $description
* @property string $link
* @property int $level
* @property int $status
*/
class TestTask extends \yii\db\ActiveRecord
{
const LEVEL_JUNIOR = 1;
const LEVEL_MIDDLE = 2;
const LEVEL_MIDDLE_PLUS = 3;
const LEVEL_SENIOR = 4;
/**
* @return string[]
*/
public static function getLevelList(): array
{
return [
self::LEVEL_JUNIOR => 'Junior',
self::LEVEL_MIDDLE => 'Middle',
self::LEVEL_MIDDLE_PLUS => 'Middle+',
self::LEVEL_SENIOR => 'Senior',
];
}
public static function getLevelLabel(int $level): string
{
return self::getLevelList()[$level];
}
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'test_task';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['level', 'status', 'description', 'link'], 'required'],
[['level', 'status'], 'integer'],
[['description'], 'string', 'max' => 500],
[['link'], 'string', 'max' => 255],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'description' => 'Описание',
'link' => 'Ссылка',
'level' => 'Уровень',
'status' => 'Статус',
];
}
}

View File

@ -63,7 +63,7 @@ class UserQuestionnaire extends ActiveRecord
[['questionnaire_id', 'user_id', 'status'], 'required'],
[['questionnaire_id', 'user_id', 'score', 'status'], 'integer'],
[['percent_correct_answers'], 'number'],
[['created_at', 'updated_at'], 'safe'],
[['created_at', 'updated_at', 'testing_date'], 'safe'],
[['uuid'], 'string', 'max' => 36],
[['uuid'], 'unique'],
[['questionnaire_id'], 'exist', 'skipOnError' => true, 'targetClass' => Questionnaire::className(), 'targetAttribute' => ['questionnaire_id' => 'id']],
@ -74,8 +74,7 @@ class UserQuestionnaire extends ActiveRecord
public function beforeSave($insert)
{
if (parent::beforeSave($insert)) {
if (empty($this->uuid))
{
if (empty($this->uuid)) {
$this->uuid = UUIDHelper::v4();
}
return true;
@ -98,6 +97,7 @@ class UserQuestionnaire extends ActiveRecord
'status' => 'Статус',
'created_at' => 'Дата создания',
'updated_at' => 'Дата обновления',
'testing_date' => 'Дата тестирования',
'percent_correct_answers' => 'Процент правильных ответов',
];
}
@ -150,8 +150,8 @@ class UserQuestionnaire extends ActiveRecord
*/
public function numCorrectAnswersWithoutOpenQuestions()
{
return $this->hasMany(Answer::className(), ['question_id' => 'question_id'])
->viaTable('user_response', ['user_questionnaire_uuid' => 'uuid'])
return $this->hasMany(Answer::className(), ['question_id' => 'id'])
->viaTable('question', ['questionnaire_id' => 'questionnaire_id'])
->where(['answer_flag' => '1'])
->andWhere(['status' => '1'])
->count();
@ -162,9 +162,10 @@ class UserQuestionnaire extends ActiveRecord
*/
public function numOpenQuestionsAnswers()
{
return $this->hasMany(Question::className(), ['id' => 'question_id'])
->viaTable('user_response', ['user_questionnaire_uuid' => 'uuid'])
return $this->hasMany(Question::className(), ['questionnaire_id' => 'id'])
->viaTable('questionnaire', ['id' => 'questionnaire_id'])
->where(['question_type_id' => '1'])
->andWhere(['status' => '1'])
->count();
}
@ -178,8 +179,18 @@ class UserQuestionnaire extends ActiveRecord
public static function findActiveUserQuestionnaires($user_id): array
{
return self::find()->where(['user_id' => $user_id])
->andWhere(['status' => '1'])
$models = self::find()
->where(['user_id' => $user_id])
->andWhere(['not', ['user_questionnaire.status' => 0]])
->all();
$modelsArr = array();
foreach ($models as $model) {
$modelsArr[] = array_merge($model->toArray(), [
'questionnaire_title' => $model->getQuestionnaireTitle()
]);
}
return $modelsArr;
}
}

View File

@ -0,0 +1,74 @@
<?php
namespace common\services;
use common\models\Document;
use PhpOffice\PhpWord\Exception\CopyFileException;
use PhpOffice\PhpWord\Exception\CreateTemporaryFileException;
use PhpOffice\PhpWord\TemplateProcessor;
use Yii;
class DocumentFileService
{
private $model;
private $document;
private $file_title;
private $documentFieldValuesArr;
/**
* @throws CopyFileException
* @throws CreateTemporaryFileException
*/
public function __construct($modelID)
{
$this->model = Document::findOne($modelID);
$this->initDocument();
}
/**
* @throws CopyFileException
* @throws CreateTemporaryFileException
*/
private function initDocument()
{
$this->file_title = $this->model->title . '.docx';
$template_title = $this->model->template->template_file_name;
$this->document = new TemplateProcessor(
Yii::getAlias('@templates') . "/$template_title");
$this->documentFieldValuesArr = $this->model->documentFieldValues;
}
public function setFields()
{
foreach ($this->documentFieldValuesArr as $docFieldValue) {
$this->document->setValue(
$docFieldValue->field->field_template,
$docFieldValue->value
);
}
}
public function downloadDocument()
{
$this->document->saveAs($this->file_title);
// Имя скачиваемого файла
$downloadFile = $this->file_title;
// Контент-тип означающий скачивание
header("Content-Type: application/octet-stream");
// Размер в байтах
header("Accept-Ranges: bytes");
// Размер файла
header("Content-Length: ".filesize($downloadFile));
// Расположение скачиваемого файла
header("Content-Disposition: attachment; filename=".$downloadFile);
// Прочитать файл
readfile($downloadFile);
unlink($this->file_title);
}
}

View File

@ -2,73 +2,27 @@
namespace common\services;
use common\models\Document;
use PhpOffice\PhpWord\Exception\CopyFileException;
use PhpOffice\PhpWord\Exception\CreateTemporaryFileException;
use PhpOffice\PhpWord\TemplateProcessor;
use Yii;
class DocumentService
{
private $model;
private $document;
private $file_title;
private $documentFieldValuesArr;
/**
* @throws CopyFileException
* @throws CreateTemporaryFileException
*/
public function __construct($modelID)
public static function getDocumentList($document_type): array
{
$this->model = Document::findOne($modelID);
$this->initDocument();
}
/**
* @throws CopyFileException
* @throws CreateTemporaryFileException
*/
private function initDocument()
{
$this->file_title = $this->model->title . '.docx';
$template_title = $this->model->template->template_file_name;
$this->document = new TemplateProcessor(
Yii::getAlias('@templates') . "/$template_title");
$this->documentFieldValuesArr = $this->model->documentFieldValues;
}
public function setFields()
{
foreach ($this->documentFieldValuesArr as $docFieldValue) {
$this->document->setValue(
$docFieldValue->field->field_template,
$docFieldValue->value
);
if (!empty($document_type)) {
return Document::find()->joinWith('template')
->where(['document_type' => $document_type])->asArray()->all();
}
else {
return Document::find()->asArray()->all();
}
}
public function downloadDocument()
public static function getDocument($document_id)
{
$this->document->saveAs($this->file_title);
return Document::find()
->joinWith(['documentFieldValues.field'])
->where(['document.id' => $document_id])
->asArray()->all();
// Имя скачиваемого файла
$downloadFile = $this->file_title;
// Контент-тип означающий скачивание
header("Content-Type: application/octet-stream");
// Размер в байтах
header("Accept-Ranges: bytes");
// Размер файла
header("Content-Length: ".filesize($downloadFile));
// Расположение скачиваемого файла
header("Content-Disposition: attachment; filename=".$downloadFile);
// Прочитать файл
readfile($downloadFile);
unlink($this->file_title);
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace common\services;
use common\models\InterviewRequest;
use Yii;
class InterviewRequestService
{
public static function createInterviewRequest($interviewRequestParams)
{
$interviewRequest = new InterviewRequest();
$attributes = $interviewRequestParams;
$interviewRequest->attributes = $attributes;
$interviewRequest->created_at = time();
$interviewRequest->user_id = \Yii::$app->user->id;
if ($interviewRequest->save()) {
\Yii::$app->telegram_bot->sendRenderedMessage('interview_request', $attributes);
}
return $interviewRequest;
}
}

View File

@ -0,0 +1,35 @@
<?php
namespace common\services;
use common\models\UserCard;
class ManagerService
{
public static function getManagerList()
{
return UserCard::find()->select(['fio','manager.id' , 'email'])
->joinWith('manager')->where(['NOT',['manager.user_card_id' => null]])->all();
}
public static function getManager($manager_id)
{
return UserCard::find()
->select(['manager.id', 'fio', 'email', 'photo', 'gender'])
->joinWith([
'manager' => function ($query) { $query->select(['id']); }
])
->where(['manager.id' => $manager_id])
->asArray()
->one();
}
public static function getManagerEmployeesList($manager_id)
{
return UserCard::find()
->select(['user_card.id', 'user_card.fio', 'user_card.email'])
->joinWith('managerEmployee')
->where(['manager_employee.manager_id' => $manager_id])
->all();
}
}

View File

@ -2,61 +2,120 @@
namespace common\services;
use common\classes\Debug;
use common\models\Manager;
use common\models\ManagerEmployee;
use common\models\UserCard;
use frontend\modules\api\models\ProfileSearchForm;
use Yii;
use yii\web\BadRequestHttpException;
use yii\web\ServerErrorHttpException;
class ProfileService
{
private $searcherID;
private $id;
public function __construct($searcherID, $id)
/**
* @throws ServerErrorHttpException
*/
public static function getMainData($user_id): array
{
$this->searcherID = $searcherID;
$this->id = $id;
$userCard = UserCard::findOne(['id_user' => $user_id]);
if (empty($userCard)) {
throw new ServerErrorHttpException('Profile not found!');
}
return array('fio' => $userCard->fio,
'photo' => $userCard->photo,
'gender' => $userCard->gender,
'level' => $userCard->level,
'years_of_exp' => $userCard->years_of_exp,
'specification' => $userCard->specification,
'position_name' => $userCard->position->name);
}
public function checkReportePermission()
public static function getProfile($id, $request): ?array
{
if ($this->isMyProfile() or $this->isMyEmployee()) {
$searchModel = new ProfileSearchForm();
$searchModel->attributes = $request;
if ($id) {
return $searchModel->byId();
}
return $searchModel->byParams();
}
/**
* @throws ServerErrorHttpException
*/
public static function getProfileWithReportPermission($user_card_id): ?array
{
if (UserCard::find()->where(['id' => $user_card_id])->exists()) {
$searchModel = new ProfileSearchForm();
$searchModel->id = $user_card_id;
$profile = $searchModel->byId();
self::addPermission($profile, $user_card_id);
return $profile;
}
throw new ServerErrorHttpException('There is no user with this id');
}
private static function addPermission(&$profile, $user_card_id)
{
$searcherCardID = self::getSearcherCardID(Yii::$app->user->getId());
if (self::checkReportPermission($user_card_id, $searcherCardID)) {
$profile += ['report_permission' => '1'];
} else {
$profile += ['report_permission' => '0'];
}
}
private static function getSearcherCardID($user_id): int
{
return UserCard::findOne(['id_user' => $user_id])->id;
}
private static function checkReportPermission($user_card_id, $searcherCardID): bool
{
if (self::isMyProfile($user_card_id, $searcherCardID)
or self::isMyEmployee($user_card_id, $searcherCardID)) {
return true;
}
return false;
}
private function isMyProfile()
private static function isMyProfile($user_card_id, $searcherCardID): bool
{
if ($this->id == $this->searcherID) {
if ($user_card_id == $searcherCardID) {
return true;
}
return false;
}
private function isMyEmployee()
private static function isMyEmployee($user_card_id, $searcherCardID): bool
{
if (!$this->amIManager()) {
return false;
}
if (!self::amIManager($searcherCardID)) {
return false;
}
if ($this->isMyEmploee()) {
return true;
}
return false;
}
private function amIManager()
{
if (Manager::find()->where(['user_card_id' => $this->searcherID])->exists()) {
if (self::isMyEmployer($user_card_id, $searcherCardID)) {
return true;
}
return false;
}
private function isMyEmploee()
private static function amIManager($searcherCardID): bool
{
$manager = Manager::find()->where(['user_card_id' => $this->searcherID])->one();
if (Manager::find()->where(['user_card_id' => $searcherCardID])->exists()) {
return true;
}
return false;
}
private static function isMyEmployer($user_card_id, $searcherCardID): bool
{
$manager = Manager::find()->where(['user_card_id' => $searcherCardID])->one();
$exist = ManagerEmployee::find()
->where(['manager_id' => $manager->id, 'user_card_id' => $this->id])
->where(['manager_id' => $manager->id, 'user_card_id' => $user_card_id])
->exists();
if ($exist) {
@ -64,7 +123,4 @@ class ProfileService
}
return false;
}
}

View File

@ -1,13 +1,14 @@
<?php
namespace common\helpers;
namespace common\services;
use backend\modules\questionnaire\models\Answer;
use backend\modules\questionnaire\models\UserQuestionnaire;
use backend\modules\questionnaire\models\UserResponse;
use common\models\UserQuestionnaire;
use common\models\UserResponse;
use yii\base\InvalidConfigException;
use yii\helpers\ArrayHelper;
class ScoreCalculatorHelper
class ScoreCalculatorService
{
public static function rateResponses(UserQuestionnaire $user_questionnaire)
{
@ -44,6 +45,9 @@ class ScoreCalculatorHelper
return true;
}
/**
* @throws InvalidConfigException
*/
public static function calculateScore(UserQuestionnaire $userQuestionnaire)
{
$responses_questions = $userQuestionnaire->hasMany(UserResponse::className(), ['user_questionnaire_uuid' => 'uuid'])
@ -71,11 +75,11 @@ class ScoreCalculatorHelper
}
}
if($score !== null) {
self::setPercentCorrectAnswers($user_correct_answers_num, $userQuestionnaire);
$userQuestionnaire->score = round($score);
$userQuestionnaire->save();
}
self::setPercentCorrectAnswers($user_correct_answers_num, $userQuestionnaire);
$userQuestionnaire->score = round($score);
$userQuestionnaire->status = 2;
$userQuestionnaire->testing_date = date('Y:m:d H:i:s');
$userQuestionnaire->save();
}
protected static function isCorrect($answer_flag): bool
@ -91,14 +95,20 @@ class ScoreCalculatorHelper
return Answer::numCorrectAnswers($question_id);
}
/**
* @throws InvalidConfigException
*/
protected static function setPercentCorrectAnswers($user_correct_answers_num, UserQuestionnaire $userQuestionnaire)
{
$all_correct_answers_num = $userQuestionnaire->numCorrectAnswersWithoutOpenQuestions();
$all_correct_answers_num += $userQuestionnaire->numOpenQuestionsAnswers();
if($user_correct_answers_num !== null) {
$all_correct_answers_num = $userQuestionnaire->numCorrectAnswersWithoutOpenQuestions();
$all_correct_answers_num += $userQuestionnaire->numOpenQuestionsAnswers();
$percent = $user_correct_answers_num / $all_correct_answers_num;
$userQuestionnaire->percent_correct_answers = round($percent, 2);
$userQuestionnaire->save();
$percent = $user_correct_answers_num / $all_correct_answers_num;
$userQuestionnaire->percent_correct_answers = round($percent, 2);
}
else {
$userQuestionnaire->percent_correct_answers = round($user_correct_answers_num, 2);
}
}
}

View File

@ -0,0 +1,46 @@
<?php
namespace common\services;
use common\models\Task;
class TaskService
{
public static function createTask($taskParams)
{
$task = new Task();
$task->load($taskParams, '');
$task->save();
return $task;
}
public static function getTask($task_id): ?Task
{
return Task::findOne($task_id);
}
public static function getTaskList($task_id): array
{
return Task::find()->asArray()->all();
}
public static function getTaskListByProject($project_id): array
{
return Task::find()->where(['project_id' => $project_id])->asArray()->all();
}
public static function updateTask($task_params): ?Task
{
$modelTask = Task::findOne($task_params['task_id']);
$modelTask->load($task_params, '');
$modelTask->save();
return $modelTask;
}
public static function taskExists($task_id): bool
{
return Task::find()->where(['id' => $task_id])->exists();
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace common\services;
use common\models\Template;
class TemplateService
{
public static function getTemplateList($document_type = null): array
{
if (!empty($document_type)) {
return Template::find()->where(['document_type' => $document_type])->asArray()->all();
}
else {
return Template::find()->asArray()->all();
}
}
public static function getTemplateWithFields($template_id): array
{
return Template::find()
->joinWith('templateDocumentFields.field')
->where(['template.id' => $template_id])
->asArray()
->one();
}
public static function getTemplate($template_id): array
{
return Template::find()->where(['template.id' => $template_id])
->asArray()
->one();
}
}

View File

@ -0,0 +1,78 @@
<?php
namespace common\services;
use common\models\Question;
use common\models\UserQuestionnaire;
use yii\base\InvalidConfigException;
use yii\web\NotFoundHttpException;
use yii\web\ServerErrorHttpException;
class UserQuestionnaireService
{
public static function getQuestionnaireList($user_id): array
{
$userQuestionnaireModels = UserQuestionnaire::findActiveUserQuestionnaires($user_id);
array_walk($userQuestionnaireModels, function (&$arr) {
unset(
$arr['questionnaire_id'],
$arr['created_at'],
$arr['updated_at'],
$arr['id']
);
});
return $userQuestionnaireModels;
}
/**
* @throws NotFoundHttpException
* @throws InvalidConfigException
*/
public static function calculateScore($user_questionnaire_uuid): UserQuestionnaire
{
$userQuestionnaireModel = UserQuestionnaire::findOne(['uuid' => $user_questionnaire_uuid]);
if (empty($userQuestionnaireModel)) {
throw new NotFoundHttpException('The questionnaire with this uuid does not exist');
}
ScoreCalculatorService::rateResponses($userQuestionnaireModel);
if (ScoreCalculatorService::checkAnswerFlagsForNull($userQuestionnaireModel)) {
ScoreCalculatorService::calculateScore($userQuestionnaireModel);
} else {
$userQuestionnaireModel->status = 3;
$userQuestionnaireModel->save();
}
return $userQuestionnaireModel;
}
/**
* @throws ServerErrorHttpException
*/
public static function getQuestionNumber($user_questionnaire_uuid): array
{
$userQuestionnaireModel = UserQuestionnaire::findOne(['uuid' => $user_questionnaire_uuid]);
if (empty($userQuestionnaireModel)) {
throw new ServerErrorHttpException('Not found UserQuestionnaire');
}
$count = Question::find()
->where(['questionnaire_id' => $userQuestionnaireModel->questionnaire_id])
->andWhere(['status' => 1])
->count();
return array('question_number' => $count);
}
/**
* @throws ServerErrorHttpException
*/
public static function getPointsNumber($user_questionnaire_uuid)
{
$userQuestionnaireModel = UserQuestionnaire::findOne(['uuid' => $user_questionnaire_uuid]);
if (empty($userQuestionnaireModel)) {
throw new ServerErrorHttpException('Not found UserQuestionnaire');
}
$pointSum = Question::find()
->where(['questionnaire_id' => $userQuestionnaireModel->questionnaire_id])
->andWhere(['status' => 1])
->sum('score');
return array('sum_point' => $pointSum);
}
}

View File

@ -0,0 +1,74 @@
<?php
namespace common\services;
use common\models\UserResponse;
use Yii;
use yii\web\BadRequestHttpException;
use yii\web\ServerErrorHttpException;
class UserResponseService
{
/**
* @throws BadRequestHttpException
* @throws ServerErrorHttpException
*/
public static function createUserResponse($userResponseParams): UserResponse
{
$userResponse = new UserResponse();
$userResponse->load($userResponseParams, '');
(new UserResponseService)->validateResponseModel($userResponse);
(new UserResponseService)->saveModel($userResponse);
return $userResponse;
}
/**
* @throws BadRequestHttpException
* @throws ServerErrorHttpException
*/
public static function createUserResponses($userResponsesParams): array
{
$userResponseModels = array();
foreach ($userResponsesParams['userResponses'] as $userResponseParams) {
$model = new UserResponse();
$model->load($userResponseParams, '');
(new UserResponseService)->validateResponseModel($model);
array_push($userResponseModels, $model);
}
foreach ($userResponseModels as $responseModel) {
(new UserResponseService)->saveModel($responseModel);
}
return $userResponseModels;
}
/**
* @throws BadRequestHttpException
*/
protected function validateResponseModel($model)
{
if (!$model->validate()) {
throw new BadRequestHttpException(json_encode($model->errors));
}
if (empty($model->user_id) or empty($model->question_id) or empty($model->user_questionnaire_uuid)) {
throw new BadRequestHttpException(json_encode('One of the parameters is empty!'));
}
}
/**
* @throws ServerErrorHttpException
*/
protected function saveModel($model)
{
if ($model->save()) {
ScoreCalculatorService::rateOneResponse($model);
$response = Yii::$app->getResponse();
$response->setStatusCode(201);
} elseif (!$model->hasErrors()) {
throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
}
}
}

View File

@ -34,7 +34,8 @@
"ext-json": "*",
"kartik-v/yii2-widget-depdrop": "dev-master",
"phpoffice/phpword": "^0.18.2",
"kartik-v/yii2-widget-fileinput": "@dev"
"kartik-v/yii2-widget-fileinput": "@dev",
"kartik-v/yii2-mpdf": "dev-master"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
@ -47,6 +48,9 @@
"process-timeout": 1800,
"fxp-asset": {
"enabled": false
},
"allow-plugins": {
"yiisoft/yii2-composer": true
}
},
"repositories": [

545
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "26a8d9eb3ba346644b24ddee0391c211",
"content-hash": "8e1d1f250ee5ec02e15c3500ab6c4999",
"packages": [
{
"name": "2amigos/yii2-file-upload-widget",
@ -1365,6 +1365,69 @@
},
"time": "2021-09-03T10:16:59+00:00"
},
{
"name": "kartik-v/yii2-mpdf",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/kartik-v/yii2-mpdf.git",
"reference": "6a6506e680e4a07b1781da12bed9c080263f5f4a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kartik-v/yii2-mpdf/zipball/6a6506e680e4a07b1781da12bed9c080263f5f4a",
"reference": "6a6506e680e4a07b1781da12bed9c080263f5f4a",
"shasum": ""
},
"require": {
"mpdf/mpdf": "~8.1"
},
"default-branch": true,
"type": "yii2-extension",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"kartik\\mpdf\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Kartik Visweswaran",
"email": "kartikv2@gmail.com",
"homepage": "http://www.krajee.com/"
}
],
"description": "A Yii2 wrapper component for the mPDF library which generates PDF files from UTF-8 encoded HTML.",
"homepage": "https://github.com/kartik-v/yii2-mpdf",
"keywords": [
"component",
"extension",
"html",
"mpdf",
"pdf",
"utf8",
"yii2"
],
"support": {
"issues": "https://github.com/kartik-v/yii2-mpdf/issues",
"source": "https://github.com/kartik-v/yii2-mpdf/tree/master"
},
"funding": [
{
"url": "https://opencollective.com/yii2-mpdf",
"type": "open_collective"
}
],
"time": "2022-09-19T18:31:07+00:00"
},
{
"name": "kartik-v/yii2-widget-depdrop",
"version": "dev-master",
@ -1852,6 +1915,141 @@
},
"time": "2017-01-07T19:07:59+00:00"
},
{
"name": "mpdf/mpdf",
"version": "v8.1.2",
"source": {
"type": "git",
"url": "https://github.com/mpdf/mpdf.git",
"reference": "a8a22f4874157e490d41b486053a20bec42e182c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mpdf/mpdf/zipball/a8a22f4874157e490d41b486053a20bec42e182c",
"reference": "a8a22f4874157e490d41b486053a20bec42e182c",
"shasum": ""
},
"require": {
"ext-gd": "*",
"ext-mbstring": "*",
"myclabs/deep-copy": "^1.7",
"paragonie/random_compat": "^1.4|^2.0|^9.99.99",
"php": "^5.6 || ^7.0 || ~8.0.0 || ~8.1.0",
"php-http/message-factory": "^1.0",
"psr/http-message": "^1.0",
"psr/log": "^1.0 || ^2.0",
"setasign/fpdi": "^2.1"
},
"require-dev": {
"mockery/mockery": "^1.3.0",
"mpdf/qrcode": "^1.1.0",
"squizlabs/php_codesniffer": "^3.5.0",
"tracy/tracy": "^2.4",
"yoast/phpunit-polyfills": "^1.0"
},
"suggest": {
"ext-bcmath": "Needed for generation of some types of barcodes",
"ext-xml": "Needed mainly for SVG manipulation",
"ext-zlib": "Needed for compression of embedded resources, such as fonts"
},
"type": "library",
"autoload": {
"psr-4": {
"Mpdf\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0-only"
],
"authors": [
{
"name": "Matěj Humpál",
"role": "Developer, maintainer"
},
{
"name": "Ian Back",
"role": "Developer (retired)"
}
],
"description": "PHP library generating PDF files from UTF-8 encoded HTML",
"homepage": "https://mpdf.github.io",
"keywords": [
"pdf",
"php",
"utf-8"
],
"support": {
"docs": "http://mpdf.github.io",
"issues": "https://github.com/mpdf/mpdf/issues",
"source": "https://github.com/mpdf/mpdf"
},
"funding": [
{
"url": "https://www.paypal.me/mpdf",
"type": "custom"
}
],
"time": "2022-08-15T08:15:09+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.10.2",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
},
"require-dev": {
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
},
"files": [
"src/DeepCopy/deep_copy.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"keywords": [
"clone",
"copy",
"duplicate",
"object",
"object graph"
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
],
"time": "2020-11-13T09:40:50+00:00"
},
{
"name": "npm-asset/fullcalendar",
"version": "3.8.0",
@ -1959,6 +2157,60 @@
},
"time": "2020-10-15T08:29:30+00:00"
},
{
"name": "php-http/message-factory",
"version": "v1.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-http/message-factory.git",
"reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1",
"reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1",
"shasum": ""
},
"require": {
"php": ">=5.4",
"psr/http-message": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
}
],
"description": "Factory interfaces for PSR-7 HTTP Message",
"homepage": "http://php-http.org",
"keywords": [
"factory",
"http",
"message",
"stream",
"uri"
],
"support": {
"issues": "https://github.com/php-http/message-factory/issues",
"source": "https://github.com/php-http/message-factory/tree/master"
},
"time": "2015-12-19T14:08:53+00:00"
},
{
"name": "phpoffice/phpword",
"version": "0.18.2",
@ -2071,6 +2323,109 @@
},
"time": "2021-06-04T20:58:45+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"support": {
"source": "https://github.com/php-fig/http-message/tree/master"
},
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"time": "2021-05-03T11:20:27+00:00"
},
{
"name": "rmrevin/yii2-fontawesome",
"version": "2.17.1",
@ -2169,6 +2524,78 @@
},
"time": "2020-01-28T05:01:22+00:00"
},
{
"name": "setasign/fpdi",
"version": "v2.3.6",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
"reference": "6231e315f73e4f62d72b73f3d6d78ff0eed93c31"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/6231e315f73e4f62d72b73f3d6d78ff0eed93c31",
"reference": "6231e315f73e4f62d72b73f3d6d78ff0eed93c31",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0 || ^8.0"
},
"conflict": {
"setasign/tfpdf": "<1.31"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
"setasign/tfpdf": "1.31",
"squizlabs/php_codesniffer": "^3.5",
"tecnickcom/tcpdf": "~6.2"
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured."
},
"type": "library",
"autoload": {
"psr-4": {
"setasign\\Fpdi\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
},
{
"name": "Maximilian Kresse",
"email": "maximilian.kresse@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"support": {
"issues": "https://github.com/Setasign/FPDI/issues",
"source": "https://github.com/Setasign/FPDI/tree/v2.3.6"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/setasign/fpdi",
"type": "tidelift"
}
],
"time": "2021-02-11T11:37:01+00:00"
},
{
"name": "studio-42/elfinder",
"version": "2.1.59",
@ -3770,64 +4197,6 @@
],
"time": "2021-10-05T13:56:00+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.10.2",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
},
"require-dev": {
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
},
"files": [
"src/DeepCopy/deep_copy.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"keywords": [
"clone",
"copy",
"duplicate",
"object",
"object graph"
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
],
"time": "2020-11-13T09:40:50+00:00"
},
{
"name": "phar-io/manifest",
"version": "1.0.3",
@ -4638,59 +5007,6 @@
},
"time": "2021-11-05T16:47:00+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"support": {
"source": "https://github.com/php-fig/http-message/tree/master"
},
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "ralouphie/getallheaders",
"version": "3.0.3",
@ -6674,7 +6990,8 @@
"kavalar/hhapi": 20,
"kartik-v/yii2-grid": 20,
"kartik-v/yii2-widget-depdrop": 20,
"kartik-v/yii2-widget-fileinput": 20
"kartik-v/yii2-widget-fileinput": 20,
"kartik-v/yii2-mpdf": 20
},
"prefer-stable": false,
"prefer-lowest": false,
@ -6683,5 +7000,5 @@
"ext-json": "*"
},
"platform-dev": [],
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.3.0"
}

View File

@ -0,0 +1,40 @@
<?php
use yii\db\Migration;
/**
* Class m220214_143240_add_column_testing_date_to_user_questionnaire_table
*/
class m220214_143240_add_column_testing_date_to_user_questionnaire_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('user_questionnaire', 'testing_date', $this->dateTime()->defaultValue(null));
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('user_questionnaire', 'testing_date');
}
/*
// Use up()/down() to run migration code without a transaction.
public function up()
{
}
public function down()
{
echo "m220214_143240_add_column_testing_date_to_user_questionnaire_table cannot be reverted.\n";
return false;
}
*/
}

View File

@ -0,0 +1,31 @@
<?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%test_task}}`.
*/
class m220309_134047_create_test_task_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%test_task}}', [
'id' => $this->primaryKey(),
'description' => $this->string(500),
'link' => $this->string(255),
'level' => $this->integer(1)->defaultValue(1),
'status' => $this->integer(1),
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('{{%test_task}}');
}
}

329
docs/api/document.md Normal file
View File

@ -0,0 +1,329 @@
# Документы
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
get-document-list
</td>
<td>
Возвращает список документов
</td>
</tr>
<tr>
<td>
get-document
</td>
<td>
Возвращает документ
</td>
</tr>
<tr>
<td>
create-document
</td>
<td>
Создание документа
</td>
</tr>
</table>
## Список документов
`https://guild.craft-group.xyz/api/document/get-document-list?document_type=1`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
document_type
</td>
<td>
Тип документа. Возможные значения: 1 - Акт; 2 - Договор
</td>
</tr>
</table>
<p>
Без передачи параметра возвращает массив объектов <b>Документ</b> . С параметром <b>document_type</b>,
метод возвращает объекты <b>Документ</b> определённого типа(<b>1 - Акт; 2 - Договор</b>).
При отсутствии документов возвращает ошибку: "Not Found".
</p>
<p>
Возвращает <b>массив</b> объектов <b>Документ</b>. <br>
Каждый объект <b>Документ</b> имеет такой вид:
</p>
```json5
[
{
"id": "88",
"title": "Act2",
"created_at": "2022-01-12 16:39:41",
"updated_at": "2022-01-12 16:39:41",
"template_id": "94",
"manager_id": "5",
"template": {
"id": "94",
"title": "Акт",
"created_at": "2022-01-11 11:47:11",
"updated_at": null,
"template_file_name": null,
"document_type": "2"
}
},
'...'
]
```
<p>
Пример ошибки:
</p>
```json5
{
"name": "Not Found",
"message": "Documents not found",
"code": 0,
"status": 404,
"type": "yii\\web\\NotFoundHttpException"
}
```
## Получить документ
`https://guild.craft-group.xyz/api/document/get-document?document_id=88`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
document_id
</td>
<td>
Id документа
</td>
</tr>
</table>
<p>
Возвращает объект <b>Документ</b>. <br>
Каждый объект <b>Документ</b> имеет такой вид:
</p>
```json5
[
{
"id": "88",
"title": "Act2",
"created_at": "2022-01-12 16:39:41",
"updated_at": "2022-01-12 16:39:41",
"template_id": "94",
"manager_id": "5",
"documentFieldValues": [
{
"id": "105",
"field_id": "43",
"document_id": "88",
"value": "№ документа111",
"field": {
"id": "43",
"title": "№ документа",
"field_template": "№ dokumenta"
}
},
{
"id": "106",
"field_id": "44",
"document_id": "88",
"value": "от111",
"field": {
"id": "44",
"title": "от",
"field_template": "ot"
}
},
{
"id": "107",
"field_id": "45",
"document_id": "88",
"value": "Сумма с НДС111",
"field": {
"id": "45",
"title": "Сумма с НДС",
"field_template": "Summa s NDS"
}
},
{
"id": "108",
"field_id": "46",
"document_id": "88",
"value": "НДС111",
"field": {
"id": "46",
"title": "НДС",
"field_template": "NDS"
}
},
{
"id": "109",
"field_id": "47",
"document_id": "88",
"value": "Основание111",
"field": {
"id": "47",
"title": "Основание",
"field_template": "Osnovaniye"
}
}
]
}
]
```
<p>
Пример ошибки:
</p>
```json5
{
"name": "Not Found",
"message": "There is no such document",
"code": 0,
"status": 404,
"type": "yii\\web\\NotFoundHttpException"
}
```
## Создать документ
`https://guild.craft-group.xyz/api/document/create-document`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
title
</td>
<td>
Название документа
</td>
</tr>
<tr>
<td>
template_id
</td>
<td>
Id шаблона
</td>
</tr>
<tr>
<td>
manager_id
</td>
<td>
Id менеджера
</td>
</tr>
<tr>
<td>
field_id
</td>
<td>
Id поля
</td>
</tr>
<tr>
<td>
value
</td>
<td>
Значение поля
</td>
</tr>
</table>
<p>
Создаёт <b>Документ</b>. Требует передачи <b>POST</b> запроса с соответствующими
параметрами документа и полей документа
</p>
<p>
Пример передаваемого объекта:
</p>
```json5
{
"title": "Act64",
"template_id": "94",
"manager_id": "5",
"documentFieldValues": [
{
"field_id": "43",
"value": "№ документа111"
},
{
"field_id": "44",
"value": "от111"
},
{
"field_id": "45",
"value": "Сумма с НДС111"
},
{
"field_id": "46",
"value": "НДС111"
},
{
"field_id": "47",
"value": "Основание111"
}
]
}
```
<p>
В случае указания не верных параметров буде возвращена соответствующая ошибка. Пример ошибки:
</p>
```json5
{
"name": "Bad Request",
"message": "{\"template_id\":[\"\Ш\а\б\л\о\н cannot be blank.\"]}",
"code": 0,
"status": 400,
"type": "yii\\web\\BadRequestHttpException"
}
```

54
docs/api/interview.md Normal file
View File

@ -0,0 +1,54 @@
## Интервью
### Пригласить на собеседование
`https://guild.craft-group.xyz/api/interview-request/create-interview-request`
<p>
Для того, отправить приглашение профилю на собеседование, необходимо сделать
<b>POST</b> запрос на URL https://guild.craft-group.xyz/api/interview-request/create-interview-request
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
email*
</td>
<td>
Почта пользователя, который хочет пригласить на собеседование.
</td>
</tr>
<tr>
<td>
profile_id*
</td>
<td>
Идентификатор профиля.
</td>
</tr>
<tr>
<td>
phone
</td>
<td>
Телефон.
</td>
</tr>
<tr>
<td>
comment
</td>
<td>
Дополнительные пожелания по собеседованию.
</td>
</tr>
</table>

View File

@ -7,191 +7,6 @@
Чтобы получить популярные навыки нужно сделать <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/skills/skills-on-main-page
</p>
## Профиль
### Список
`https://guild.craft-group.xyz/api/profile`
<p>
Для получения списка профилей необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/profile
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
limit
</td>
<td>
Количество профилей, которое вернет сервер при запросе.
</td>
</tr>
<tr>
<td>
offset
</td>
<td>
Количество записей на которое нужно отступить в списке профилей.
</td>
</tr>
<tr>
<td>
skills
</td>
<td>
Идентификаторы навыков по которым нужно отфильтровать профили.
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/profile?limit=5&offset=5&skills=1,2`
<p>
Возвращает <b>массив</b> объектов <b>Профилей</b>. <br>
Каждый объект <b>Профиля</b> имеет такой вид:
</p>
```json5
{
"id": "1",
"fio": "f23f",
"passport": "f23",
"photo": "''",
"email": "f",
"gender": "1",
"dob": "2021-09-17",
"status": "2",
"created_at": "2021-09-08 16:30:34",
"updated_at": "2021-09-09 08:41:02",
"resume": "",
"salary": "",
"position_id": "1",
"deleted_at": null,
"id_user": "1",
"city": "",
"link_vk": "",
"link_telegram": "",
"vc_text": "",
"level": "2", //
"vc_text_short": "",
"years_of_exp": "0",
"specification": "",
"skillValues": [ //Массив навыков привязанных к этому профилю
{
"id": "1",
"card_id": "1", //card_id из таблицы card_skill
"skill_id": "1",//skill_id из таблицы card_skill
"skill": {
"id": "1", //id из таблицы skill
"name": "SQL",
"category_id": "1"
}
},
//...
],
"achievements": [ //Массив достижений привязанных к этому профилю
{
"id": "7",
"user_card_id": "1",//user_card_id из таблицы achievement_user_card
"achievement_id": "1",//achievement_id из таблицы achievement_user_card
"achievement": {
"id": "1", //id из таблицы achievement
"slug": "newguy",
"title": "Новичок",
"img": "",
"description": "Ты начал у нас работу",
"status": "1" // 1 - Активно, 2 - Неактивно
}
},
//...
]
}
```
### Одна запись
`https://guild.craft-group.xyz/api/profile/{id}`
<p>
Для того, чтобы получить данные одной записи необходимо отправить <b>GET</b> запрос
на URL https://guild.craft-group.xyz/api/profile/{id} , где <b>id</b> это идентификатор
профиля.
</p>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/profile/6`
<p>
Возвращает объект <b>Профиля</b>. <br>
Как выглядит можно посмотреть выше.
</p>
### Пригласить на собеседование
`https://guild.craft-group.xyz/api/profile/add-to-interview`
<p>
Для того, отправить приглашение профилю на собеседование, необходимо сделать
<b>POST</b> запрос на URL https://guild.craft-group.xyz/api/profile/add-to-interview
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
email*
</td>
<td>
Почта пользователя, который хочет пригласить на собеседование.
</td>
</tr>
<tr>
<td>
profile_id*
</td>
<td>
Идентификатор профиля.
</td>
</tr>
<tr>
<td>
phone
</td>
<td>
Телефон.
</td>
</tr>
<tr>
<td>
comment
</td>
<td>
Дополнительные пожелания по собеседованию.
</td>
</tr>
</table>
## Отчет
### Список
`https://guild.craft-group.xyz/api/reports`
@ -256,7 +71,7 @@
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/reports/index?fromDate=2021-08-01&toDate=2021-08-31&user_id=2limit=3&offset=2`
`https://guild.craft-group.xyz/api/reports/index?fromDate=2021-08-01&toDate=2021-08-31&user_id=2&limit=3&offset=2`
### Один отчет
`https://guild.craft-group.xyz/api/reports/{id}`
@ -291,6 +106,96 @@
`https://guild.craft-group.xyz/api/reports/13`
### Отчёт по дате
`https://guild.craft-group.xyz/api/reports/find-by-date`
<p>
Для получения отчета необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/reports/find-by-date
</p>
<p>
Требуемые параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_card_id*
</td>
<td>
ID профиля пользователя
</td>
</tr>
<tr>
<td>
date*
</td>
<td>
Дата в формате: Y-m-d
</td>
</tr>
</table>
<p>
Пример запроса :
</p>
`https://guild.craft-group.xyz/api/reports/find-by-date?user_card_id=17&date=2022-02-14`
<p>
Пример ответа:
</p>
```json5
[
{
"id": "1",
"created_at": "2022-02-14",
"today": null,
"difficulties": "",
"tomorrow": "",
"status": null,
"user_card_id": "17",
"task": [
{
"id": "1",
"report_id": "1",
"task": "dfghjkl",
"hours_spent": "2",
"created_at": "1644842433",
"status": "1",
"minutes_spent": "4"
}
]
},
{
"id": "2",
"created_at": "2022-02-14",
"today": "dxvxv",
"difficulties": "сложности возникли",
"tomorrow": "завтра",
"status": null,
"user_card_id": "17",
"task": [
{
"id": "2",
"report_id": "2",
"task": "54651513",
"hours_spent": "4",
"created_at": "1644842630",
"status": "1",
"minutes_spent": "2"
}
]
}
]
```
### Создать отчет
`https://guild.craft-group.xyz/api/reports/create`
@ -517,15 +422,86 @@
</p>
```json5
{
{
"user_id": 1,
"uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"score": 20,
"status": 1,
"percent_correct_answers": 0.8
"score": 11,
"status": 2,
"percent_correct_answers": 0.25,
"testing_date": "2022-03-17 11:14:22",
"questionnaire_title": "Кат1 Анкета 1 активна"
}
```
<p>
Возвращаемые параметры объекта анкета:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя(int)
</td>
</tr>
<tr>
<td>
uuid
</td>
<td>
uuid анкеты пользователя
</td>
</tr>
<tr>
<td>
score
</td>
<td>
Полученные балы(int)
</td>
</tr>
<tr>
<td>
status
</td>
<td>
Статус: 0 - не активен; 1 - активен; 2 - завершён; 3 - на проверке;
</td>
</tr>
<tr>
<td>
percent_correct_answers
</td>
<td>
Процент правильных ответов(float)
</td>
</tr>
<tr>
<td>
testing_date
</td>
<td>
Дата тестирования
</td>
</tr><tr>
<td>
questionnaire_title
</td>
<td>
Название анкеты
</td>
</tr>
</table>
<p>
Передаваемые параметры объекта вопроса:
</p>
@ -576,6 +552,151 @@
"type": "yii\\web\\NotFoundHttpException"
}
```
### Проверить ответы в анкете
`https://guild.craft-group.xyz/api/user-questionnaire/questionnaire-completed`
<p>
Для выполнения проверки анкеты необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/user-questionnaire/questionnaire-completed
</p>
<p>
Требуемые параметры запроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначеной пользователю
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Возвращает <b>массив</b> объектов <b>Вопросов</b>. <br>
Каждый объект <b>Вопрос</b> имеет такой вид:
</p>
```json5
{
"id": 1,
"questionnaire_id": 1,
"user_id": 1,
"uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"created_at": "2021-10-20 13:06:12",
"updated_at": {
"expression": "NOW()",
"params": []
},
"score": 4,
"status": 1,
"percent_correct_answers": 0.5,
"testing_date": null
}
```
### Число балов в анкете
`https://guild.craft-group.xyz/api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Для максимального числа балов в анкеты необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/user-questionnaire/get-points-number
</p>
<p>
Требуемые параметры запроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначеной пользователю
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Возвращает максимально возможное число балов за анкету b>. <br>
Объект <b>Ответа</b> имеет такой вид:
</p>
```json5
{
"sum_point": "61"
}
```
### Число вопросов в анкете
`https://guild.craft-group.xyz/api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Для числа вопросов в анкете необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/user-questionnaire/get-question-number
</p>
<p>
Требуемые параметры запроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначеной пользователю
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Возвращает число вопросов в анкете b>. <br>
Объект <b>Ответа</b> имеет такой вид:
</p>
```json5
{
"question_number": "7"
}
```
### Вопросы анкеты
`https://guild.craft-group.xyz/api/question/get-questions`
<p>
@ -818,6 +939,14 @@
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя
</td>
</tr>
<tr>
<td>
question_id
</td>
@ -835,7 +964,7 @@
</tr>
<tr>
<td>
uuid
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначенной пользователю(string 36)
@ -843,10 +972,18 @@
</tr>
</table>
<p>
Пример запроса:
Пример тела запроса:
</p>
`https://guild.craft-group.xyz/api/user-response/set-responses?user_id=1&user_questionnaire_id=1&question_id=7&response_body=user response string`
```json5
{
"user_id": "1",
"question_id": "7",
"response_body": "oooooooooooo111111111",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5"
}
```
`https://guild.craft-group.xyz/api/user-response/set-response`
<p>
Возвращает объект <b>Ответа</b>. <br>
@ -855,21 +992,76 @@
```json5
{
"user_id": "1",
"question_id": "7",
"response_body": "user response string",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"created_at": {
"expression": "NOW()",
"params": []
},
"updated_at": {
"expression": "NOW()",
"params": []
},
"id": 90
"user_id": "1",
"question_id": "7",
"response_body": "oooooooooooo111111111",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"created_at": {
"expression": "NOW()",
"params": []
},
"updated_at": {
"expression": "NOW()",
"params": []
},
"id": 191,
"answer_flag": 0
}
```
<p>
Ответ содержит:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя
</td>
</tr>
<tr>
<td>
question_id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
response_body
</td>
<td>
Ответ пользователя(string 255)
</td>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначенной пользователю(string 36)
</td>
</tr>
<tr>
<td>
answer_flag
</td>
<td>
Флаг ответа(1 - верно, 0 - ложно). Если отправлен ответ на открытый вопрос, флаг ответа не будет возвращаться до момента проверки в админ панели.
</td>
</tr>
</table>
<p>
В случаии ошибки в запросе будет отправлено сообщение следующего вида:
</p>
@ -901,6 +1093,14 @@
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя
</td>
</tr>
<tr>
<td>
@ -920,7 +1120,7 @@
</tr>
<tr>
<td>
uuid
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначенной пользователю(string 36)
@ -970,12 +1170,13 @@
"expression": "NOW()",
"params": []
},
"id": 137
"id": 192,
"answer_flag": 0
},
{
"user_id": "1",
"question_id": "4",
"response_body": "oooooooooooo2222222",
"question_id": "7",
"response_body": "oooooooooooo111111111",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"created_at": {
"expression": "NOW()",
@ -985,10 +1186,64 @@
"expression": "NOW()",
"params": []
},
"id": 138
"id": 193,
"answer_flag": 0
}
]
```
<p>
Ответ содержит:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя
</td>
</tr>
<tr>
<td>
question_id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
response_body
</td>
<td>
Ответ пользователя(string 255)
</td>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначенной пользователю(string 36)
</td>
</tr>
<tr>
<td>
answer_flag
</td>
<td>
Флаг ответа(1 - верно, 0 - ложно)
</td>
</tr>
</table>
<p>
В случаии ошибки в запросе будет отправлено сообщение следующего вида:
</p>
@ -1966,7 +2221,7 @@
}
```
### Назначить сотрудника на задачу
`https://guild.craft-group.xyz/api/task-user/get-task-users`
`https://guild.craft-group.xyz/api/task-user/set-task-users`
<p>
Для назначения исполнителя необходимо отправить <b>POST</b> запрос на URL https://guild.craft-group.xyz/api/task-user/set-task-user
</p>

141
docs/api/manager.md Normal file
View File

@ -0,0 +1,141 @@
# Менеджеры
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
get-manager-list
</td>
<td>
Возвращает список менеджеров
</td>
</tr>
<tr>
<td>
get-manager-employees-list
</td>
<td>
Возвращает список сотрудников менеджера
</td>
</tr>
<tr>
<td>
get-manager
</td>
<td>
Возвращает менеджера
</td>
</tr>
</table>
## Список менеджеров
`https://guild.craft-group.xyz/api/manager/get-manager-list`
<p>
Возвращает <b>массив</b> объектов <b>Менеджер</b>. <br>
Каждый объект <b>Менеджер</b> имеет такой вид:
</p>
```json5
[
{
"fio": "Иванов Иван Иванович",
"id": 5,
"email": "testmail@mail.com"
},
'...'
]
```
## Получить менеджера
`https://guild.craft-group.xyz/api/manager/get-manager?manager_id=5`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
manager_id
</td>
<td>
Id менеджера
</td>
</tr>
</table>
<p>
Возвращает объект <b>Менеджер</b>. <br>
Каждый объект <b>Менеджер</b> имеет такой вид:
</p>
```json5
{
"id": "5",
"fio": "Иванов Иван Иванович",
"email": "testmail@mail.com",
"photo": "",
"gender": "0",
"manager": {
"id": "3"
}
}
```
## Получить сотрудников менеджера
`https://guild.craft-group.xyz/api/manager/get-manager-employees-list?manager_id=5`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
manager_id
</td>
<td>
Id менеджера
</td>
</tr>
</table>
<p>
Возвращает массив объектов <b>Профиль</b> сотрудников, что закреплены за менеджером. <br>
Каждый объект <b>Профиль</b> имеет такой вид:
</p>
```json5
[
{
"id": 2,
"fio": "тусыавт2",
"email": "jnjhbdhvf@mail.com"
},
'...'
]
```

308
docs/api/profile.md Normal file
View File

@ -0,0 +1,308 @@
# Профиль
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
api/profile
</td>
<td>
Возвращает список профилей
</td>
</tr>
<tr>
<td>
api/profile/{id}
</td>
<td>
Возвращает один профиль
</td>
</tr>
<tr>
<td>
profile/profile-with-report-permission
</td>
<td>
Получить профиль с флагом прав на просмотр отчётов этого пользователя
</td>
</tr>
<tr>
<td>
profile/get-main-data
</td>
<td>
Получить получить основные данные профиля
</td>
</tr>
</table>
### Список
`https://guild.craft-group.xyz/api/profile`
<p>
Для получения списка профилей необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/profile
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
get-document-list
</td>
<td>
Количество профилей, которое вернет сервер при запросе.
</td>
</tr>
<tr>
<td>
offset
</td>
<td>
Количество записей на которое нужно отступить в списке профилей.
</td>
</tr>
<tr>
<td>
skills
</td>
<td>
Идентификаторы навыков по которым нужно отфильтровать профили.
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/profile?limit=5&offset=5&skills=1,2`
<p>
Возвращает <b>массив</b> объектов <b>Профилей</b>. <br>
Каждый объект <b>Профиля</b> имеет такой вид:
</p>
```json5
{
"id": "1",
"fio": "f23f",
"passport": "f23",
"photo": "''",
"email": "f",
"gender": "1",
"dob": "2021-09-17",
"status": "2",
"created_at": "2021-09-08 16:30:34",
"updated_at": "2021-09-09 08:41:02",
"resume": "",
"salary": "",
"position_id": "1",
"deleted_at": null,
"id_user": "1",
"city": "",
"link_vk": "",
"link_telegram": "",
"vc_text": "",
"level": "2", //
"vc_text_short": "",
"years_of_exp": "0",
"specification": "",
"skillValues": [ //Массив навыков привязанных к этому профилю
{
"id": "1",
"card_id": "1", //card_id из таблицы card_skill
"skill_id": "1",//skill_id из таблицы card_skill
"skill": {
"id": "1", //id из таблицы skill
"name": "SQL",
"category_id": "1"
}
},
//...
],
"achievements": [ //Массив достижений привязанных к этому профилю
{
"id": "7",
"user_card_id": "1",//user_card_id из таблицы achievement_user_card
"achievement_id": "1",//achievement_id из таблицы achievement_user_card
"achievement": {
"id": "1", //id из таблицы achievement
"slug": "newguy",
"title": "Новичок",
"img": "",
"description": "Ты начал у нас работу",
"status": "1" // 1 - Активно, 2 - Неактивно
}
},
//...
]
}
```
### Одна запись
`https://guild.craft-group.xyz/api/profile/{id}`
<p>
Для того, чтобы получить данные одной записи необходимо отправить <b>GET</b> запрос
на URL https://guild.craft-group.xyz/api/profile/{id} , где <b>id</b> это идентификатор
профиля.
</p>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/profile/6`
<p>
Возвращает объект <b>Профиля</b>. <br>
Как выглядит можно посмотреть выше.
</p>
### Получить профиль с флагом прав на просмотр отчётов этого пользователя
`https://guild.craft-group.xyz/api/profile/profile-with-report-permission`
<p>
Для получения профиля пользователя с флагом прав на просмотр отчётов этого пользователя, необходимо сделать
<b>GET</b> запрос на URL https://guild.craft-group.xyz/api/profile/add-to-interview
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
id
</td>
<td>
ID профиля пользователя
</td>
</tr>
</table>
## Основные данные пользователя
`https://guild.craft-group.xyz/api/profile/get-main-data?user_id=1`
<p>
Требуемые параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
Id профиля пользователя
</td>
</tr>
</table>
<p>
Возвращает объект <b>Пользователь</b>. <br>
Каждый объект <b>Пользователь</b> имеет такой вид:
</p>
```json5
{
"fio": "Тест менеджер для апи запроса",
"photo": null,
"gender": 1,
"level": 2,
"years_of_exp": null,
"specification": null,
"position_name": "Должность 1"
}
```
<p>
Возвращаемые параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
fio
</td>
<td>
ФИО
</td>
</tr>
<tr>
<td>
photo
</td>
<td>
Ссылка на фото
</td>
</tr>
<tr>
<td>
gender
</td>
<td>
Пол
</td>
</tr>
<tr>
<td>
level
</td>
<td>
Уровень
</td>
</tr>
<tr>
<td>
years_of_exp
</td>
<td>
Лет опыта
</td>
</tr>
<tr>
<td>
position_name
</td>
<td>
Должность
</td>
</tr>
</table>

975
docs/api/questionnaire.md Normal file
View File

@ -0,0 +1,975 @@
## Анкеты
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
questionnaire/questionnaires-list
</td>
<td>
Возвращает список анкет
</td>
</tr>
<tr>
<td>
questionnaire/questionnaire-completed
</td>
<td>
Завершение прохождение анкеты, проверка ответов
</td>
</tr>
<tr>
<td>
questionnaire/get-points-number
</td>
<td>
Число балов в анкете
</td>
</tr>
<tr>
<td>
questionnaire/get-question-number
</td>
<td>
Число вопросов в анкете
</td>
</tr>
<tr>
<td>
question/get-questions
</td>
<td>
Вопросы анкеты
</td>
</tr>
<tr>
<td>
answer/get-answers
</td>
<td>
Список возможных ответов на вопрос
</td>
</tr>
<tr>
<td>
user-response/set-response
</td>
<td>
Сохранить ответ пользователя
</td>
</tr>
<tr>
<td>
user-response/set-responses
</td>
<td>
Сохранить массив ответов пользователя
</td>
</tr>
<tr>
<td>
get
</td>
<td>
Возвращает менеджера
</td>
</tr>
</table>
### Список анкет
`https://guild.craft-group.xyz/api/user-questionnaire/questionnaires-list`
<p>
Для получения списка анкет необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/user-questionnaire/questionnaires-list
</p>
<p>
Требуемые параметры запроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя(int)
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/user-questionnaire/questionnaires-list?user_id=1`
<p>
Возвращает <b>массив</b> объектов записи <b>Назначенная анкета</b>. <br>
Каждый объектимеет такой вид:
</p>
```json5
{
"user_id": 1,
"uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"score": 11,
"status": 2,
"percent_correct_answers": 0.25,
"testing_date": "2022-03-17 11:14:22",
"questionnaire_title": "Кат1 Анкета 1 активна"
}
```
<p>
Возвращаемые параметры объекта анкета:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя(int)
</td>
</tr>
<tr>
<td>
uuid
</td>
<td>
uuid анкеты пользователя
</td>
</tr>
<tr>
<td>
score
</td>
<td>
Полученные балы(int)
</td>
</tr>
<tr>
<td>
status
</td>
<td>
Статус: 0 - не активен; 1 - активен; 2 - завершён; 3 - на проверке;
</td>
</tr>
<tr>
<td>
percent_correct_answers
</td>
<td>
Процент правильных ответов(float)
</td>
</tr>
<tr>
<td>
testing_date
</td>
<td>
Дата тестирования
</td>
</tr><tr>
<td>
questionnaire_title
</td>
<td>
Название анкеты
</td>
</tr>
</table>
<p>
Передаваемые параметры объекта вопроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя(int)
</td>
</tr>
<tr>
<td>
score
</td>
<td>
Полученные балы(int)
</td>
</tr>
<tr>
<td>
percent_correct_answers
</td>
<td>
Процент правильных ответов(float)
</td>
</tr>
</table>
<p>
Если пользователь не найден или у пользователя нет активных анкет будет отправлено следующее сообщение:
</p>
```json5
{
"name": "Not Found",
"message": "Active questionnaire not found",
"code": 0,
"status": 404,
"type": "yii\\web\\NotFoundHttpException"
}
```
### Проверить ответы в анкете
`https://guild.craft-group.xyz/api/user-questionnaire/questionnaire-completed`
<p>
Для выполнения проверки анкеты необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/user-questionnaire/questionnaire-completed
</p>
<p>
Требуемые параметры запроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначеной пользователю
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Возвращает <b>массив</b> объектов <b>Вопросов</b>. <br>
Каждый объект <b>Вопрос</b> имеет такой вид:
</p>
```json5
{
"id": 1,
"questionnaire_id": 1,
"user_id": 1,
"uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"created_at": "2021-10-20 13:06:12",
"updated_at": {
"expression": "NOW()",
"params": []
},
"score": 4,
"status": 1,
"percent_correct_answers": 0.5,
"testing_date": null
}
```
### Число балов в анкете
`https://guild.craft-group.xyz/api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Для максимального числа балов в анкеты необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/user-questionnaire/get-points-number
</p>
<p>
Требуемые параметры запроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначеной пользователю
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Возвращает максимально возможное число балов за анкету b>. <br>
Объект <b>Ответа</b> имеет такой вид:
</p>
```json5
{
"sum_point": "61"
}
```
### Число вопросов в анкете
`https://guild.craft-group.xyz/api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Для числа вопросов в анкете необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/user-questionnaire/get-question-number
</p>
<p>
Требуемые параметры запроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначеной пользователю
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Возвращает число вопросов в анкете b>. <br>
Объект <b>Ответа</b> имеет такой вид:
</p>
```json5
{
"question_number": "7"
}
```
### Вопросы анкеты
`https://guild.craft-group.xyz/api/question/get-questions`
<p>
Для получения вопросов анкеты необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/question/get-questions
</p>
<p>
Требуемые параметры запроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
uuid
</td>
<td>
UUID анкеты назначеной пользователю
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/question/get-questions?uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5`
<p>
Возвращает <b>массив</b> объектов <b>Вопросов</b>. <br>
Каждый объект <b>Вопрос</b> имеет такой вид:
</p>
```json5
{
"id": "4",
"question_type_id": "2",
"question_body": "Один ответ1",
"question_priority": null,
"next_question": null,
"time_limit": "00:22:00"
}
```
<p>
Передаваемые параметры объекта вопроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
question_type_id
</td>
<td>
ID типа вопроса(int)
</td>
</tr>
<tr>
<td>
question_body
</td>
<td>
Вопрос(string)
</td>
</tr>
<tr>
<td>
question_priority
</td>
<td>
Приоритет вопроса(int)(не используется)
</td>
</tr>
<tr>
<td>
next_question
</td>
<td>
Следующий вопрос(int)(не используется)
</td>
</tr>
<tr>
<td>
time_limit
</td>
<td>
Ограничение времени на ответ(time)
</td>
</tr>
</table>
<p>
Если вопрос не найден или не предпологает передачу ответов будет отправлено следующее сообщение:
</p>
```json5
{
"name": "Not Found",
"message": "Questions not found",
"code": 0,
"status": 404,
"type": "yii\\web\\NotFoundHttpException"
}
```
### Ответы на вопрос
`https://guild.craft-group.xyz/api/answer/get-answers`
<p>
Для получения вариантов ответов на вопрос анкеты нужно сделать <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/answer/get-answers
</p>
<p>
Требуемые параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
question_id
</td>
<td>
ID вопроса
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/answer/get-answers?question_id=7`
<p>
Возвращает <b>массив</b> объектов <b>Ответов</b>. <br>
Каждый объект <b>Ответа</b> имеет такой вид:
</p>
```json5
[
{
"id": "12",
"question_id": "7",
"answer_body": "Неск вар1 отв1 истина"
},
]
```
<p>
Передаваемые параметры объекта вопроса:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
question_id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
answer_body
</td>
<td>
Ответ(string)
</td>
</tr>
</table>
<p>
Если ответы не найдены или вопрос не предпологает их наличие(открытый вопрос) будет отправлено следующее сообщение:
</p>
```json5
{
"name": "Not Found",
"message": "Answer not found or question inactive",
"code": 0,
"status": 404,
"type": "yii\\web\\NotFoundHttpException"
}
```
### Один ответ пользователя
`https://guild.craft-group.xyz/api/user-response/set-response`
<p>
Для добавления ответа на вопрос от пользователя необходимо сделать <b>POST</b> запрос на URL https://guild.craft-group.xyz/api/user-response/set-response
</p>
<p>
Тело запроса содержит:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя
</td>
</tr>
<tr>
<td>
question_id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
response_body
</td>
<td>
Ответ пользователя(string 255)
</td>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначенной пользователю(string 36)
</td>
</tr>
</table>
<p>
Пример тела запроса:
</p>
```json5
{
"user_id": "1",
"question_id": "7",
"response_body": "oooooooooooo111111111",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5"
}
```
`https://guild.craft-group.xyz/api/user-response/set-response`
<p>
Возвращает объект <b>Ответа</b>. <br>
Объект <b>Ответа</b> имеет такой вид:
</p>
```json5
{
"user_id": "1",
"question_id": "7",
"response_body": "oooooooooooo111111111",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"created_at": {
"expression": "NOW()",
"params": []
},
"updated_at": {
"expression": "NOW()",
"params": []
},
"id": 191,
"answer_flag": 0
}
```
<p>
Ответ содержит:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя
</td>
</tr>
<tr>
<td>
question_id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
response_body
</td>
<td>
Ответ пользователя(string 255)
</td>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначенной пользователю(string 36)
</td>
</tr>
<tr>
<td>
answer_flag
</td>
<td>
Флаг ответа(1 - верно, 0 - ложно). Если отправлен ответ на открытый вопрос, флаг ответа не будет возвращаться до момента проверки в админ панели.
</td>
</tr>
</table>
<p>
В случаии ошибки в запросе будет отправлено сообщение следующего вида:
</p>
```json5
{
"name": "Bad Request",
"message": "{\"question_id\":[\"\В\о\п\р\о\с is invalid.\"]}",
"code": 0,
"status": 400,
"type": "yii\\web\\BadRequestHttpException"
}
```
### Массив ответов пользователя
`https://guild.craft-group.xyz/api/user-response/set-responses`
<p>
Для добавления массива ответов на вопросы от пользователя необходимо сделать <b>POST</b> запрос на URL https://guild.craft-group.xyz/api/user-response/set-responses
</p>
<p>
Тело запроса содержит JSON c массивом ответов со следующими параметрами:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя
</td>
</tr>
<tr>
<td>
question_id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
response_body
</td>
<td>
Ответ пользователя(string 255)
</td>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначенной пользователю(string 36)
</td>
</tr>
</table>
<p>
Пример тела запроса:
</p>
```json5
{
"userResponses": [
{
"user_id": "1",
"question_id": "7",
"response_body": "oooooooooooo111111111",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5"
},
{
"user_id": "1",
"question_id": "4",
"response_body": "oooooooooooo2222222",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5"
}
]
}
```
<p>
Возвращает массив объектов <b>ОтветПользователя</b>. <br>
Пример:
</p>
```json5
[
{
"user_id": "1",
"question_id": "7",
"response_body": "oooooooooooo111111111",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"created_at": {
"expression": "NOW()",
"params": []
},
"updated_at": {
"expression": "NOW()",
"params": []
},
"id": 192,
"answer_flag": 0
},
{
"user_id": "1",
"question_id": "7",
"response_body": "oooooooooooo111111111",
"user_questionnaire_uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5",
"created_at": {
"expression": "NOW()",
"params": []
},
"updated_at": {
"expression": "NOW()",
"params": []
},
"id": 193,
"answer_flag": 0
}
]
```
<p>
Ответ содержит:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
ID пользователя
</td>
</tr>
<tr>
<td>
question_id
</td>
<td>
ID вопроса(int)
</td>
</tr>
<tr>
<td>
response_body
</td>
<td>
Ответ пользователя(string 255)
</td>
</tr>
<tr>
<td>
user_questionnaire_uuid
</td>
<td>
UUID анкеты назначенной пользователю(string 36)
</td>
</tr>
<tr>
<td>
answer_flag
</td>
<td>
Флаг ответа(1 - верно, 0 - ложно)
</td>
</tr>
</table>
<p>
В случаии ошибки в запросе будет отправлено сообщение следующего вида:
</p>
```json5
{
"name": "Bad Request",
"message": "{\"question_id\":[\"\В\о\п\р\о\с is invalid.\"]}",
"code": 0,
"status": 400,
"type": "yii\\web\\BadRequestHttpException"
}
```

434
docs/api/reports.md Normal file
View File

@ -0,0 +1,434 @@
## Отчеты
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
api/reports
</td>
<td>
Список отчётов
</td>
</tr>
<tr>
<td>
api/reports/{id}
</td>
<td>
Один отчёт
</td>
</tr>
<tr>
<td>
find-by-date
</td>
<td>
Отчёт по дате
</td>
</tr>
<tr>
<td>
create
</td>
<td>
Создать отчёт
</td>
</tr>
<tr>
<td>
delete
</td>
<td>
Удалить отчёт
</td>
</tr>
<tr>
<td>
update
</td>
<td>
Изменить отчёт
</td>
</tr>
</table>
### Список
`https://guild.craft-group.xyz/api/reports`
<p>
Для получения списка отчетов необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/reports
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
fromDate*
</td>
<td>
Дата (yyyy-mm-dd) начала поиска отчетов.
</td>
</tr>
<tr>
<td>
toDate
</td>
<td>
Дата (yyyy-mm-dd) окончания поиска отчетов.
</td>
</tr>
<tr>
<td>
limit
</td>
<td>
Количество отчетов, которое вернет сервер при запросе (по умолчанию 10).
</td>
</tr>
<tr>
<td>
offset
</td>
<td>
Количество записей на которое нужно отступить в списке отчетов.
</td>
</tr>
<tr>
<td>
user_id
</td>
<td>
Идентификатор карточки пользователя отчета.
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/reports/index?fromDate=2021-08-01&toDate=2021-08-31&user_id=2&limit=3&offset=2`
### Один отчет
`https://guild.craft-group.xyz/api/reports/{id}`
<p>
Для получения отчета необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/reports/{id}
</p>
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
id*
</td>
<td>
ID отчета.
</td>
</tr>
</table>
<p>
Пример запроса на просмотр отчета с ID 13:
</p>
`https://guild.craft-group.xyz/api/reports/13`
### Отчёт по дате
`https://guild.craft-group.xyz/api/reports/find-by-date`
<p>
Для получения отчета необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/reports/find-by-date
</p>
<p>
Требуемые параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_card_id*
</td>
<td>
ID профиля пользователя
</td>
</tr>
<tr>
<td>
date*
</td>
<td>
Дата в формате: Y-m-d
</td>
</tr>
</table>
<p>
Пример запроса :
</p>
`https://guild.craft-group.xyz/api/reports/find-by-date?user_card_id=17&date=2022-02-14`
<p>
Пример ответа:
</p>
```json5
[
{
"id": "1",
"created_at": "2022-02-14",
"today": null,
"difficulties": "",
"tomorrow": "",
"status": null,
"user_card_id": "17",
"task": [
{
"id": "1",
"report_id": "1",
"task": "dfghjkl",
"hours_spent": "2",
"created_at": "1644842433",
"status": "1",
"minutes_spent": "4"
}
]
},
{
"id": "2",
"created_at": "2022-02-14",
"today": "dxvxv",
"difficulties": "сложности возникли",
"tomorrow": "завтра",
"status": null,
"user_card_id": "17",
"task": [
{
"id": "2",
"report_id": "2",
"task": "54651513",
"hours_spent": "4",
"created_at": "1644842630",
"status": "1",
"minutes_spent": "2"
}
]
}
]
```
### Создать отчет
`https://guild.craft-group.xyz/api/reports/create`
<p>
Для того, отправить приглашение профилю на собеседование, необходимо сделать
<b>POST</b> запрос на URL https://guild.craft-group.xyz/api/reports/create
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
created_at*
</td>
<td>
Дата (yyyy-mm-dd) создания.
</td>
</tr>
<tr>
<td>
user_card_id*
</td>
<td>
Идентификатор карточки пользователя.
</td>
</tr>
<tr>
<td>
tasks*
</td>
<td>
JSON массив содержащий объекты задач
<pre>
[{
"task" : "Рефакторинг",
"created_at": 1638260728,
"status": 1,
"minutes_spent": 26,
"hours_spent" : 3
}]
</pre>
</td>
</tr>
<tr>
<td>
difficulties
</td>
<td>
Сложности.
</td>
</tr>
<tr>
<td>
tomorrow
</td>
<td>
Планы на завтра.
</td>
</tr>
<tr>
<td>
status
</td>
<td>
Номер статуса.
</td>
</tr>
</table>
### Удалить отчет
`https://guild.craft-group.xyz/api/reports/delete`
<p>
Для удаления отчета необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/reports/delete
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
id*
</td>
<td>
Идентификатор отчета.
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/reports/delete?id=17`
### Обновить отчет
`https://guild.craft-group.xyz/api/reports/update`
<p>
Для удаления отчета необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/reports/update
</p>
<p>
Возможные параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
id*
</td>
<td>
Идентификатор отчета.
</td>
</tr>
<tr>
<td>
created_at
</td>
<td>
Дата (yyyy-mm-dd) создания.
</td>
</tr>
<tr>
<td>
today
</td>
<td>
Сделанное сегодня.
</td>
</tr>
<tr>
<td>
difficulties
</td>
<td>
Сложности.
</td>
</tr>
<tr>
<td>
tomorrow
</td>
<td>
Планы на завтра.
</td>
</tr>
<tr>
<td>
status
</td>
<td>
Номер статуса.
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/reports/update?id=18&created_at=2021-09-17&today=0&difficulties=diff&tomorrow=new task&status=1`

6
docs/api/skills.md Normal file
View File

@ -0,0 +1,6 @@
## Навыки
### Популярные навыки
`https://guild.craft-group.xyz/api/skills/skills-on-main-page`
<p>
Чтобы получить популярные навыки нужно сделать <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/skills/skills-on-main-page
</p>

200
docs/api/task-user.md Normal file
View File

@ -0,0 +1,200 @@
## Исполнители задачи
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
get-task-users
</td>
<td>
Список исплнителей задачи
</td>
</tr>
<tr>
<td>
set-task-users
</td>
<td>
Назначить исполнителя на задачу
</td>
</tr>
</table>
### Список исполнителей задачи
`https://guild.craft-group.xyz/api/task-user/get-task-users`
<p>
Для получения списка исполнителей необходимо отправить <b>GET</b> запрос на URL https://guild.craft-group.xyz/api/task-user/get-task-users
</p>
<p>
Требуемые параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
task_id
</td>
<td>
ID задачи
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/task-user/get-task-users?task_id=10`
<p>
Возвращает массив сотрудников проекта закреплённых за задачей. <br>
Каждый ответ имеет такой вид:
</p>
```json5
[
{
"id": 5,
"task_id": 10,
"project_user_id": 1
},
{
"id": 7,
"task_id": 10,
"project_user_id": 5
}
]
```
<p>
Параметры объекта <b>Исполнитель</b>:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
id
</td>
<td>
ID исполнителя задачи(int)
</td>
</tr>
<tr>
<td>
task_id
</td>
<td>
ID задачи(int)
</td>
</tr>
<tr>
<td>
project_user_id
</td>
<td>
ID сотрудника на проекте(int)
</td>
</tr>
</table>
<p>
Если задача не найдена будет отправлено следующее сообщение:
</p>
```json5
{
"name": "Not Found",
"message": "The task does not exist or there are no employees for it",
"code": 0,
"status": 404,
"type": "yii\\web\\NotFoundHttpException"
}
```
### Назначить сотрудника на задачу
`https://guild.craft-group.xyz/api/task-user/set-task-users`
<p>
Для назначения исполнителя необходимо отправить <b>POST</b> запрос на URL https://guild.craft-group.xyz/api/task-user/set-task-user
</p>
<p>
Требуемые параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
task_id
</td>
<td>
ID задачи
</td>
</tr>
<tr>
<td>
project_user_id
</td>
<td>
ID сотрудника на проекте
</td>
</tr>
</table>
<p>
Пример запроса:
</p>
`https://guild.craft-group.xyz/api/task-user/set-task-user`
<p>
Возвращает объект <b>Исполнителя задачи</b>.<br>
Каждый ответ имеет такой вид:
</p>
```json5
{
"task_id": "10",
"project_user_id": "5",
"id": 8
}
```
<p>
Если задача не найдена будет отправлено следующее сообщение:
</p>
```json5
{
"name": "Bad Request",
"message": "{\"task_id\":[\"\З\а\д\а\ч\а is invalid.\"]}",
"code": 0,
"status": 400,
"type": "yii\\web\\BadRequestHttpException"
}
```

321
docs/api/task.md Normal file
View File

@ -0,0 +1,321 @@
# Задачи
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
get-task-list
</td>
<td>
Возвращает список задач
</td>
</tr>
<tr>
<td>
get-task
</td>
<td>
Возвращает задачу
</td>
</tr>
<tr>
<td>
create-task
</td>
<td>
Создаёт задачу
</td>
</tr>
<tr>
<td>
update
</td>
<td>
Обновить задачу
</td>
</tr>
</table>
## Список задач
`https://guild.craft-group.xyz/api/task/get-task-list?project_id=1`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
project_id
</td>
<td>
Id проекта
</td>
</tr>
</table>
<p>
Без передачи параметра возвращает массив объектов <b>Задача</b> . С параметром <b>project_id</b>,
метод возвращает объекты <b>Задача</b> определённого проекта.
</p>
<p>
Возвращает <b>массив</b> объектов <b>Задача</b>. <br>
Каждый объект <b>Задача</b> имеет такой вид:
</p>
```json5
[
{
"id": "6",
"project_id": "74",
"title": "Название задачи",
"status": "1",
"created_at": "2021-12-20 16:29:39",
"updated_at": "2021-12-20 17:35:04",
"description": "Описание задачи",
"card_id_creator": "1",
"card_id": "3"
},
'...'
]
```
## Получить документ
`https://guild.craft-group.xyz/api/task/get-task?task_id=15`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
task_id
</td>
<td>
Id задачи
</td>
</tr>
</table>
<p>
Возвращает объект <b>Задача</b>. <br>
Каждый объект <b>Задача</b> имеет такой вид:
</p>
```json5
{
"id": 15,
"project_id": 74,
"title": "4324238888",
"status": 1,
"created_at": "2022-01-05 17:37:37",
"updated_at": "2022-01-05 17:46:10",
"description": "888",
"card_id_creator": 1,
"card_id": null
}
```
<p>
Пример ошибки:
</p>
```json5
{
"name": "Not Found",
"message": "The task does not exist",
"code": 0,
"status": 404,
"type": "yii\\web\\NotFoundHttpException"
}
```
## Создать документ
`https://guild.craft-group.xyz/api/document/create-document`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
title
</td>
<td>
Название задачи
</td>
</tr>
<tr>
<td>
project_id
</td>
<td>
Id проекта
</td>
</tr>
<tr>
<td>
status
</td>
<td>
статус задачи
</td>
</tr>
<tr>
<td>
card_id_creator
</td>
<td>
Id профиля создателя
</td>
</tr>
<tr>
<td>
card_id
</td>
<td>
Id профиля наблюдателя(не обязательный параметр)
</td>
</tr>
<tr>
<td>
description
</td>
<td>
Описание
</td>
</tr>
</table>
<p>
Создаёт <b>Задача</b>. Требует передачи <b>POST</b> запроса с соответствующими
параметрами
</p>
<p>
В случае указания не верных параметров буде возвращена соответствующая ошибка. Пример ошибки:
</p>
```json5
{
"name": "Internal Server Error",
"message": "{\"project_id\":[\"\П\р\о\е\к\т is invalid.\"]}",
"code": 0,
"status": 500,
"type": "yii\\web\\ServerErrorHttpException"
}
```
## Обновить задачу
`https://guild.craft-group.xyz/api/task/update`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
title
</td>
<td>
Название задачи
</td>
</tr>
<tr>
<td>
project_id
</td>
<td>
Id проекта
</td>
</tr>
<tr>
<td>
status
</td>
<td>
статус задачи
</td>
</tr>
<tr>
<td>
card_id_creator
</td>
<td>
Id профиля создателя
</td>
</tr>
<tr>
<td>
card_id
</td>
<td>
Id профиля наблюдателя(не обязательный параметр)
</td>
</tr>
<tr>
<td>
description
</td>
<td>
Описание
</td>
</tr>
</table>
<p>
Обновляет объект <b>Задача</b>. Требует передачи <b>POST</b> запроса с соответствующими
параметрами
</p>
<p>
В случае указания не верных параметров буде возвращена соответствующая ошибка. Пример ошибки:
</p>
```json5
{
"name": "Not Found",
"message": "The task does not exist",
"code": 0,
"status": 404,
"type": "yii\\web\\NotFoundHttpException"
}
```

219
docs/api/template.md Normal file
View File

@ -0,0 +1,219 @@
# Шаблоны
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
get-template-list
</td>
<td>
Возвращает список шаблонов
</td>
</tr>
<tr>
<td>
get-template-fields
</td>
<td>
Возвращает поля шаблона
</td>
</tr>
<tr>
<td>
get-template
</td>
<td>
Возвращает шаблон
</td>
</tr>
</table>
## Список шаблонов
`https://guild.craft-group.xyz/api/template/get-template-list?document_type=1`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
document_type
</td>
<td>
Тип документа. Возможные значения: 1 - Акт; 2 - Договор
</td>
</tr>
</table>
<p>
Без передачи параметра возвращает массив объектов <b>Шаблон</b> . С параметром <b>document_type</b>,
метод возвращает объекты <b>Шаблон</b> определённого типа(<b>1 - Акт; 2 - Договор</b>).
</p>
<p>
Возвращает <b>массив</b> объектов <b>Шаблон</b>. <br>
Каждый объект <b>Шаблон</b> имеет такой вид:
</p>
```json5
[
{
"id": "94",
"title": "Акт",
"created_at": "2022-01-11 11:47:11",
"updated_at": null,
"template_file_name": null,
"document_type": "2"
},
'...'
]
```
## Получить шаблон
`https://guild.craft-group.xyz/api/template/get-template?template_id=94`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
template_id
</td>
<td>
Id шаблона
</td>
</tr>
</table>
<p>
Возвращает объект <b>Шаблон</b>. <br>
Каждый объект <b>Шаблон</b> имеет такой вид:
</p>
```json5
{
"id": "94",
"title": "Акт",
"created_at": "2022-01-11 11:47:11",
"updated_at": null,
"template_file_name": null,
"document_type": "2"
}
```
## Получить поля шаблона
`https://guild.craft-group.xyz/api/template/get-template-fields?template_id=94`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
template_id
</td>
<td>
Id шаблона
</td>
</tr>
</table>
<p>
Возвращает объект <b>Шаблон</b>. <br>
Каждый объект <b>Шаблон</b> имеет такой вид:
</p>
```json5
{
"id": "94",
"title": "Акт",
"created_at": "2022-01-11 11:47:11",
"updated_at": null,
"template_file_name": null,
"document_type": "2",
"templateDocumentFields": [
{
"id": "159",
"template_id": "94",
"field_id": "43",
"field": {
"id": "43",
"title": "№ документа",
"field_template": "№ dokumenta"
}
},
{
"id": "160",
"template_id": "94",
"field_id": "44",
"field": {
"id": "44",
"title": "от",
"field_template": "ot"
}
},
{
"id": "161",
"template_id": "94",
"field_id": "45",
"field": {
"id": "45",
"title": "Сумма с НДС",
"field_template": "Summa s NDS"
}
},
{
"id": "162",
"template_id": "94",
"field_id": "46",
"field": {
"id": "46",
"title": "НДС",
"field_template": "NDS"
}
},
{
"id": "163",
"template_id": "94",
"field_id": "47",
"field": {
"id": "47",
"title": "Основание",
"field_template": "Osnovaniye"
}
}
]
}
```

126
docs/api/user.md Normal file
View File

@ -0,0 +1,126 @@
# Пользователь
## Методы
<table>
<tr>
<th>
Метод
</th>
<th>
Описание
</th>
</tr>
<tr>
<td>
get-user-card
</td>
<td>
Данные пользователя
</td>
</tr>
</table>
## Данные пользователя
`https://guild.craft-group.xyz/api/user-card/get-user-card?user_id=1`
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
user_id
</td>
<td>
Id пользователя
</td>
</tr>
</table>
<p>
Возвращает объект <b>Пользователь</b>. <br>
Каждый объект <b>Пользователь</b> имеет такой вид:
</p>
```json5
{
"fio": "Тест менеджер для апи запроса",
"photo": null,
"gender": 1,
"level": 2,
"years_of_exp": null,
"specification": null,
"position_name": "Должность 1"
}
```
<p>
Параметры:
</p>
<table>
<tr>
<th>
Параметры
</th>
<th>
Значение
</th>
</tr>
<tr>
<td>
fio
</td>
<td>
ФИО
</td>
</tr>
<tr>
<td>
photo
</td>
<td>
Ссылка на фото
</td>
</tr>
<tr>
<td>
gender
</td>
<td>
Пол
</td>
</tr>
<tr>
<td>
level
</td>
<td>
Уровень
</td>
</tr>
<tr>
<td>
years_of_exp
</td>
<td>
Лет опыта
</td>
</tr>
<tr>
<td>
position_name
</td>
<td>
Должность
</td>
</tr>
</table>

File diff suppressed because it is too large Load Diff

View File

@ -15371,3 +15371,167 @@ Stack trace:
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/"
2022/03/09 12:06:00 [error] 870#870: *239 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/09 12:06:01 [error] 869#869: *241 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=62286df8428f2 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/09 12:16:43 [error] 870#870: *314 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/09 12:16:43 [error] 870#870: *316 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=6228707b38412 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/gii/crud"
2022/03/10 10:30:50 [error] 847#847: *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/10 10:30:51 [error] 847#847: *4 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=6229a92a5b25c 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/10 12:55:35 [error] 847#847: *589 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 /site/login HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/10 12:55:35 [error] 847#847: *589 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"
2022/03/10 12:55:35 [error] 847#847: *589 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=6229cb175cfe2 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 12:55:42 [error] 846#846: *592 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 /site/index HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 12:55:42 [error] 846#846: *592 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=6229cb1e7f548 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/index"
2022/03/10 12:56:46 [error] 846#846: *592 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 /site/index HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 12:56:46 [error] 846#846: *592 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=6229cb5ea5bb8 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/index"
2022/03/10 12:56:49 [error] 846#846: *592 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/site/index"
2022/03/10 12:56:49 [error] 846#846: *592 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=6229cb61145d1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 12:56:50 [error] 846#846: *592 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: "POST /site/logout HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 12:56:50 [error] 846#846: *592 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/"
2022/03/10 12:56:50 [error] 846#846: *592 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 /site/login HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 12:56:50 [error] 846#846: *592 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=6229cb62b7da8 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/login"
2022/03/10 12:56:53 [error] 846#846: *592 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 /site/signup HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/login"
2022/03/10 12:56:53 [error] 846#846: *592 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=6229cb657ebfb HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/signup"
2022/03/10 12:57:21 [error] 846#846: *592 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: "POST /site/signup HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/signup"
2022/03/10 12:57:21 [error] 846#846: *592 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/site/signup"
2022/03/10 12:57:21 [error] 846#846: *592 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=6229cb8154459 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 13:00:25 [error] 847#847: *638 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to get property 'username' of non-object in /var/www/guild.loc/backend/views/layouts/header.php on line 237PHP message: PHP Notice: Trying to get property 'username' of non-object in /var/www/guild.loc/backend/views/layouts/header.php on line 245" while reading response header from upstream, client: 127.0.0.1, server: backend.guild.loc, request: "GET /site/sing HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "backend.guild.loc"
2022/03/10 13:00:33 [error] 847#847: *638 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to get property 'username' of non-object in /var/www/guild.loc/backend/views/layouts/header.php on line 237PHP message: PHP Notice: Trying to get property 'username' of non-object in /var/www/guild.loc/backend/views/layouts/header.php on line 245" while reading response header from upstream, client: 127.0.0.1, server: backend.guild.loc, request: "GET /site/sing HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "backend.guild.loc"
2022/03/10 13:01:05 [error] 847#847: *638 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to get property 'username' of non-object in /var/www/guild.loc/backend/views/layouts/header.php on line 237PHP message: PHP Notice: Trying to get property 'username' of non-object in /var/www/guild.loc/backend/views/layouts/header.php on line 245" while reading response header from upstream, client: 127.0.0.1, server: backend.guild.loc, request: "GET /site/sing HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "backend.guild.loc"
2022/03/10 13:01:12 [error] 847#847: *638 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to get property 'username' of non-object in /var/www/guild.loc/backend/views/layouts/header.php on line 237PHP message: PHP Notice: Trying to get property 'username' of non-object in /var/www/guild.loc/backend/views/layouts/header.php on line 245" while reading response header from upstream, client: 127.0.0.1, server: backend.guild.loc, request: "GET /site/sing HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "backend.guild.loc"
2022/03/10 13:01:19 [error] 847#847: *681 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/site/signup"
2022/03/10 13:01:19 [error] 847#847: *681 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=6229cc6fa86da HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 13:01:24 [error] 847#847: *681 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 /site/index HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/10 13:01:24 [error] 847#847: *681 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=6229cc74adf0a HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/index"
2022/03/10 13:01:26 [error] 847#847: *681 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 /access/access/index HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/index"
2022/03/10 13:01:27 [error] 847#847: *681 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=6229cc76e50a7 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/access/access/index"
2022/03/10 13:01:34 [error] 847#847: *681 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 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/access/access/index"
2022/03/10 13:01:34 [error] 847#847: *681 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=6229cc7e7e896 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/reports/reports/index"
2022/03/10 13:01:36 [error] 847#847: *690 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: "POST /site/logout HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/reports/reports/index"
2022/03/10 13:01:36 [error] 847#847: *690 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"
2022/03/10 13:01:36 [error] 847#847: *690 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 /site/login HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/reports/reports/index"
2022/03/10 13:01:36 [error] 847#847: *690 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=6229cc8030557 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/login"
2022/03/10 13:01:46 [error] 847#847: *690 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: "POST /site/login HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/site/login"
2022/03/10 13:01:46 [error] 847#847: *690 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/site/login"
2022/03/10 13:01:46 [error] 847#847: *690 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=6229cc8a610e3 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc", referrer: "http://guild.loc/"
2022/03/17 11:05:53 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:07:15 [error] 831#831: *3 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:09:18 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:09:26 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:09:47 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:10:06 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:10:08 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:10:37 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:10:50 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:11:21 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:11:28 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:11:53 [error] 831#831: *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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:13:03 [error] 831#831: *16 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:13:05 [error] 831#831: *16 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:13:23 [error] 831#831: *16 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:17:08 [error] 831#831: *20 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:19:13 [error] 831#831: *22 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:19:28 [error] 831#831: *22 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:20:31 [error] 831#831: *22 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:22:04 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:22:36 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:23:05 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:23:06 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:23:07 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:23:45 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:24:13 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:24:24 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:24:42 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:24:59 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:25:19 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:25:20 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:25:43 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:25:54 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:26:03 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:26:38 [error] 831#831: *26 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:28:46 [error] 831#831: *43 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:29:01 [error] 831#831: *43 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:30:33 [error] 831#831: *46 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:30:45 [error] 831#831: *46 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:33:18 [error] 831#831: *49 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:34:15 [error] 831#831: *49 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:34:39 [error] 831#831: *49 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 /api/user-card/get-user-card?user_id=6 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:37:07 [error] 831#831: *53 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:37:49 [error] 831#831: *53 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:40:15 [error] 831#831: *56 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:40:36 [error] 831#831: *56 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:41:35 [error] 831#831: *56 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:41:50 [error] 831#831: *56 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:43:02 [error] 831#831: *61 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:46:05 [error] 831#831: *63 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:55:07 [error] 831#831: *65 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:55:44 [error] 831#831: *65 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:56:10 [error] 831#831: *65 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:59:30 [error] 831#831: *69 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 11:59:45 [error] 831#831: *69 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:01:40 [error] 831#831: *72 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:07:58 [error] 831#831: *74 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:10:28 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:10:36 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id= HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:11:25 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id= HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:11:36 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:11:41 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id=1000 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:12:25 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id=1000 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:12:40 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id=1000 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:12:46 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id=10 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:12:51 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id= HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:12:58 [error] 831#831: *76 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 /api/user-card/get-user-card?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:24:20 [error] 831#831: *87 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:25:03 [error] 831#831: *87 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:26:20 [error] 831#831: *90 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:39:40 [error] 831#831: *92 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:39:47 [error] 831#831: *92 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:53:40 [error] 831#831: *95 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:56:17 [error] 831#831: *97 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:56:44 [error] 831#831: *97 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:58:48 [error] 831#831: *100 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:59:00 [error] 831#831: *100 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 12:59:14 [error] 831#831: *100 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:00:19 [error] 831#831: *104 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:01:23 [error] 831#831: *104 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:03:29 [error] 831#831: *107 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d002f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:05:37 [error] 831#831: *109 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d002f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:07:08 [error] 831#831: *111 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d002f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:07:46 [error] 831#831: *111 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d002f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:08:28 [error] 831#831: *111 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d002f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:09:56 [error] 831#831: *115 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d002f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:10:00 [error] 831#831: *115 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:10:43 [error] 831#831: *115 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:13:21 [error] 831#831: *119 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:13:35 [error] 831#831: *119 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:15:16 [error] 831#831: *122 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:15:51 [error] 831#831: *122 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:16:21 [error] 831#831: *122 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:17:43 [error] 831#831: *126 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:18:36 [error] 831#831: *126 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:18:41 [error] 831#831: *126 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:22:36 [error] 831#831: *130 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:22:57 [error] 831#831: *130 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:23:15 [error] 831#831: *130 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:24:46 [error] 831#831: *134 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:25:09 [error] 831#831: *134 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:25:26 [error] 831#831: *134 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:25:32 [error] 831#831: *134 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:25:37 [error] 831#831: *134 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:36:33 [error] 831#831: *140 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 /api/user-questionnaire/questionnaires-list?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:36:51 [error] 831#831: *140 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 /api/user-questionnaire/questionnaires-list?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:37:04 [error] 831#831: *140 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 /api/user-questionnaire/questionnaires-list?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 13:38:17 [error] 831#831: *144 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 /api/user-questionnaire/questionnaires-list?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:04:21 [error] 831#831: *230 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 /api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:04:53 [error] 831#831: *230 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 /api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:08:45 [error] 831#831: *233 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 /api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:09:03 [error] 831#831: *233 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 /api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:13:51 [error] 831#831: *247 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 /api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:14:07 [error] 831#831: *247 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 /api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:14:22 [error] 831#831: *247 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 /api/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:30:03 [error] 831#831: *251 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:33:41 [error] 831#831: *253 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:33:43 [error] 831#831: *253 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:34:36 [error] 831#831: *253 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 /api/user-questionnaire/get-points-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:34:46 [error] 831#831: *253 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 /api/user-questionnaire/get-question-number?user_questionnaire_uuid=d222f858-60fd-47fb-8731-dc9d5fc384c5 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"
2022/03/17 14:40:27 [error] 831#831: *258 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 /api/user-questionnaire/questionnaires-list?user_id=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "guild.loc"

View File

@ -4,14 +4,10 @@ namespace frontend\modules\api\controllers;
use common\models\Document;
use common\models\DocumentFieldValue;
use common\models\Template;
use common\models\TemplateDocumentField;
use Exception;
use common\services\DocumentService;
use Yii;
use yii\filters\auth\HttpBearerAuth;
use yii\web\BadRequestHttpException;
use yii\web\NotFoundHttpException;
use yii\rest\Controller;
use yii\web\ServerErrorHttpException;
class DocumentController extends ApiController
@ -20,33 +16,37 @@ class DocumentController extends ApiController
public function verbs(): array
{
return [
// 'get-task' => ['get'],
'get-document-list' => ['get'],
'get-document' => ['get'],
'create-document' => ['post'],
// 'update-task' => ['put', 'patch'],
];
}
public function actionGetDocumentList(): array
/**
* @throws NotFoundHttpException
*/
public function actionGetDocumentList($document_type = null): array
{
$documents = Document::find()->select(['id','title', 'manager_id'])->all();
$documents = DocumentService::getDocumentList($document_type);
if(empty($documents)) {
throw new NotFoundHttpException('Documents are not assigned');
throw new NotFoundHttpException('Documents not found');
}
return $documents;
}
public function actionGetDocument(): array
/**
* @throws NotFoundHttpException
*/
public function actionGetDocument($document_id): array
{
$document_id = Yii::$app->request->get('document_id');
if(empty($document_id) or !is_numeric($document_id))
{
throw new NotFoundHttpException('Incorrect document ID');
}
$document = Document::getDocument($document_id);
$document = DocumentService::getDocument($document_id);
if(empty($document)) {
throw new NotFoundHttpException('There is no such document');
@ -58,10 +58,7 @@ class DocumentController extends ApiController
public function actionCreateDocument()
{
$document = Yii::$app->getRequest()->getBodyParams();
$documentFieldValues = Yii::$app->getRequest()->getBodyParams()['documentFieldValues'];
$tmp = TemplateDocumentField::find()->select('field_id')
->where(['template_id' => 94])->asArray()->all();
$documentFieldValues = $document['documentFieldValues'];
$modelDocument = new Document();
if ($modelDocument->load($document, '') && $modelDocument->save()) {
@ -79,7 +76,7 @@ class DocumentController extends ApiController
}
Yii::$app->getResponse()->setStatusCode(201);
return Document::getDocument($modelDocument->id);
return DocumentService::getDocument($modelDocument->id);
}
private function createDocimentFields($documentFieldValues , $document_id, $template_id)

View File

@ -0,0 +1,33 @@
<?php
namespace frontend\modules\api\controllers;
use common\models\InterviewRequest;
use common\services\InterviewRequestService;
use Yii;
use yii\base\InvalidConfigException;
use yii\web\ServerErrorHttpException;
class InterviewRequestController extends ApiController
{
public function verbs(): array
{
return [
'create-interview-request' => ['post']
];
}
/**
* @throws InvalidConfigException
* @throws ServerErrorHttpException
*/
public function actionCreateInterviewRequest(): InterviewRequest
{
$InterviewRequestModel = InterviewRequestService::createInterviewRequest(Yii::$app->getRequest()->getBodyParams());
if ($InterviewRequestModel->errors) {
throw new ServerErrorHttpException(json_encode($InterviewRequestModel->errors));
}
return $InterviewRequestModel;
}
}

View File

@ -2,28 +2,11 @@
namespace frontend\modules\api\controllers;
use common\models\ManagerEmployee;
use common\models\User;
use common\models\UserCard;
use Yii;
use yii\filters\auth\HttpBearerAuth;
use yii\helpers\ArrayHelper;
use common\services\ManagerService;
use yii\web\NotFoundHttpException;
use yii\rest\Controller;
class ManagerController extends Controller
class ManagerController extends ApiController
{
public function behaviors(): array
{
$behaviors = parent::behaviors();
$behaviors['authenticator']['authMethods'] = [
HttpBearerAuth::className(),
];
return $behaviors;
}
public function verbs(): array
{
return [
@ -33,12 +16,14 @@ class ManagerController extends Controller
];
}
/**
* @throws NotFoundHttpException
*/
public function actionGetManagerList(): array
{
$managers = UserCard::find()->select(['fio','manager.id' , 'email'])
->joinWith('manager')->where(['NOT',['manager.user_card_id' => null]])->all();
$managers = ManagerService::getManagerList();
if(empty($managers)) {
if (empty($managers)) {
throw new NotFoundHttpException('Managers are not assigned');
}
@ -48,45 +33,33 @@ class ManagerController extends Controller
/**
* @throws NotFoundHttpException
*/
public function actionGetEmployeesManager()
public function actionGetManagerEmployeesList($manager_id): array
{
$manager_id = Yii::$app->request->get('manager_id');
if(empty($manager_id) or !is_numeric($manager_id))
{
if (empty($manager_id) or !is_numeric($manager_id)) {
throw new NotFoundHttpException('Incorrect manager ID');
}
$users_list = UserCard::find()
->select(['manager_employee.id', 'user_card.fio', 'user_card.email'])
->joinWith('managerEmployee')
->where(['manager_employee.manager_id' => $manager_id])
->all();
$managerEmployeesList = ManagerService::getManagerEmployeesList($manager_id);
if(empty($users_list)) {
if (empty($managerEmployeesList)) {
throw new NotFoundHttpException('Managers are not assigned or employees are not assigned to him');
}
return $users_list;
return $managerEmployeesList;
}
/**
* @throws NotFoundHttpException
*/
public function actionGetManager(): array
public function actionGetManager($manager_id): array
{
$manager_id = Yii::$app->request->get('manager_id');
if(empty($manager_id) or !is_numeric($manager_id))
{
if (empty($manager_id) or !is_numeric($manager_id)) {
throw new NotFoundHttpException('Incorrect manager ID');
}
$manager = UserCard::find()
->select(['manager.id', 'fio', 'email', 'photo', 'gender'])
->joinWith('manager')->where(['manager.id' => $manager_id])
->all();
$manager = ManagerService::getManager($manager_id);
if(empty($manager)) {
if (empty($manager)) {
throw new NotFoundHttpException('There is no such manager');
}

View File

@ -2,117 +2,51 @@
namespace frontend\modules\api\controllers;
use common\behaviors\GsCors;
use common\classes\Debug;
use common\models\InterviewRequest;
use common\models\User;
use common\models\UserCard;
use common\services\ProfileService;
use frontend\modules\api\models\ProfileSearchForm;
use kavalar\BotNotificationTemplateProcessor;
use kavalar\TelegramBotService;
use Yii;
use yii\filters\auth\CompositeAuth;
use yii\filters\auth\HttpBearerAuth;
use yii\filters\auth\QueryParamAuth;
use yii\filters\ContentNegotiator;
use yii\helpers\ArrayHelper;
use yii\web\BadRequestHttpException;
use yii\web\Response;
use yii\web\NotFoundHttpException;
use yii\web\ServerErrorHttpException;
class ProfileController extends ApiController
{
public function behaviors()
public function behaviors(): array
{
$parent = parent::behaviors();
$b = [
[
'class' => ContentNegotiator::className(),
'formats' => [
'application/json' => Response::FORMAT_JSON,
],
],
'authenticator' => [
'class' => CompositeAuth::class,
'authMethods' => [
HttpBearerAuth::class,
return ArrayHelper::merge(parent::behaviors(), [
'verbs' => [
'class' => \yii\filters\VerbFilter::class,
'actions' => [
'' => ['get'],
'profile-with-report-permission' => ['post', 'patch'],
'get-main-data' => ['get']
],
]
];
return array_merge($parent, $b);
]);
}
public function actionIndex($id = null)
/**
* @throws NotFoundHttpException
*/
public function actionIndex($id = null): ?array
{
$searchModel = new ProfileSearchForm();
$searchModel->attributes = \Yii::$app->request->get();
if ($id) {
return $searchModel->byId();
}
return $searchModel->byParams();
return ProfileService::getProfile($id, \Yii::$app->request->get());
}
public function actionProfileWithReportPermission($id)
/**
* @throws BadRequestHttpException
*/
public function actionProfileWithReportPermission($id): ?array
{
$searchModel = new ProfileSearchForm();
$searchModel->attributes = \Yii::$app->request->get();
$searcherUser = Yii::$app->user->getId();
$searcherProfileId = UserCard::findOne($searcherUser)->id;
if ($id && $searcherProfileId) {
if(!UserCard::find()->where(['id' => $id])->exists())
{
throw new BadRequestHttpException(json_encode('There is no user with this id'));
}
$profile = $searchModel->byId();
$profileService = new ProfileService($searcherProfileId, $id);
if($profileService->checkReportePermission()) {
$profile += ['report_permission' => '1'];
}
else {
$profile += ['report_permission' => '0'];
}
return $profile;
}
throw new BadRequestHttpException(json_encode('Missing required parameter'));
return ProfileService::getProfileWithReportPermission($id);
}
public function actionAddToInterview()
/**
* @throws ServerErrorHttpException
*/
public function actionGetMainData($user_id): array
{
if (\Yii::$app->request->isPost) {
$attributes = \Yii::$app->request->post();
$model = new InterviewRequest();
$model->attributes = $attributes;
$model->created_at = time();
$model->user_id = \Yii::$app->user->id;
if ($model->save()) {
\Yii::$app->telegram_bot->sendRenderedMessage('interview_request', $attributes);
return ['status' => 'success'];
}
\Yii::$app->response->statusCode = 400;
return ['status' => 'error', 'errors' => $model->errors];
}
return ProfileService::getMainData($user_id);
}
public function actionMe()
{
if(isset(\Yii::$app->user->id)){
$user = User::find()->with('userCard')->where(['id' => \Yii::$app->user->id])->one();
}
\Yii::$app->response->statusCode = 401;
return ['status' => 'error', 'errors' => 'No authorized'];
}
}
}

View File

@ -69,6 +69,27 @@ class ReportsController extends ApiController
return array_merge($report->toArray(), ['tasks' => $report->_task]);
}
/**
* @throws NotFoundHttpException
*/
public function actionFindByDate(): array
{
$reportsModel = new ReportSearchForm();
$params = Yii::$app->request->get();
if(!isset($params['user_card_id']) or !isset($params['date'])){
throw new NotFoundHttpException('Required parameter are missing!');
}
$reportsModel->attributes = $params;
$reportsModel->byDate = true;
if(!$reportsModel->validate()){
return $reportsModel->errors;
}
return $reportsModel->byParams();
}
public function actionCreate()
{
$params = Yii::$app->request->post();

View File

@ -3,27 +3,14 @@
namespace frontend\modules\api\controllers;
use common\models\Task;
use common\services\TaskService;
use Yii;
use yii\base\InvalidConfigException;
use yii\filters\auth\HttpBearerAuth;
use yii\rest\Controller;
use yii\web\BadRequestHttpException;
use yii\web\NotFoundHttpException;
use yii\web\ServerErrorHttpException;
class TaskController extends Controller
class TaskController extends ApiController
{
public function behaviors(): array
{
$behaviors = parent::behaviors();
$behaviors['authenticator']['authMethods'] = [
HttpBearerAuth::className(),
];
return $behaviors;
}
public function verbs(): array
{
return [
@ -37,113 +24,72 @@ class TaskController extends Controller
/**
* @throws InvalidConfigException
* @throws ServerErrorHttpException
* @throws NotFoundHttpException
*/
public function actionUpdate(): ?Task
{
$model = $this->findModelTask(Yii::$app->request->post('task_id'));
if(empty($model)) {
throw new NotFoundHttpException('The task does not exist');
}
$model->load(Yii::$app->request->getBodyParams(), '');
if ($model->save() === false && !$model->hasErrors()) {
throw new ServerErrorHttpException('Failed to update the object for unknown reason.');
}
return $model;
}
/**
* @throws InvalidConfigException
* @throws BadRequestHttpException
* @throws ServerErrorHttpException
*/
public function actionCreateTask(): Task
{
$task = Yii::$app->getRequest()->getBodyParams();
$model = new Task();
$model->load($task, '');
$this->validateTaskModel($model);
$this->saveModel($model);
return $model;
$taskModel = TaskService::createTask(Yii::$app->getRequest()->getBodyParams());
if ($taskModel->errors) {
throw new ServerErrorHttpException(json_encode($taskModel->errors));
}
return $taskModel;
}
/**
* @throws ServerErrorHttpException
* @throws NotFoundHttpException
*/
protected function saveModel($model)
public function actionGetTaskList($project_id = null): array
{
if ($model->save()) {
$task = Yii::$app->getResponse();
$task->setStatusCode(201);
} elseif (!$model->hasErrors()) {
throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
}
}
/**
* @throws BadRequestHttpException
*/
protected function validateTaskModel($model)
{
if(!$model->validate()) {
throw new BadRequestHttpException(json_encode($model->errors));
$tasks = array();
if ($project_id) {
if (empty($project_id) or !is_numeric($project_id)) {
throw new NotFoundHttpException('Incorrect project ID');
}
$tasks = TaskService::getTaskListByProject($project_id);
} else {
$tasks = TaskService::getTaskList($project_id);
}
if (empty($model->project_id)or empty($model->status)
or empty($model->description) or empty($model->title) or empty($model->card_id_creator)) {
throw new BadRequestHttpException(json_encode($model->errors));
}
}
public function actionGetTaskList(): array
{
$project_id = Yii::$app->request->get('project_id');
if(empty($project_id) or !is_numeric($project_id))
{
throw new NotFoundHttpException('Incorrect project ID');
}
$tasks = $this->findModelsById($project_id);
if(empty($tasks)) {
if (empty($tasks)) {
throw new NotFoundHttpException('The project does not exist or there are no tasks for it');
}
return $tasks;
}
public function actionGetTask(): Task
/**
* @throws NotFoundHttpException
*/
public function actionGetTask($task_id): Task
{
$task_id = Yii::$app->request->get('task_id');
if(empty($task_id) or !is_numeric($task_id))
{
if (empty($task_id) or !is_numeric($task_id)) {
throw new NotFoundHttpException('Incorrect task ID');
}
$task = $this->findModelTask($task_id);
if(empty($task)) {
$task = TaskService::getTask($task_id);
if (empty($task)) {
throw new NotFoundHttpException('The task does not exist');
}
return $task;
}
private function findModelTask($task_id): ?Task
/**
* @throws InvalidConfigException
* @throws ServerErrorHttpException
* @throws NotFoundHttpException
*/
public function actionUpdate(): ?Task
{
return Task::findOne($task_id);
}
$params = Yii::$app->request->getBodyParams();
if (empty ($params['task_id']) or !TaskService::taskExists($params['task_id'])) {
throw new NotFoundHttpException('The task does not exist');
}
private function findModelsById($project_id): array
{
return Task::find()->where(['project_id' => $project_id])->all();
$modelTask = TaskService::updateTask($params);
if (!empty($modelTask->hasErrors())) {
throw new ServerErrorHttpException(json_encode('Bad params'));
}
return $modelTask;
}
}

View File

@ -9,19 +9,8 @@ use yii\rest\Controller;
use yii\web\BadRequestHttpException;
use yii\web\NotFoundHttpException;
class TaskUserController extends Controller
class TaskUserController extends ApiController
{
public function behaviors(): array
{
$behaviors = parent::behaviors();
$behaviors['authenticator']['authMethods'] = [
HttpBearerAuth::className(),
];
return $behaviors;
}
public function verbs(): array
{
return [

View File

@ -2,14 +2,8 @@
namespace frontend\modules\api\controllers;
use common\models\Document;
use common\models\Template;
use Yii;
use yii\filters\auth\CompositeAuth;
use yii\filters\auth\HttpBearerAuth;
use yii\filters\ContentNegotiator;
use common\services\TemplateService;
use yii\web\NotFoundHttpException;
use yii\web\Response;
class TemplateController extends ApiController
{
@ -19,44 +13,57 @@ class TemplateController extends ApiController
return [
'get-template-list' => ['get'],
'get-template-fields' => ['get'],
'get-template' => ['get'],
];
}
public function actionGetTemplateList(): array
/**
* @throws NotFoundHttpException
*/
public function actionGetTemplateList($document_type = null): array
{
$document_type = Yii::$app->request->get('document_type');
$templateList = TemplateService::getTemplateList($document_type);
if (!empty($document_type)) {
$template = Template::find()->where(['document_type' => $document_type])->asArray()->all();
}
else {
$template = Template::find()->asArray()->all();
if (empty($templateList)) {
throw new NotFoundHttpException('No templates found');
}
if (empty($template)) {
throw new NotFoundHttpException('Documents are not assigned');
}
return $template;
return $templateList;
}
public function actionGetTemplateFields(): array
/**
* @throws NotFoundHttpException
*/
public function actionGetTemplateFields($template_id): array
{
$template_id = Yii::$app->request->get('template_id');
if (empty($template_id) or !is_numeric($template_id)) {
throw new NotFoundHttpException('Incorrect template ID');
}
$templates = Template::find()
->joinWith('templateDocumentFields.field')
->where(['template.id' => $template_id])
->asArray()
->all();
$templateWithFields = TemplateService::getTemplateWithFields($template_id);
if (empty($templates)) {
throw new NotFoundHttpException('Documents are not assigned');
if (empty($templateWithFields)) {
throw new NotFoundHttpException('No template found');
}
return $templates;
return $templateWithFields;
}
/**
* @throws NotFoundHttpException
*/
public function actionGetTemplate($template_id): array
{
if (empty($template_id) or !is_numeric($template_id)) {
throw new NotFoundHttpException('Incorrect template ID');
}
$template = TemplateService::getTemplate($template_id);
if (empty($template)) {
throw new NotFoundHttpException('No template found');
}
return $template;
}
}

View File

@ -2,58 +2,79 @@
namespace frontend\modules\api\controllers;
use common\models\UserQuestionnaire;
use Yii;
use yii\filters\auth\HttpBearerAuth;
use yii\rest\Controller;
use common\services\UserQuestionnaireService;
use yii\helpers\ArrayHelper;
use yii\web\NotFoundHttpException;
use yii\web\ServerErrorHttpException;
class UserQuestionnaireController extends ApiController
{
public function behaviors()
public function behaviors(): array
{
$behaviors = parent::behaviors();
return ArrayHelper::merge(parent::behaviors(), [
$behaviors['authenticator']['authMethods'] = [
HttpBearerAuth::className(),
];
return $behaviors;
}
public function verbs()
{
return [
'questionnaires-list' => ['get'],
];
'verbs' => [
'class' => \yii\filters\VerbFilter::class,
'actions' => [
'questionnaires-list' => ['get'],
'questionnaire-completed' => ['get'],
'get-points-number' => ['get'],
'get-question-number' => ['get'],
],
]
]);
}
/**
* @throws NotFoundHttpException
*/
public function actionQuestionnairesList(): array
public function actionQuestionnairesList($user_id): array
{
$user_id = Yii::$app->request->get('user_id');
if(empty($user_id) or !is_numeric($user_id))
{
if (empty($user_id) or !is_numeric($user_id)) {
throw new NotFoundHttpException('Incorrect user ID');
}
$userQuestionnaireModel = UserQuestionnaire::findActiveUserQuestionnaires($user_id);
if(empty($userQuestionnaireModel)) {
$userQuestionnaireModels = UserQuestionnaireService::getQuestionnaireList($user_id);
if(empty($userQuestionnaireModels)) {
throw new NotFoundHttpException('Active questionnaire not found');
}
return $userQuestionnaireModels;
}
array_walk( $userQuestionnaireModel, function(&$arr){
unset(
$arr['questionnaire_id'],
$arr['created_at'],
$arr['updated_at'],
$arr['id'],
);
});
/**
* @throws NotFoundHttpException
* @throws ServerErrorHttpException
*/
public function actionQuestionnaireCompleted($user_questionnaire_uuid)
{
$userQuestionnaireModel = UserQuestionnaireService::calculateScore($user_questionnaire_uuid);
if ($userQuestionnaireModel->errors) {
throw new ServerErrorHttpException($userQuestionnaireModel->errors);
}
return $userQuestionnaireModel;
}
return $userQuestionnaireModel;
/**
* @throws ServerErrorHttpException
*/
public function actionGetPointsNumber($user_questionnaire_uuid)
{
$questionPointsNumber = UserQuestionnaireService::getPointsNumber($user_questionnaire_uuid);
if (empty($questionPointsNumber)) {
throw new ServerErrorHttpException('Question points not found!');
}
return $questionPointsNumber;
}
/**
* @throws ServerErrorHttpException
*/
public function actionGetQuestionNumber($user_questionnaire_uuid)
{
$questionNumber = UserQuestionnaireService::getQuestionNumber($user_questionnaire_uuid);
if (empty($questionNumber)) {
throw new ServerErrorHttpException('Question number not found!');
}
return $questionNumber;
}
}

View File

@ -3,29 +3,14 @@
namespace frontend\modules\api\controllers;
use common\models\UserResponse;
use Exception;
use common\services\UserResponseService;
use Yii;
use yii\base\InvalidConfigException;
use yii\filters\auth\HttpBearerAuth;
use yii\rest\ActiveController;
use yii\web\BadRequestHttpException;
use yii\web\ServerErrorHttpException;
class UserResponseController extends ActiveController
class UserResponseController extends ApiController
{
public $modelClass = 'common\models\UserResponse';
public function behaviors(): array
{
$behaviors = parent::behaviors();
$behaviors['authenticator']['authMethods'] = [
HttpBearerAuth::className(),
];
return $behaviors;
}
public function verbs(): array
{
return [
@ -34,82 +19,31 @@ class UserResponseController extends ActiveController
];
}
public function actions()
{
$actions = parent::actions();
unset($actions['create']);
return $actions;
}
/**
* @throws InvalidConfigException
* @throws BadRequestHttpException
* @throws ServerErrorHttpException
* @throws ServerErrorHttpException|BadRequestHttpException
*/
public function actionSetResponse()
public function actionSetResponse(): UserResponse
{
$request = Yii::$app->getRequest()->getBodyParams();
$model = new UserResponse();
$model->load($request, '');
$this->validateResponseModel($model);
$this->saveModel($model);
return $model;
$userResponseModel = UserResponseService::createUserResponse(Yii::$app->getRequest()->getBodyParams());
if ($userResponseModel->errors) {
throw new ServerErrorHttpException(json_encode($userResponseModel->errors));
}
return $userResponseModel;
}
/**
* @throws InvalidConfigException
* @throws ServerErrorHttpException
* @throws BadRequestHttpException
* @throws ServerErrorHttpException|BadRequestHttpException
*/
public function actionSetResponses(): array
{
$requests = Yii::$app->getRequest()->getBodyParams();
$responseModels = array();
foreach ($requests['userResponses'] as $request) {
$model = new UserResponse();
$model->load($request, '');
$this->validateResponseModel($model);
array_push($responseModels, $model);
}
foreach ($responseModels as $responseModel) {
$this->saveModel($responseModel);
}
return $responseModels;
}
/**
* @throws BadRequestHttpException
*/
protected function validateResponseModel($model)
{
if(!$model->validate()) {
throw new BadRequestHttpException(json_encode($model->errors));
}
if (empty($model->user_id) or empty($model->question_id) or empty($model->user_questionnaire_uuid)) {
throw new BadRequestHttpException(json_encode($model->errors));
}
}
/**
* @throws ServerErrorHttpException
*/
protected function saveModel($model)
{
if ($model->save()) {
$response = Yii::$app->getResponse();
$response->setStatusCode(201);
} elseif (!$model->hasErrors()) {
throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
$userResponseModels = UserResponseService::createUserResponses(Yii::$app->getRequest()->getBodyParams());
foreach ($userResponseModels as $model) {
if ($model->errors) {
throw new ServerErrorHttpException(json_encode($model->errors));
}
}
return $userResponseModels;
}
}

View File

@ -86,7 +86,7 @@ class ProfileSearchForm extends Model
$model->andWhere(['status' => [4, 12]]);
$model->andWhere(['deleted_at' => null]);
$model->groupBy('card_skill.card_id');
//$model->groupBy('card_skill.card_id');
$res = $model->limit($this->limit)
->offset($this->offset)->orderBy('updated_at DESC')->asArray()->all();

View File

@ -18,6 +18,7 @@ class ReportSearchForm extends Model
* @var false
*/
public $byDate;
public $date;
public function __construct($config = [])
{
@ -27,6 +28,7 @@ class ReportSearchForm extends Model
$this->toDate = date('Y-m-d', time());
$this->fromDate = date('Y-m-01', time());
$this->date = date('Y-m-d');
$this->byDate = false;
parent::__construct($config);
@ -36,7 +38,7 @@ class ReportSearchForm extends Model
{
return [
[['byDate'], 'safe'],
[['fromDate', 'toDate'], 'date', 'format' => 'php:Y-m-d'],
[['fromDate', 'toDate', 'date'], 'date', 'format' => 'php:Y-m-d'],
[['limit', 'offset', 'user_id'], 'integer', 'min' => 0],
];
}
@ -47,7 +49,7 @@ class ReportSearchForm extends Model
->with('task');
if ($this->byDate) {
$queryBuilder->andWhere(['reports.created_at' => $this->byDate]);
$queryBuilder->andWhere(['reports.created_at' => $this->date]);
} else {
$queryBuilder->andWhere(['between', 'reports.created_at', $this->fromDate, $this->toDate]);
}