From 8e69219f2ee0b47f3729551d8ba759963f6d70d2 Mon Sep 17 00:00:00 2001 From: charleyfleetbase Date: Thu, 21 Sep 2023 11:56:43 +0700 Subject: [PATCH 01/28] create driver component --- addon/components/driver-form-panel.hbs | 27 +++++++++++++++++++ addon/components/driver-form-panel.js | 3 +++ addon/components/driver-panel.hbs | 1 + addon/components/driver-panel.js | 3 +++ addon/routes.js | 1 + .../management/drivers/index/details.js | 3 +++ addon/routes/management/drivers/index/edit.js | 3 +++ addon/routes/management/drivers/index/new.js | 3 +++ addon/templates/management/drivers/index.hbs | 2 +- .../management/drivers/index/details.hbs | 2 ++ .../management/drivers/index/edit.hbs | 2 ++ .../management/drivers/index/new.hbs | 2 ++ app/components/driver-form-panel.js | 1 + app/components/driver-panel.js | 1 + .../management/drivers/index/details.js | 1 + app/routes/management/drivers/index/edit.js | 1 + app/routes/management/drivers/index/new.js | 1 + .../management/drivers/index/details.js | 1 + .../management/drivers/index/edit.js | 1 + app/templates/management/drivers/index/new.js | 1 + .../components/driver-form-panel-test.js | 26 ++++++++++++++++++ .../components/driver-panel-test.js | 26 ++++++++++++++++++ .../management/drivers/index/details-test.js | 11 ++++++++ .../management/drivers/index/edit-test.js | 11 ++++++++ .../management/drivers/index/new-test.js | 11 ++++++++ 25 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 addon/components/driver-form-panel.hbs create mode 100644 addon/components/driver-form-panel.js create mode 100644 addon/components/driver-panel.hbs create mode 100644 addon/components/driver-panel.js create mode 100644 addon/routes/management/drivers/index/details.js create mode 100644 addon/routes/management/drivers/index/edit.js create mode 100644 addon/routes/management/drivers/index/new.js create mode 100644 addon/templates/management/drivers/index/details.hbs create mode 100644 addon/templates/management/drivers/index/edit.hbs create mode 100644 addon/templates/management/drivers/index/new.hbs create mode 100644 app/components/driver-form-panel.js create mode 100644 app/components/driver-panel.js create mode 100644 app/routes/management/drivers/index/details.js create mode 100644 app/routes/management/drivers/index/edit.js create mode 100644 app/routes/management/drivers/index/new.js create mode 100644 app/templates/management/drivers/index/details.js create mode 100644 app/templates/management/drivers/index/edit.js create mode 100644 app/templates/management/drivers/index/new.js create mode 100644 tests/integration/components/driver-form-panel-test.js create mode 100644 tests/integration/components/driver-panel-test.js create mode 100644 tests/unit/routes/management/drivers/index/details-test.js create mode 100644 tests/unit/routes/management/drivers/index/edit-test.js create mode 100644 tests/unit/routes/management/drivers/index/new-test.js diff --git a/addon/components/driver-form-panel.hbs b/addon/components/driver-form-panel.hbs new file mode 100644 index 0000000..bda74cf --- /dev/null +++ b/addon/components/driver-form-panel.hbs @@ -0,0 +1,27 @@ + + + +
+ + +
+
+
+ + + {{outlet}} + +
\ No newline at end of file diff --git a/addon/components/driver-form-panel.js b/addon/components/driver-form-panel.js new file mode 100644 index 0000000..95c6917 --- /dev/null +++ b/addon/components/driver-form-panel.js @@ -0,0 +1,3 @@ +import Component from '@glimmer/component'; + +export default class DriverFormPanelComponent extends Component {} diff --git a/addon/components/driver-panel.hbs b/addon/components/driver-panel.hbs new file mode 100644 index 0000000..fb5c4b1 --- /dev/null +++ b/addon/components/driver-panel.hbs @@ -0,0 +1 @@ +{{yield}} \ No newline at end of file diff --git a/addon/components/driver-panel.js b/addon/components/driver-panel.js new file mode 100644 index 0000000..8ec61f3 --- /dev/null +++ b/addon/components/driver-panel.js @@ -0,0 +1,3 @@ +import Component from '@glimmer/component'; + +export default class DriverPanelComponent extends Component {} diff --git a/addon/routes.js b/addon/routes.js index ca2a0bc..5cf15e7 100644 --- a/addon/routes.js +++ b/addon/routes.js @@ -30,6 +30,7 @@ export default buildRoutes(function () { }); this.route('drivers', function () { this.route('index', { path: '/' }); + this.route('new'); }); this.route('vehicles', function () { this.route('index', { path: '/' }); diff --git a/addon/routes/management/drivers/index/details.js b/addon/routes/management/drivers/index/details.js new file mode 100644 index 0000000..e9fa950 --- /dev/null +++ b/addon/routes/management/drivers/index/details.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class ManagementDriversIndexDetailsRoute extends Route {} diff --git a/addon/routes/management/drivers/index/edit.js b/addon/routes/management/drivers/index/edit.js new file mode 100644 index 0000000..f9a7a15 --- /dev/null +++ b/addon/routes/management/drivers/index/edit.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class ManagementDriversIndexEditRoute extends Route {} diff --git a/addon/routes/management/drivers/index/new.js b/addon/routes/management/drivers/index/new.js new file mode 100644 index 0000000..01c2abb --- /dev/null +++ b/addon/routes/management/drivers/index/new.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class ManagementDriversIndexNewRoute extends Route {} diff --git a/addon/templates/management/drivers/index.hbs b/addon/templates/management/drivers/index.hbs index 9290d7b..cee7264 100644 --- a/addon/templates/management/drivers/index.hbs +++ b/addon/templates/management/drivers/index.hbs @@ -14,7 +14,7 @@ {{/if}} -