chore: reformatted with Prettier

This commit is contained in:
2026-08-10 18:41:27 +02:00
parent 1d7ddf2b9b
commit 85eaad3bf4
13 changed files with 104 additions and 131 deletions
+2 -4
View File
@@ -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];
+5 -16
View File
@@ -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/**/*"]
}
+12 -15
View File
@@ -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();
}
// enable routing
this.getRouter().initialize();
}
}
+1 -4
View File
@@ -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 {
}
public onInit(): void {}
}
+1 -4
View File
@@ -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 {
}
public onInit(): void {}
}
+28 -24
View File
@@ -1,35 +1,39 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Week Organizer</title>
<style>
html, body, body > div, #container, #container-uiarea {
height: 100%;
}
html,
body,
body > div,
#container,
#container-uiarea {
height: 100%;
}
</style>
<script
id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resource-roots='{
id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resource-roots='{
"de.paulvincenthorn.weekorganizer.weekorganizerapp": "./"
}'
data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
data-sap-ui-compat-version="edge"
data-sap-ui-async="true"
data-sap-ui-frame-options="trusted"
data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
data-sap-ui-compat-version="edge"
data-sap-ui-async="true"
data-sap-ui-frame-options="trusted"
></script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
data-sap-ui-component
data-name="de.paulvincenthorn.weekorganizer.weekorganizerapp"
data-id="container"
data-settings='{"id" : "de.paulvincenthorn.weekorganizer.weekorganizerapp"}'
data-handle-validation="true"
data-sap-ui-component
data-name="de.paulvincenthorn.weekorganizer.weekorganizerapp"
data-id="container"
data-settings='{"id" : "de.paulvincenthorn.weekorganizer.weekorganizerapp"}'
data-handle-validation="true"
></div>
</body>
</body>
</html>
+1 -3
View File
@@ -76,9 +76,7 @@
{
"name": "RouteMain",
"pattern": ":?query:",
"target": [
"TargetMain"
]
"target": ["TargetMain"]
}
],
"targets": {
+4 -4
View File
@@ -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;
export function createDeviceModel() {
const model = new JSONModel(Device);
model.setDefaultBindingMode("OneWay");
return model;
}
+15 -16
View File
@@ -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();
// Cleanup
// eslint-disable-next-line @typescript-eslint/no-floating-promises
onTheAppPage.iTeardownMyApp();
});
+12 -15
View File
@@ -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",
});
}
}
+12 -16
View File
@@ -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",
});
}
}
@@ -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);
const oAppController = new Controller("Main");
oAppController.onInit();
assert.ok(oAppController);
});
+1
View File
@@ -2,5 +2,6 @@
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m">
<Page id="page" title="{i18n>title}">
</Page>
</mvc:View>