diff --git a/plugins/romanah/gokbakja/Plugin.php b/plugins/romanah/gokbakja/Plugin.php index d7db121..80508b9 100644 --- a/plugins/romanah/gokbakja/Plugin.php +++ b/plugins/romanah/gokbakja/Plugin.php @@ -9,6 +9,8 @@ class Plugin extends PluginBase return [ 'Romanah\Gokbakja\Components\Action' => 'action', 'Romanah\Gokbakja\Components\Production' => 'production', + 'Romanah\Gokbakja\Components\Sewer' => 'sewer', + 'Romanah\Gokbakja\Components\Order' => 'order', ]; } diff --git a/plugins/romanah/gokbakja/components/Order.php b/plugins/romanah/gokbakja/components/Order.php new file mode 100644 index 0000000..63baeb9 --- /dev/null +++ b/plugins/romanah/gokbakja/components/Order.php @@ -0,0 +1,118 @@ + 'Order', + 'description' => 'Order settings' + ]; + } + + + public function onRender(){ + + $html_data = ''; + + $orderDatas = OrderModel::with(["client", "shipping"])->orderBy('id', 'DESC')->get(); + + for ($x = 0; $x < count($orderDatas); $x++) { + $html_data .= '
= e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/romanah/gokbakja/controllers/client/index.htm b/plugins/romanah/gokbakja/controllers/client/index.htm new file mode 100644 index 0000000..ea43a36 --- /dev/null +++ b/plugins/romanah/gokbakja/controllers/client/index.htm @@ -0,0 +1 @@ += $this->listRender() ?> diff --git a/plugins/romanah/gokbakja/controllers/client/preview.htm b/plugins/romanah/gokbakja/controllers/client/preview.htm new file mode 100644 index 0000000..04c0571 --- /dev/null +++ b/plugins/romanah/gokbakja/controllers/client/preview.htm @@ -0,0 +1,22 @@ + ++ + = e(trans('backend::lang.form.return_to_list')) ?> + +
\ No newline at end of file diff --git a/plugins/romanah/gokbakja/controllers/client/update.htm b/plugins/romanah/gokbakja/controllers/client/update.htm new file mode 100644 index 0000000..a71d6de --- /dev/null +++ b/plugins/romanah/gokbakja/controllers/client/update.htm @@ -0,0 +1,54 @@ + += e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/romanah/gokbakja/models/Client.php b/plugins/romanah/gokbakja/models/Client.php new file mode 100644 index 0000000..8c38efc --- /dev/null +++ b/plugins/romanah/gokbakja/models/Client.php @@ -0,0 +1,33 @@ + [ + 'Romanah\Gokbakja\Models\Order', + 'key' => 'client_id' + ] + ]; + + /** + * @var string The database table used by the model. + */ + public $table = 'romanah_gokbakja_client'; + + /** + * @var array Validation rules + */ + public $rules = [ + ]; +} diff --git a/plugins/romanah/gokbakja/models/Order.php b/plugins/romanah/gokbakja/models/Order.php index 97e53c4..e6700f0 100644 --- a/plugins/romanah/gokbakja/models/Order.php +++ b/plugins/romanah/gokbakja/models/Order.php @@ -13,11 +13,18 @@ class Order extends Model protected $dates = ['deleted_at']; - public $hasMany = [ - 'shipping' => [ - 'Romanah\Gokbakja\Models\Order', - 'key' => 'order_id' + public $belongsTo = [ + 'client' => [ + 'Romanah\Gokbakja\Models\Client', + 'key' => 'client_id' ], + 'shipping' => [ + 'Romanah\Gokbakja\Models\Shipping', + 'key' => 'shipping_id' + ], + ]; + + public $hasMany = [ 'order_items' => [ 'Romanah\Gokbakja\Models\OrderItem', 'key' => 'order_id' diff --git a/plugins/romanah/gokbakja/models/client/columns.yaml b/plugins/romanah/gokbakja/models/client/columns.yaml new file mode 100644 index 0000000..7624dc8 --- /dev/null +++ b/plugins/romanah/gokbakja/models/client/columns.yaml @@ -0,0 +1,22 @@ +columns: + id: + label: id + type: number + name: + label: name + type: text + country: + label: country + type: text + city: + label: city + type: text + phone: + label: phone + type: text + email: + label: email + type: text + note: + label: note + type: text diff --git a/plugins/romanah/gokbakja/models/client/fields.yaml b/plugins/romanah/gokbakja/models/client/fields.yaml new file mode 100644 index 0000000..9a0e149 --- /dev/null +++ b/plugins/romanah/gokbakja/models/client/fields.yaml @@ -0,0 +1,26 @@ +fields: + name: + label: Ady + span: auto + type: text + country: + label: Ýurdy + span: auto + type: text + city: + label: Şäher + span: auto + type: text + phone: + label: Telefon + span: auto + type: text + email: + label: Email + span: auto + type: text + note: + label: Bellik + span: auto + size: '' + type: textarea diff --git a/plugins/romanah/gokbakja/models/employee/fields.yaml b/plugins/romanah/gokbakja/models/employee/fields.yaml index 0a20bf0..1491c15 100644 --- a/plugins/romanah/gokbakja/models/employee/fields.yaml +++ b/plugins/romanah/gokbakja/models/employee/fields.yaml @@ -28,3 +28,7 @@ fields: nameFrom: name descriptionFrom: description type: relation + is_sewer: + label: Tikinçimi + span: auto + type: switch diff --git a/plugins/romanah/gokbakja/models/order/fields.yaml b/plugins/romanah/gokbakja/models/order/fields.yaml index b9ad101..fb7f8b1 100644 --- a/plugins/romanah/gokbakja/models/order/fields.yaml +++ b/plugins/romanah/gokbakja/models/order/fields.yaml @@ -7,12 +7,14 @@ fields: label: Bahasy span: auto type: number - client: - label: Alyjy - span: auto - type: text note: label: Bellik span: auto size: '' type: textarea + client: + label: Klent + span: auto + nameFrom: name + descriptionFrom: description + type: relation diff --git a/plugins/romanah/gokbakja/plugin.yaml b/plugins/romanah/gokbakja/plugin.yaml index 15d0664..fad2554 100644 --- a/plugins/romanah/gokbakja/plugin.yaml +++ b/plugins/romanah/gokbakja/plugin.yaml @@ -26,6 +26,10 @@ navigation: label: Tölegler url: romanah/gokbakja/payment icon: icon-money + side-menu-item5: + label: Klentlar + url: romanah/gokbakja/client + icon: icon-user main-menu-item2: label: 'Giriş we Çykyş' url: romanah/gokbakja/action diff --git a/plugins/romanah/gokbakja/updates/builder_table_create_romanah_gokbakja_client.php b/plugins/romanah/gokbakja/updates/builder_table_create_romanah_gokbakja_client.php new file mode 100644 index 0000000..df66f50 --- /dev/null +++ b/plugins/romanah/gokbakja/updates/builder_table_create_romanah_gokbakja_client.php @@ -0,0 +1,30 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->timestamp('created_at')->nullable(); + $table->timestamp('updated_at')->nullable(); + $table->timestamp('deleted_at')->nullable(); + $table->string('name'); + $table->string('country')->nullable(); + $table->string('city')->nullable(); + $table->string('phone')->nullable(); + $table->string('email')->nullable(); + $table->text('note')->nullable(); + }); + } + + public function down() + { + Schema::dropIfExists('romanah_gokbakja_client'); + } +} diff --git a/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_employee_4.php b/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_employee_4.php new file mode 100644 index 0000000..ec72ea0 --- /dev/null +++ b/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_employee_4.php @@ -0,0 +1,23 @@ +boolean('is_sewer')->default(0); + }); + } + + public function down() + { + Schema::table('romanah_gokbakja_employee', function($table) + { + $table->dropColumn('is_sewer'); + }); + } +} diff --git a/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_order_3.php b/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_order_3.php new file mode 100644 index 0000000..9348485 --- /dev/null +++ b/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_order_3.php @@ -0,0 +1,25 @@ +integer('client_id'); + $table->dropColumn('client'); + }); + } + + public function down() + { + Schema::table('romanah_gokbakja_order', function($table) + { + $table->dropColumn('client_id'); + $table->string('client', 191)->nullable(); + }); + } +} diff --git a/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_order_4.php b/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_order_4.php new file mode 100644 index 0000000..e6b0d7a --- /dev/null +++ b/plugins/romanah/gokbakja/updates/builder_table_update_romanah_gokbakja_order_4.php @@ -0,0 +1,23 @@ +integer('shipping_id'); + }); + } + + public function down() + { + Schema::table('romanah_gokbakja_order', function($table) + { + $table->dropColumn('shipping_id'); + }); + } +} diff --git a/plugins/romanah/gokbakja/updates/version.yaml b/plugins/romanah/gokbakja/updates/version.yaml index 403d377..12a02c5 100644 --- a/plugins/romanah/gokbakja/updates/version.yaml +++ b/plugins/romanah/gokbakja/updates/version.yaml @@ -162,3 +162,15 @@ 1.0.55: - 'Updated table romanah_gokbakja_pivot_production' - builder_table_update_romanah_gokbakja_pivot_production_8.php +1.0.56: + - 'Created table romanah_gokbakja_client' + - builder_table_create_romanah_gokbakja_client.php +1.0.57: + - 'Updated table romanah_gokbakja_order' + - builder_table_update_romanah_gokbakja_order_3.php +1.0.58: + - 'Updated table romanah_gokbakja_employee' + - builder_table_update_romanah_gokbakja_employee_4.php +1.0.59: + - 'Updated table romanah_gokbakja_order' + - builder_table_update_romanah_gokbakja_order_4.php diff --git a/themes/gokbakja/meta/menus/aside.yaml b/themes/gokbakja/meta/menus/aside.yaml index 3c1e548..26314d1 100644 --- a/themes/gokbakja/meta/menus/aside.yaml +++ b/themes/gokbakja/meta/menus/aside.yaml @@ -18,7 +18,7 @@ items: type: cms-page url: null code: '' - reference: stocks + reference: stock/stocks cmsPage: null replace: null viewBag: @@ -81,9 +81,26 @@ items: items: - title: 'Täze Hasabat' + nesting: null type: cms-page + url: null code: '' - reference: excruiters + reference: production/excruiters + cmsPage: null + replace: null + viewBag: + isHidden: '0' + cssClass: '' + isExternal: '0' + - + title: Hasabat + nesting: null + type: cms-page + url: null + code: '' + reference: production/report-dynamic + cmsPage: null + replace: null viewBag: isHidden: '0' cssClass: '' @@ -94,7 +111,7 @@ items: type: cms-page url: null code: '' - reference: all-productions + reference: production/all-production-month cmsPage: null replace: null viewBag: @@ -107,7 +124,7 @@ items: type: cms-page url: null code: '' - reference: report-production + reference: production/report-production cmsPage: null replace: null viewBag: @@ -129,38 +146,21 @@ items: isExternal: '0' items: - - title: 'Täze Hasabat' - nesting: null + title: 'Hasabat Sanawy' type: cms-page - url: null code: '' - reference: machine - cmsPage: null - replace: null + reference: machine/machine viewBag: isHidden: '0' cssClass: '' isExternal: '0' - - title: 'Aýlar boýunca' + title: Hasabat nesting: null type: cms-page url: null code: '' - reference: all-production-machine-month - cmsPage: null - replace: null - viewBag: - isHidden: '0' - cssClass: '' - isExternal: '0' - - - title: 'Ýyl Boýunça' - nesting: null - type: cms-page - url: null - code: '' - reference: report-production-machine + reference: machine/report cmsPage: null replace: null viewBag: @@ -173,7 +173,7 @@ items: type: cms-page url: null code: '' - reference: machine-production-mechanic + reference: machine/machine-production-mechanic cmsPage: null replace: null viewBag: @@ -195,12 +195,21 @@ items: isExternal: '0' items: - - title: 'Taze hasabat' - nesting: null - type: url - url: /s + title: 'Hasabat Sanawy' + type: cms-page code: '' - reference: null + reference: sewer/new + viewBag: + isHidden: '0' + cssClass: '' + isExternal: '0' + - + title: Hasabat + nesting: null + type: cms-page + url: null + code: '' + reference: sewer/month cmsPage: null replace: null viewBag: @@ -220,4 +229,40 @@ items: isHidden: '0' cssClass: ri-shopping-cart-2-line isExternal: '0' + items: + - + title: 'Sargytlar Sanawy' + type: cms-page + code: '' + reference: orders/new + viewBag: + isHidden: '0' + cssClass: '' + isExternal: '0' + - + title: Logitstika + nesting: null + type: cms-page + url: null + code: '' + reference: orders/shipping + cmsPage: null + replace: null + viewBag: + isHidden: '0' + cssClass: '' + isExternal: '0' + - + title: Hasabat + nesting: null + type: cms-page + url: null + code: '' + reference: orders/report + cmsPage: null + replace: null + viewBag: + isHidden: '0' + cssClass: '' + isExternal: '0' name: aside diff --git a/themes/gokbakja/pages/all-production-machine-month.htm b/themes/gokbakja/pages/machine/all-production-machine-month.htm similarity index 100% rename from themes/gokbakja/pages/all-production-machine-month.htm rename to themes/gokbakja/pages/machine/all-production-machine-month.htm diff --git a/themes/gokbakja/pages/get-all-machine-production-month.htm b/themes/gokbakja/pages/machine/get-all-machine-production-month.htm similarity index 99% rename from themes/gokbakja/pages/get-all-machine-production-month.htm rename to themes/gokbakja/pages/machine/get-all-machine-production-month.htm index 8e88fd2..2ba8010 100644 --- a/themes/gokbakja/pages/get-all-machine-production-month.htm +++ b/themes/gokbakja/pages/machine/get-all-machine-production-month.htm @@ -134,4 +134,4 @@ function onStart() { -{% partial 'dataTableJs' %} +{% partial 'dataTableJs' %} \ No newline at end of file diff --git a/themes/gokbakja/pages/get-mechanic.htm b/themes/gokbakja/pages/machine/get-mechanic.htm similarity index 100% rename from themes/gokbakja/pages/get-mechanic.htm rename to themes/gokbakja/pages/machine/get-mechanic.htm diff --git a/themes/gokbakja/pages/get-production-machine.htm b/themes/gokbakja/pages/machine/get-production-machine.htm similarity index 99% rename from themes/gokbakja/pages/get-production-machine.htm rename to themes/gokbakja/pages/machine/get-production-machine.htm index 23a0f68..c7624f1 100644 --- a/themes/gokbakja/pages/get-production-machine.htm +++ b/themes/gokbakja/pages/machine/get-production-machine.htm @@ -137,4 +137,4 @@ function onStart() { -{% partial 'dataTableJs' %} +{% partial 'dataTableJs' %} \ No newline at end of file diff --git a/themes/gokbakja/pages/machine-production-mechanic.htm b/themes/gokbakja/pages/machine/machine-production-mechanic.htm similarity index 99% rename from themes/gokbakja/pages/machine-production-mechanic.htm rename to themes/gokbakja/pages/machine/machine-production-mechanic.htm index b579981..a171d3b 100644 --- a/themes/gokbakja/pages/machine-production-mechanic.htm +++ b/themes/gokbakja/pages/machine/machine-production-mechanic.htm @@ -147,4 +147,4 @@ function onStart() { -{% partial 'dataTableJs' %} +{% partial 'dataTableJs' %} \ No newline at end of file diff --git a/themes/gokbakja/pages/machine.htm b/themes/gokbakja/pages/machine/machine.htm similarity index 64% rename from themes/gokbakja/pages/machine.htm rename to themes/gokbakja/pages/machine/machine.htm index d0edc04..fe1ced1 100644 --- a/themes/gokbakja/pages/machine.htm +++ b/themes/gokbakja/pages/machine/machine.htm @@ -84,6 +84,53 @@ function onStart(){Hasabat
| {{machine.bag_size.name}} | {{machine.bag_type.name}} | {{machine.produced_weight|number_format}} kg | + style="font-size: 14px;">{{machine.produced_weight|number_format}} kg +{{machine.employee_name}} | {{machine.mechanic_name}} | {{machine.note}} | diff --git a/themes/gokbakja/pages/report-production-machine.htm b/themes/gokbakja/pages/machine/report-production-machine.htm similarity index 99% rename from themes/gokbakja/pages/report-production-machine.htm rename to themes/gokbakja/pages/machine/report-production-machine.htm index 6110ff4..acc0d6c 100644 --- a/themes/gokbakja/pages/report-production-machine.htm +++ b/themes/gokbakja/pages/machine/report-production-machine.htm @@ -95,4 +95,4 @@ function onStart(){ -{% partial 'dataTableJs' %} +{% partial 'dataTableJs' %} \ No newline at end of file diff --git a/themes/gokbakja/pages/machine/report.htm b/themes/gokbakja/pages/machine/report.htm new file mode 100644 index 0000000..bd24b79 --- /dev/null +++ b/themes/gokbakja/pages/machine/report.htm @@ -0,0 +1,5 @@ +title = "machine/report" +url = "/machinereport" +layout = "platform_main" +is_hidden = 0 +== \ No newline at end of file diff --git a/themes/gokbakja/pages/orders/new.htm b/themes/gokbakja/pages/orders/new.htm new file mode 100644 index 0000000..810f0a8 --- /dev/null +++ b/themes/gokbakja/pages/orders/new.htm @@ -0,0 +1,139 @@ +title = "orders/new" +url = "/orders/new" +layout = "platform_main" +is_hidden = 0 + +[order] +== +get(); + $this["clients"] = Romanah\Gokbakja\Models\Client::get(); +} +?> +== +{% put styles %} + + + + + +{% endput %} + +
| № | +Klent | +Ýurdy | +Mukdary | +Bahasy | +Logistika | +Bellik | +
|---|---|---|---|---|---|---|
| № | +Klent | +Ýurdy | +Mukdary | +Bahasy | +Logistika | +Bellik | +
Hasabat
+| № | +Aýlar | +Ortaça Işlenen | + {% for key, record in reportProducts %} +{{record.name}} | + {% endfor %} +Bellik | + +
|---|---|---|---|---|
| № | +Senesi | +Hemmesi | + {% for key, record in reportProducts %} +{{record.name}} | + {% endfor %} +Bellik | +
Hasabat
+| № | +Tikinçi | +Senesi | +Çig mal mukdary | +Tikilen Halta | +Bellik | + +
|---|---|---|---|---|---|
| № | +Tikinçi | +Senesi | +Çig mal mukdary | +Tikilen Halta | +Bellik | +