Skip to content

Commit

Permalink
🔧 chore(firebase-staging.yml): fix formatting of 'on' keyword to impr…
Browse files Browse the repository at this point in the history
…ove readability

🔥 refactor(PrintReport.vue): remove commented out code and unused imports, simplify print functionality
The 'on' keyword in the firebase-staging.yml file was not properly formatted, causing a syntax error. This commit fixes the formatting to ensure the workflow runs correctly.

In the PrintReport.vue file, commented out code and unused imports were removed to improve code cleanliness. The print functionality was simplified by directly calling the window.print() function instead of using a custom print method. This improves the readability and maintainability of the code.
  • Loading branch information
jofftiquez committed Aug 3, 2023
1 parent bd3d101 commit 770085c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/firebase-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/firebase/firebase-tools

name: Firebase hosting staging
'on':
"on":
push:
branches:
- main
Expand Down
18 changes: 4 additions & 14 deletions src/pages/pme/PrintReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ import {
} from '@/constants/pme';
export default {
// async mounted () {
// console.warn('mounted');
// await fakeAwait(3000);
// await this.$htmlToPaper('print-container');
// await this.$htmlToPaper('print-container', {
// styles: [
// 'https://necolas.github.io/normalize.css/8.0.1/normalize.css',
// ],
// });
// },
setup () {
const route = useRoute();
const encounterId = route.params.encounter;
Expand All @@ -46,9 +36,7 @@ export default {
const userStore = useUserStore();
const currentUser = computed(() => userStore.$state.user);
const {
TEMPLATE_TOKENS_MAP,
} = pmeHelper();
const { TEMPLATE_TOKENS_MAP } = pmeHelper();
const tokenDataSourceMap = {
'current-user': currentUser,
Expand Down Expand Up @@ -253,7 +241,9 @@ export default {
encounterDiagnosticOrders.value = result.diagnosticOrders;
await fakeAwait(3000);
await print();
// await print();
window.focus();
window.print();
} catch (e) {
console.error(e);
} finally {
Expand Down

0 comments on commit 770085c

Please sign in to comment.