update flow final

This commit is contained in:
bagus-arie05
2025-09-17 15:40:54 +07:00
parent 4e30edeaf8
commit 3ef6f38f2e
8 changed files with 440 additions and 187 deletions

37
payment1.ts Normal file
View File

@@ -0,0 +1,37 @@
// // src/stores/payment.js
// import { defineStore } from 'pinia';
// export const usePaymentStore = defineStore('payment', {
// state: () => ({
// currentStep: 1,
// patientInfo: {
// name: '',
// amount: '',
// expiry: '',
// },
// paymentData: null, // Tambahkan state ini untuk menyimpan data dari backend
// }),
// actions: {
// nextStep() {
// this.currentStep++;
// },
// prevStep() {
// this.currentStep--;
// },
// reset() {
// this.currentStep = 1;
// this.patientInfo = {};
// this.paymentData = null; // Reset data pembayaran
// },
// // Tambahkan action baru untuk menerima data dari WebSocket
// updatePayment(data: { patientName: any; amount: any; expiryDate: any; } | null) {
// this.paymentData = data;
// this.patientInfo = {
// name: data.patientName,
// amount: data.amount,
// expiry: data.expiryDate,
// };
// this.currentStep = 2; // Pindah ke step 2 secara otomatis
// },
// },
// });