update flow final
This commit is contained in:
37
payment1.ts
Normal file
37
payment1.ts
Normal 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
|
||||
// },
|
||||
// },
|
||||
// });
|
||||
Reference in New Issue
Block a user