Files
crowd-funder-from-jason/src/test/PlatformServiceMixinTest.vue
Matthew Raymer 3d3d50dc9f feat: enhance EntityGrid with function props and improve code formatting
- Add configurable entity display logic via function props to EntityGrid
- Implement comprehensive test suite for EntityGrid function props in TestView
- Apply consistent code formatting across 15 components and views
- Fix linting issues with trailing commas and line breaks
- Add new EntityGridFunctionPropTest.vue for component testing
- Update endorserServer with improved error handling and logging
- Streamline PlatformServiceMixin with better cache management
- Enhance component documentation and type safety

Changes span 15 files with 159 additions and 69 deletions, focusing on
component flexibility, code quality, and testing infrastructure.
2025-07-18 06:16:35 +00:00

43 lines
1.0 KiB
Vue

<template>
<div>
<h2>PlatformServiceMixin Test</h2>
<button @click="testInsert">Test Insert</button>
<button @click="testUpdate">Test Update</button>
<pre>{{ result }}</pre>
</div>
</template>
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
@Component({
mixins: [PlatformServiceMixin],
})
export default class PlatformServiceMixinTest extends Vue {
result: string = "";
testInsert() {
const contact = {
name: "Alice",
age: 30,
isActive: true,
tags: ["friend"],
};
const { sql, params } = this.$generateInsertStatement(contact, "contacts");
this.result = `SQL: ${sql}\nParams: ${JSON.stringify(params)}`;
}
testUpdate() {
const changes = { name: "Bob", isActive: false };
const { sql, params } = this.$generateUpdateStatement(
changes,
"contacts",
"id = ?",
[42],
);
this.result = `SQL: ${sql}\nParams: ${JSON.stringify(params)}`;
}
}
</script>