From ca26ee9aad3de7bc55f0e795d76f97bf9770fcf7 Mon Sep 17 00:00:00 2001 From: gerchek Date: Thu, 24 Mar 2022 04:23:24 +0000 Subject: [PATCH] update server builder --- plugins/atash/contact/lang/en/lang.php | 6 +++- plugins/atash/contact/lang/ru/lang.php | 10 +++++++ plugins/atash/contact/models/CreditClass.php | 29 +++++++++++++++++++ .../contact/models/creditclass/fields.yaml | 15 ++++++++++ .../contact/models/onlinecard/fields.yaml | 15 ++++++++++ ...r_table_update_atash_contact_credit_10.php | 23 +++++++++++++++ ...er_table_update_atash_contact_credit_6.php | 25 ++++++++++++++++ ...er_table_update_atash_contact_credit_7.php | 23 +++++++++++++++ ...er_table_update_atash_contact_credit_8.php | 23 +++++++++++++++ ...er_table_update_atash_contact_credit_9.php | 23 +++++++++++++++ ...ble_update_atash_contact_online_card_5.php | 25 ++++++++++++++++ plugins/atash/contact/updates/version.yaml | 18 ++++++++++++ plugins/vdomah/jwtauth/routes.php | 2 ++ 13 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 plugins/atash/contact/lang/ru/lang.php create mode 100644 plugins/atash/contact/updates/builder_table_update_atash_contact_credit_10.php create mode 100644 plugins/atash/contact/updates/builder_table_update_atash_contact_credit_6.php create mode 100644 plugins/atash/contact/updates/builder_table_update_atash_contact_credit_7.php create mode 100644 plugins/atash/contact/updates/builder_table_update_atash_contact_credit_8.php create mode 100644 plugins/atash/contact/updates/builder_table_update_atash_contact_credit_9.php create mode 100644 plugins/atash/contact/updates/builder_table_update_atash_contact_online_card_5.php diff --git a/plugins/atash/contact/lang/en/lang.php b/plugins/atash/contact/lang/en/lang.php index e6dd076..f13bab0 100644 --- a/plugins/atash/contact/lang/en/lang.php +++ b/plugins/atash/contact/lang/en/lang.php @@ -2,5 +2,9 @@ 'plugin' => [ 'name' => 'contact', 'description' => '' + ], +'app' => [ + 'name' => 'October CMS', + 'tagline' => 'Getting Back to Basics' ] -]; \ No newline at end of file +]; diff --git a/plugins/atash/contact/lang/ru/lang.php b/plugins/atash/contact/lang/ru/lang.php new file mode 100644 index 0000000..cd55c3d --- /dev/null +++ b/plugins/atash/contact/lang/ru/lang.php @@ -0,0 +1,10 @@ + [ + 'name' => 'contact', + 'description' => '' + ], +'app' => [ + 'name' => 'October CMS ru', + 'tagline' => 'Getting Back to Basics' + ] +]; diff --git a/plugins/atash/contact/models/CreditClass.php b/plugins/atash/contact/models/CreditClass.php index d6b6061..307c159 100644 --- a/plugins/atash/contact/models/CreditClass.php +++ b/plugins/atash/contact/models/CreditClass.php @@ -21,6 +21,35 @@ class CreditClass extends Model */ public $table = 'atash_contact_credit'; +//public function getStatusOptions($keyValue = null) +//{ + // $keyValue = $this->getAttributeFromArray('status'); + +// $options['Salam'] = 'SALAM'; +// $options['Sagbol'] = 'SAGBOL'; +//$options['Salam'] = 'SALAM'; +//$options['Sag bol'] = e(trans('atash.contact::lang.app.name')); + // $options[e(trans('habinho.school::lang.lesson.monday'))] = e(trans('habinho.school::lang.lesson.monday')); + // $options[e(trans('habinho.school::lang.lesson.tuesday'))] = e(trans('habinho.school::lang.lesson.tuesday')); + // $options[e(trans('habinho.school::lang.lesson.wednesday'))] = e(trans('habinho.school::lang.lesson.wednesday')); + // $options[e(trans('habinho.school::lang.lesson.thursday'))] = e(trans('habinho.school::lang.lesson.thursday')); + // $options[e(trans('habinho.school::lang.lesson.friday'))] = e(trans('habinho.school::lang.lesson.friday')); + // $options[e(trans('habinho.school::lang.lesson.saturday'))] = e(trans('habinho.school::lang.lesson.saturday')); + // $options[e(trans('habinho.school::lang.lesson.sunday'))] = e(trans('habinho.school::lang.lesson.sunday')); + + // return $options; +//} + +//public function getStatusAttribute($value) +//{ + // return $value; +// return $this->getStatusOptions()[$value]; +//} + +//public $implement = ['RainLab.Translate.Behaviors.TranslatableModel']; + + // public $translatable = ['status','action']; + /** * @var array Validation rules */ diff --git a/plugins/atash/contact/models/creditclass/fields.yaml b/plugins/atash/contact/models/creditclass/fields.yaml index 484c7a3..cc53aff 100644 --- a/plugins/atash/contact/models/creditclass/fields.yaml +++ b/plugins/atash/contact/models/creditclass/fields.yaml @@ -80,3 +80,18 @@ fields: label: TYPE span: auto type: text + action: + label: Действие + size: small + span: full + type: textarea + status: + label: Status + options: + 1: Ugradyldy + 2: 'Kabul edildi' + 3: Seredilýär + 4: Tassyklanan + 5: 'Kabul edilmedi' + span: auto + type: balloon-selector diff --git a/plugins/atash/contact/models/onlinecard/fields.yaml b/plugins/atash/contact/models/onlinecard/fields.yaml index 5af0b66..83ef9ec 100644 --- a/plugins/atash/contact/models/onlinecard/fields.yaml +++ b/plugins/atash/contact/models/onlinecard/fields.yaml @@ -86,3 +86,18 @@ fields: label: 'Кодовое слово:' span: auto type: text + status: + label: Статус + options: + 1: Ugradyldy + 2: 'Kabul edildi' + 3: Seredilýär + 4: 'Kart çykaryldy' + 5: 'Kart çykarylmady' + span: left + type: balloon-selector + action: + label: Действие + size: small + span: right + type: textarea diff --git a/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_10.php b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_10.php new file mode 100644 index 0000000..fb24ca4 --- /dev/null +++ b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_10.php @@ -0,0 +1,23 @@ +text('action')->default('Sagbol')->change(); + }); + } + + public function down() + { + Schema::table('atash_contact_credit', function($table) + { + $table->text('action')->default(null)->change(); + }); + } +} diff --git a/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_6.php b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_6.php new file mode 100644 index 0000000..7213246 --- /dev/null +++ b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_6.php @@ -0,0 +1,25 @@ +string('status')->default('1'); + $table->text('action'); + }); + } + + public function down() + { + Schema::table('atash_contact_credit', function($table) + { + $table->dropColumn('status'); + $table->dropColumn('action'); + }); + } +} diff --git a/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_7.php b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_7.php new file mode 100644 index 0000000..b96c9c0 --- /dev/null +++ b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_7.php @@ -0,0 +1,23 @@ +text('action')->default('null')->change(); + }); + } + + public function down() + { + Schema::table('atash_contact_credit', function($table) + { + $table->text('action')->default(null)->change(); + }); + } +} diff --git a/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_8.php b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_8.php new file mode 100644 index 0000000..b037779 --- /dev/null +++ b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_8.php @@ -0,0 +1,23 @@ +text('action')->default('null')->change(); + }); + } + + public function down() + { + Schema::table('atash_contact_credit', function($table) + { + $table->text('action')->default(null)->change(); + }); + } +} diff --git a/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_9.php b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_9.php new file mode 100644 index 0000000..fefcec2 --- /dev/null +++ b/plugins/atash/contact/updates/builder_table_update_atash_contact_credit_9.php @@ -0,0 +1,23 @@ +text('action')->nullable()->change(); + }); + } + + public function down() + { + Schema::table('atash_contact_credit', function($table) + { + $table->text('action')->nullable(false)->change(); + }); + } +} diff --git a/plugins/atash/contact/updates/builder_table_update_atash_contact_online_card_5.php b/plugins/atash/contact/updates/builder_table_update_atash_contact_online_card_5.php new file mode 100644 index 0000000..94ca172 --- /dev/null +++ b/plugins/atash/contact/updates/builder_table_update_atash_contact_online_card_5.php @@ -0,0 +1,25 @@ +string('status')->nullable()->default('1'); + $table->text('action')->nullable(); + }); + } + + public function down() + { + Schema::table('atash_contact_online_card', function($table) + { + $table->dropColumn('status'); + $table->dropColumn('action'); + }); + } +} diff --git a/plugins/atash/contact/updates/version.yaml b/plugins/atash/contact/updates/version.yaml index 54f14e8..7b6c412 100644 --- a/plugins/atash/contact/updates/version.yaml +++ b/plugins/atash/contact/updates/version.yaml @@ -48,3 +48,21 @@ 1.0.17: - 'Updated table atash_contact_online_card' - builder_table_update_atash_contact_online_card_4.php +1.0.18: + - 'Updated table atash_contact_credit' + - builder_table_update_atash_contact_credit_6.php +1.0.19: + - 'Updated table atash_contact_credit' + - builder_table_update_atash_contact_credit_7.php +1.0.20: + - 'Updated table atash_contact_credit' + - builder_table_update_atash_contact_credit_8.php +1.0.21: + - 'Updated table atash_contact_credit' + - builder_table_update_atash_contact_credit_9.php +1.0.22: + - 'Updated table atash_contact_credit' + - builder_table_update_atash_contact_credit_10.php +1.0.23: + - 'Updated table atash_contact_online_card' + - builder_table_update_atash_contact_online_card_5.php diff --git a/plugins/vdomah/jwtauth/routes.php b/plugins/vdomah/jwtauth/routes.php index c1f2428..5d75d73 100644 --- a/plugins/vdomah/jwtauth/routes.php +++ b/plugins/vdomah/jwtauth/routes.php @@ -330,6 +330,8 @@ Route::group(['prefix' => 'api'], function() { // dd($Credit); $Credit->save(); + //$data['status'] = $Credit->status; + //$data['action'] = $Credit->action; return Response::json(compact('data'));