From 85eaad3bf46ac302dc4033295f4da6cb4d0fa6b6 Mon Sep 17 00:00:00 2001 From: paulhorn Date: Mon, 10 Aug 2026 18:41:27 +0200 Subject: [PATCH] chore: reformatted with Prettier --- eslint.config.mjs | 6 +-- tsconfig.json | 21 ++------ webapp/Component.ts | 29 +++++----- webapp/controller/App.controller.ts | 7 +-- webapp/controller/Main.controller.ts | 7 +-- webapp/index.html | 54 ++++++++++--------- webapp/manifest.json | 4 +- webapp/model/models.ts | 10 ++-- webapp/test/integration/NavigationJourney.ts | 33 ++++++------ webapp/test/integration/pages/AppPage.ts | 27 +++++----- webapp/test/integration/pages/MainPage.ts | 28 +++++----- .../unit/controller/MainPage.controller.ts | 8 +-- webapp/view/Main.view.xml | 1 + 13 files changed, 104 insertions(+), 131 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 9814b15..fd90fa4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,5 +1,3 @@ -import fioriTools from '@sap-ux/eslint-plugin-fiori-tools'; +import fioriTools from "@sap-ux/eslint-plugin-fiori-tools"; -export default [ - ...fioriTools.configs.recommended -]; +export default [...fioriTools.configs.recommended]; diff --git a/tsconfig.json b/tsconfig.json index c4a0d47..6372284 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,22 +10,11 @@ "rootDir": "./webapp", "outDir": "./dist", "paths": { - "de/paulvincenthorn/weekorganizer/weekorganizerapp/*": [ - "./webapp/*" - ], - "unit/*": [ - "./webapp/test/unit/*" - ], - "integration/*": [ - "./webapp/test/integration/*" - ] + "de/paulvincenthorn/weekorganizer/weekorganizerapp/*": ["./webapp/*"], + "unit/*": ["./webapp/test/unit/*"], + "integration/*": ["./webapp/test/integration/*"] }, - "typeRoots": [ - "./node_modules/@types", - "./node_modules/@sapui5/types" - ] + "typeRoots": ["./node_modules/@types", "./node_modules/@sapui5/types"] }, - "include": [ - "./webapp/**/*" - ] + "include": ["./webapp/**/*"] } diff --git a/webapp/Component.ts b/webapp/Component.ts index 23133bf..2240203 100644 --- a/webapp/Component.ts +++ b/webapp/Component.ts @@ -5,22 +5,19 @@ import { createDeviceModel } from "./model/models"; * @namespace de.paulvincenthorn.weekorganizer.weekorganizerapp */ export default class Component extends BaseComponent { + public static metadata = { + manifest: "json", + interfaces: ["sap.ui.core.IAsyncContentCreation"], + }; - public static metadata = { - manifest: "json", - interfaces: [ - "sap.ui.core.IAsyncContentCreation" - ] - }; + public init(): void { + // call the base component's init function + super.init(); - public init() : void { - // call the base component's init function - super.init(); + // set the device model + this.setModel(createDeviceModel(), "device"); - // set the device model - this.setModel(createDeviceModel(), "device"); - - // enable routing - this.getRouter().initialize(); - } -} \ No newline at end of file + // enable routing + this.getRouter().initialize(); + } +} diff --git a/webapp/controller/App.controller.ts b/webapp/controller/App.controller.ts index 7a05322..6e7019b 100644 --- a/webapp/controller/App.controller.ts +++ b/webapp/controller/App.controller.ts @@ -4,8 +4,5 @@ import Controller from "sap/ui/core/mvc/Controller"; * @namespace de.paulvincenthorn.weekorganizer.weekorganizerapp.controller */ export default class App extends Controller { - - public onInit(): void { - - } -} \ No newline at end of file + public onInit(): void {} +} diff --git a/webapp/controller/Main.controller.ts b/webapp/controller/Main.controller.ts index fcba588..952dc42 100644 --- a/webapp/controller/Main.controller.ts +++ b/webapp/controller/Main.controller.ts @@ -4,8 +4,5 @@ import Controller from "sap/ui/core/mvc/Controller"; * @namespace de.paulvincenthorn.weekorganizer.weekorganizerapp.controller */ export default class Main extends Controller { - - public onInit(): void { - - } -} \ No newline at end of file + public onInit(): void {} +} diff --git a/webapp/index.html b/webapp/index.html index 26e1246..f2a5c9f 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -1,35 +1,39 @@ - + - - - - + + + + Week Organizer - - + +
- - \ No newline at end of file + + diff --git a/webapp/manifest.json b/webapp/manifest.json index c1ba08c..71bd6a2 100644 --- a/webapp/manifest.json +++ b/webapp/manifest.json @@ -76,9 +76,7 @@ { "name": "RouteMain", "pattern": ":?query:", - "target": [ - "TargetMain" - ] + "target": ["TargetMain"] } ], "targets": { diff --git a/webapp/model/models.ts b/webapp/model/models.ts index 16294c1..cfa3723 100644 --- a/webapp/model/models.ts +++ b/webapp/model/models.ts @@ -1,8 +1,8 @@ import JSONModel from "sap/ui/model/json/JSONModel"; import Device from "sap/ui/Device"; -export function createDeviceModel () { - const model = new JSONModel(Device); - model.setDefaultBindingMode("OneWay"); - return model; -} \ No newline at end of file +export function createDeviceModel() { + const model = new JSONModel(Device); + model.setDefaultBindingMode("OneWay"); + return model; +} diff --git a/webapp/test/integration/NavigationJourney.ts b/webapp/test/integration/NavigationJourney.ts index 73b50e8..b089190 100644 --- a/webapp/test/integration/NavigationJourney.ts +++ b/webapp/test/integration/NavigationJourney.ts @@ -10,25 +10,24 @@ QUnit.module("Navigation Journey"); const onTheAppPage = new AppPage(); const onTheViewPage = new ViewPage(); Opa5.extendConfig({ - viewNamespace: "de.paulvincenthorn.weekorganizer.weekorganizerapp.view.", - autoWait: true + viewNamespace: "de.paulvincenthorn.weekorganizer.weekorganizerapp.view.", + autoWait: true, }); opaTest("Should see the initial page of the app", function () { - // Arrangements - // eslint-disable-next-line @typescript-eslint/no-floating-promises - onTheAppPage.iStartMyUIComponent({ - componentConfig: { - name: "de.paulvincenthorn.weekorganizer.weekorganizerapp" - } - }); + // Arrangements + // eslint-disable-next-line @typescript-eslint/no-floating-promises + onTheAppPage.iStartMyUIComponent({ + componentConfig: { + name: "de.paulvincenthorn.weekorganizer.weekorganizerapp", + }, + }); - // Assertions - onTheAppPage.iShouldSeeTheApp(); - onTheViewPage.iShouldSeeThePageView(); + // Assertions + onTheAppPage.iShouldSeeTheApp(); + onTheViewPage.iShouldSeeThePageView(); - - // Cleanup - // eslint-disable-next-line @typescript-eslint/no-floating-promises - onTheAppPage.iTeardownMyApp(); -}); \ No newline at end of file + // Cleanup + // eslint-disable-next-line @typescript-eslint/no-floating-promises + onTheAppPage.iTeardownMyApp(); +}); diff --git a/webapp/test/integration/pages/AppPage.ts b/webapp/test/integration/pages/AppPage.ts index 8cb42d2..0250259 100644 --- a/webapp/test/integration/pages/AppPage.ts +++ b/webapp/test/integration/pages/AppPage.ts @@ -3,20 +3,17 @@ import Opa5 from "sap/ui/test/Opa5"; const sViewName = "App"; export default class AppPage extends Opa5 { - // Actions - - - // Assertions - iShouldSeeTheApp() { - return this.waitFor({ - id: "app", - viewName: sViewName, - success: function () { - Opa5.assert.ok(true, "The " + sViewName + " view is displayed"); - }, - errorMessage: "Did not find the " + sViewName + " view" - }); - } + // Actions + // Assertions + iShouldSeeTheApp() { + return this.waitFor({ + id: "app", + viewName: sViewName, + success: function () { + Opa5.assert.ok(true, "The " + sViewName + " view is displayed"); + }, + errorMessage: "Did not find the " + sViewName + " view", + }); + } } - diff --git a/webapp/test/integration/pages/MainPage.ts b/webapp/test/integration/pages/MainPage.ts index dd5dec0..4526beb 100644 --- a/webapp/test/integration/pages/MainPage.ts +++ b/webapp/test/integration/pages/MainPage.ts @@ -3,21 +3,17 @@ import Opa5 from "sap/ui/test/Opa5"; const sViewName = "Main"; export default class MainPage extends Opa5 { - // Actions - - - // Assertions - iShouldSeeThePageView() { - return this.waitFor({ - id: "page", - viewName: sViewName, - success: function () { - Opa5.assert.ok(true, "The " + sViewName + " view is displayed"); - }, - errorMessage: "Did not find the " + sViewName + " view" - }); - } + // Actions + // Assertions + iShouldSeeThePageView() { + return this.waitFor({ + id: "page", + viewName: sViewName, + success: function () { + Opa5.assert.ok(true, "The " + sViewName + " view is displayed"); + }, + errorMessage: "Did not find the " + sViewName + " view", + }); + } } - - diff --git a/webapp/test/unit/controller/MainPage.controller.ts b/webapp/test/unit/controller/MainPage.controller.ts index dab12ac..4649d5a 100644 --- a/webapp/test/unit/controller/MainPage.controller.ts +++ b/webapp/test/unit/controller/MainPage.controller.ts @@ -4,7 +4,7 @@ import Controller from "de/paulvincenthorn/weekorganizer/weekorganizerapp/contro QUnit.module("Main Controller"); QUnit.test("I should test the Main controller", function (assert: Assert) { - const oAppController = new Controller("Main"); - oAppController.onInit(); - assert.ok(oAppController); -}); \ No newline at end of file + const oAppController = new Controller("Main"); + oAppController.onInit(); + assert.ok(oAppController); +}); diff --git a/webapp/view/Main.view.xml b/webapp/view/Main.view.xml index 7a8c3fc..69474a7 100644 --- a/webapp/view/Main.view.xml +++ b/webapp/view/Main.view.xml @@ -2,5 +2,6 @@ xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"> + \ No newline at end of file