<template> <BaseLayout> <div class="pb-6"> <BaseContainer> <div class=" w-full py-3">…
- User
<BaseLayout> <div class="pb-6"> <BaseContainer> <div class=" w-full py-3"> <div class="aspect-[1.376] h-10 bg-mid_gray mb-2 m-auto">Logo</div> </div> <h1 class="text-sm text-secondary font-bold my-2 text-center w-full">Trust. Verify. Succeed</h1> <div class="my-8 grid grid-cols-3 lg:py-10 lg:px-40"> <ProcessItem label="Job Request" /> <ProcessItem label="Verification of Basic Information" /> <ProcessItem label="Review and Report Writing" /> </div> <div class="flex justify-center"> <router-link to ="/steps"> <Button type="submit" :class="['bg-secondary hover:bg-secondary_hover px-4 py-2 text-white']" > Fill the Form Now <span class="mx-2">-></span> </Button> </router-link> <Button @click="showDocumentName" type="submit" :class="['bg-secondary hover:bg-secondary_hover px-4 py-2 text-white']" > Test<span class="mx-2">-></span> </Button> </div> <!-- <div class="gap-3 w-full flex flex-col justify-center items-center"> <span class="text-primary font-bold text-lg block" >Thanks for your information</span> <span class="text-sm font-medium block" >Thanks for your information</span> <span class="text-xs font-medium block" >Your order ID: GA-06564-gh71</span> <Button class="w-fit" type="submit" ><i class="inline-block w-4 h-4 rounded-full bg-mid_gray" /> Rate</Button> </div> --> </BaseContainer> </div> <!-- <JobRequest /> <Review /> <Verification /> --> <Contact :location="location"/> </BaseLayout> <!-- <button class="fixed z-30 bottom-0 bg-red-700 rounded-xl text-white p-2 " @click="triggerAlert('Your Contact details has been saved!')">زر تجربة الالرت</button> --><!-- <div class=" fixed z-10 bottom-0 py-6 px-4 flex flex-col gap-2"> <div v-for="(alert, index) in alerts" :key="index"> <SnackBar :message="alert.message" @close="removeAlert(index)" /> </div> <div v-for="(alert, index) in alerts" :key="index"> <SnackBar :isDanger="true" :message="alert.message" @close="removeAlert(index)" /> </div> </div> --> <Cookies /> - Assistant
- User
******* documentName ****** VIR-2024-26-09-000008 chunk-4G2AIOYC.js?v=0573fe2c:2008 [Vue warn]: Unhandled error during execution of native event handler at <Button onClick=fn type="submit" class="bg-secondary hover:bg-secondary_hover px-4 py-2 text-white" > at at at <Home onVnodeUnmounted=fn ref=Ref< Proxy(Object) {__v_skip: true} > > at at warn$1 @ chunk-4G2AIOYC.js?v=0573fe2c:2008 logError @ chunk-4G2AIOYC.js?v=0573fe2c:2214 handleError @ chunk-4G2AIOYC.js?v=0573fe2c:2206 callWithErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2154 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2159 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2170 invoker @ chunk-4G2AIOYC.js?v=0573fe2c:9561 Show 7 more frames Show less chunk-4G2AIOYC.js?v=0573fe2c:2219 Uncaught ReferenceError: updateDocument is not defined at showDocumentName (home.vue:90:5) at chunk-4G2AIOYC.js?v=0573fe2c:9582:60 at callWithErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2152:19) at callWithAsyncErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2159:17) at callWithAsyncErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2170:19) at HTMLButtonElement.invoker (chunk-4G2AIOYC.js?v=0573fe2c:9561:5)
- Assistant
- User
// import router from '@/router' import { createListResource ,createDocumentResource } from 'frappe-ui' import { session } from './session';
// دالة لإنشاء مورد الطلبات مع الحقول المطلوبة export function createRequestList(fields) { return createListResource({ doctype: 'Verification Instructions Request', fields, // استخدم الحقول الممررة من المعامل filters: { user_id: session.user }, auto: true, pageLength: 1, onSuccess(data) { console.log("Data retrieved successfully:", data); }, setValue: { onSuccess(data) { console.log("Data update successful."); }, onError(error) { console.error("Error updating data:", error); } }, }); }
export function updateFieldsInRequestList(requestList, updatedFields) { if (!requestList || !requestList.data || !requestList.data[0]) { console.error("Request list data is not available"); return; }
- Assistant
- User
******* documentName ****** VIR-2024-26-09-000008 home.vue:93 Error updating document: TypeError: Cannot read properties of undefined (reading 'setValue') at updateDocument (request.js?t=1727396466155:57:29) at showDocumentName (home.vue:90:30) at chunk-4G2AIOYC.js?v=0573fe2c:9582:60 at callWithErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2152:19) at callWithAsyncErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2159:17) at callWithAsyncErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2170:19) at HTMLButtonElement.invoker (chunk-4G2AIOYC.js?v=0573fe2c:9561:5) showDocumentName @ home.vue:93 (anonymous) @ chunk-4G2AIOYC.js?v=0573fe2c:9582 callWithErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2152 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2159 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2170 invoker @ chunk-4G2AIOYC.js?v=0573fe2c:9561 Show 5 more frames Show less 20contentscript.js:31 Uncaught TypeError: Cannot read properties of null (reading 'querySelector') at HTMLElement. (contentscript.js:31:346) at Function.each (contentscript.js:15:2945) at T.fn.init.each (contentscript.js:15:1437) at h (contentscript.js:31:304) at HTMLDocument. (contentscript.js:35:2555) at HTMLDocument.dispatch (contentscript.js:26:38821) at h.handle (contentscript.js:26:36818) at Object.trigger (contentscript.js:26:67169) at HTMLDocument. (contentscript.js:26:67760) at Function.each (contentscript.js:15:2945) (anonymous) @ contentscript.js:31 each @ contentscript.js:15 each @ contentscript.js:15 h @ contentscript.js:31 (anonymous) @ contentscript.js:35 dispatch @ contentscript.js:26 h.handle @ contentscript.js:26 trigger @ contentscript.js:26 (anonymous) @ contentscript.js:26 each @ contentscript.js:15 each @ contentscript.js:15 trigger @ contentscript.js:26 (anonymous) @ contentscript.js:35 dispatch @ contentscript.js:26 h.handle @ contentscript.js:26 Show 15 more frames Show less
- Assistant
- User
- Assistant
- User
documentResource****************: undefined home.vue:89 ******* documentName ****** VIR-2024-26-09-000008 request.js?t=1727396651063:58 documentResource is not initialized properly. updateDocument @ request.js?t=1727396651063:58 showDocumentName @ home.vue:92 (anonymous) @ chunk-4G2AIOYC.js?v=0573fe2c:9582 callWithErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2152 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2159 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2170 invoker @ chunk-4G2AIOYC.js?v=0573fe2c:9561 Show 5 more frames Show less home.vue:95 Error updating document: Error: Unable to update document. Resource is not initialized. at updateDocument (request.js?t=1727396651063:59:13) at showDocumentName (home.vue:92:30) at chunk-4G2AIOYC.js?v=0573fe2c:9582:60 at callWithErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2152:19) at callWithAsyncErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2159:17) at callWithAsyncErrorHandling (chunk-4G2AIOYC.js?v=0573fe2c:2170:19) at HTMLButtonElement.invoker (chunk-4G2AIOYC.js?v=0573fe2c:9561:5) showDocumentName @ home.vue:95 (anonymous) @ chunk-4G2AIOYC.js?v=0573fe2c:9582 callWithErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2152 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2159 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2170 invoker @ chunk-4G2AIOYC.js?v=0573fe2c:9561 Show 5 more frames Show less 20contentscript.js:31 Uncaught TypeError: Cannot read properties of null (reading 'querySelector') at HTMLElement. (contentscript.js:31:346) at Function.each (contentscript.js:15:2945) at T.fn.init.each (contentscript.js:15:1437) at h (contentscript.js:31:304) at HTMLDocument. (contentscript.js:35:2555) at HTMLDocument.dispatch (contentscript.js:26:38821) at h.handle (contentscript.js:26:36818) at Object.trigger (contentscript.js:26:67169) at HTMLDocument. (contentscript.js:26:67760) at Function.each (contentscript.js:15:2945)
- Assistant
- User
اعد كتابة الكود كامل
- Assistant
- User
documentResource: undefined home.vue:90 ******* documentName ****** VIR-2024-26-09-000008 request.js?t=1727396998267:58 documentResource is not initialized properly. updateDocument @ request.js?t=1727396998267:58 showDocumentName @ home.vue:94 (anonymous) @ chunk-4G2AIOYC.js?v=0573fe2c:9582 callWithErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2152 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2159 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2170 invoker @ chunk-4G2AIOYC.js?v=0573fe2c:9561 Show 5 more frames Show less home.vue:98 Error updating document: Unable to update document. Resource is not initialized. showDocumentName @ home.vue:98 (anonymous) @ chunk-4G2AIOYC.js?v=0573fe2c:9582 callWithErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2152 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2159 callWithAsyncErrorHandling @ chunk-4G2AIOYC.js?v=0573fe2c:2170 invoker @ chunk-4G2AIOYC.js?v=0573fe2c:9561 Show 5 more frames Show less home:1 Error handling response: TypeError: Cannot read properties of null (reading 'querySelector') at HTMLElement. (chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/contentscript.js:31:346) at Function.each (chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/contentscript.js:15:2945) at T.fn.init.each (chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/contentscript.js:15:1437) at h (chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/contentscript.js:31:304) at chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/contentscript.js:31:677 at Array.forEach () at y (chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/contentscript.js:31:665) at chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/contentscript.js:35:37 55contentscript.js:31 Uncaught TypeError: Cannot read properties of null (reading 'querySelector') at HTMLElement. (contentscript.js:31:346) at Function.each (contentscript.js:15:2945) at T.fn.init.each (contentscript.js:15:1437) at h (contentscript.js:31:304) at HTMLDocument. (contentscript.js:35:2555) at HTMLDocument.dispatch (contentscript.js:26:38821) at h.handle (contentscript.js:26:36818) at Object.trigger (contentscript.js:26:67169) at HTMLDocument. (contentscript.js:26:67760) at Function.each (contentscript.js:15:2945)
- Assistant
- User
توثيق frappe-ui: List of Options and API Here is the list of all options and APIs that are available on a list resource.
Options js let todo = createDocumentResource({ // name of the doctype doctype: 'ToDo',
// name of the record name: '',
// define doc methods to use as resources whitelistedMethods: { sendEmail: 'send_email', }, // the above configuration enables the following API // todo.sendEmail.submit()
// events // error can occur from failed request onError(error) {}, // on successful response onSuccess(data) {}, // transform data before setting it transform(doc) { doc.open = false return doc }, // other events delete: { onSuccess() {}, onError() {}, }, setValue: { onSuccess() {}, onError() {}, }, }) API A document resource is made up of multiple individual resources. In our running example, the resource object that fetches the document is at todos.get. So all the are available on this object. Similarly, there are resources for setValue, and delete.
- Assistant
- User
documentResource: {documentResource: undefined, updateDocument: ƒ} home.vue:94 ******* documentName ****** VIR-2024-26-09-000008 home.vue:104 Error updating document: Cannot read properties of undefined (reading 'submit')
- Assistant
- User
لان اريد ان اضيف دالة اخرا ء من نوع createDocumentResource التابعة لمكتبة frappe-ui ولتي تعمل على جلب كافة الحقول والجداول الفرعية لدكتايب معين ولتي سوف ارسلك التوثيق لاستخدام createDocumentResource واريد منك مساعدتي وفي ان اجعل هذه الدالة عامه بحيث استدعيها من اي صفحة وارس لها متغير يحتوي على القيك المراد تعديلها او اضافتها الى اي جدول فرعي في الدكتايب الاساسي وتقوم الدالة باضافت التعديلات
- Assistant