]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Правки по формированию и сообщениям
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 27 Dec 2024 10:41:04 +0000 (13:41 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 27 Dec 2024 10:41:04 +0000 (13:41 +0300)
erp24/migrations/m241220_131428_create_sent_kogort_table.php
erp24/records/UsersMessageManagement.php
erp24/views/users-message-management/view-kogort.php

index b0b82e26e17bd457af00723179773d97a9b0c86b..1c9a872f73a2d732eb8f2597dd9d8829f6309ef2 100644 (file)
@@ -17,7 +17,7 @@ class m241220_131428_create_sent_kogort_table extends Migration
 
         if (!isset($tableSchema)) {
             $this->createTable(self::TABLE_NAME, [
-                'id' => $this->bigInteger()->comment('ID'),
+                'id' => $this->bigPrimaryKey()->comment('ID'),
                 'phone' => $this->string(15)->notNull()->comment('Телефон пользователя'),
                 'kogort_number' => $this->integer()->notNull()->comment('Номер типа когорты когорты'),
                 'kogort_date' => $this->date()->notNull()->comment('Дата когорты'),
@@ -27,7 +27,7 @@ class m241220_131428_create_sent_kogort_table extends Migration
                 'purchase' => $this->tinyInteger(1)->notNull()->defaultValue(0)->comment('Покупка'),
                 'created_at' => $this->dateTime()->notNull()->defaultExpression('CURRENT_TIMESTAMP')->comment('Дата создания записи'),
             ]);
-           // $this->addPrimaryKey('pk_sent_kogort', self::TABLE_NAME, 'id');
+
         }
     }
 
index 076830b8a5d0e2fbb43eabd533e99fe0595f9082..34cd110dc7c9a4009660a40b604ed07adfc980fc 100644 (file)
@@ -43,7 +43,7 @@ class UsersMessageManagement extends \yii\db\ActiveRecord
     const TYPE_MESSAGE = [
         'target' => 'offer_text',
         'whatsapp' => 'offer_whatsapp',
-        //'call' => 'offer_text',
+        'call' => 'offer_text',
         ];
     /**
      * {@inheritdoc}
index d559fc39587b9be83699290c8eb17e93e2869ef5..21dea9f80d2dd550bcbcf3e61303b39bc5771df0 100644 (file)
@@ -41,7 +41,7 @@ if ($message == '') {
     <h1><?= Html::encode($this->title) ?>: <?= \yii_app\records\Users::KOGORT_TYPES[$type] ?>
         на <span style="color:red"><?= date('d-m-Y', strtotime($date)) ?></span></h1>
 
-
+<?php if ($type != 'call') { ?>
     <div class="row mb-6">
         <div class="col-lg-4 col-md-6 col-sm-8 col-xs-12 col-xl-4">
 
@@ -60,7 +60,7 @@ if ($message == '') {
             </div>
         </div>
     </div>
-
+<?php } ?>
 
 
     <?= GridView::widget([