improve customer api & gui

This commit is contained in:
Roland Schneider
2021-10-02 22:21:14 +02:00
parent 1d065cc729
commit f98dcb656f
44 changed files with 893 additions and 298 deletions

View File

@@ -11,6 +11,7 @@ use yii\helpers\ArrayHelper;
*
* @property integer $id
* @property string $name
* @property string $theme
* @property string $created_at
* @property string $updated_at
*/
@@ -30,9 +31,10 @@ class EventType extends \yii\db\ActiveRecord
public function rules()
{
return [
[['name'], 'required'],
[['name','theme'], 'required'],
[['name'], 'unique'],
[['name'], 'string', 'max' => 255]
[['name'], 'string', 'max' => 255],
[['theme'], 'string', 'max' => 50]
];
}
@@ -104,4 +106,12 @@ class EventType extends \yii\db\ActiveRecord
// TODO: implement bossiness logic to select ticket
return $possibleTickets[0];
}
static function themes() {
$themes = [];
for ($x = 0; $x < 10; $x++) {
$themes[$x] = "Színtéma " . ($x+1);
}
return $themes;
}
}