@baravak/risloo-profile-cli 3.5.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -4
- package/src/Profile.js +0 -1
- package/src/publish/json/profiles/PMCIEF9A.json +1 -0
- package/src/publish/json/profiles/SCL9093.json +44 -0
- package/src/publish/json/profiles/YSQ93.json +1 -0
- package/src/samples/PMCIEF9A.js +528 -0
- package/src/samples/SCL9093.js +178 -0
- package/src/samples/YSQ93.js +118 -0
- package/views/profiles/samples/PMCIEF9A_1.hbs +277 -0
- package/views/profiles/samples/PMCIEF9A_2.hbs +76 -0
- package/views/profiles/samples/PMCIEF9A_3.hbs +154 -0
- package/views/profiles/samples/SCL9093.hbs +88 -0
- package/views/profiles/samples/YSQ93.hbs +86 -0
- package/.yarn/releases/yarn-1.22.19.cjs +0 -147529
- package/.yarnrc.yml +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"$X1H8KGZYB","scale":{"id":"$YSQ-93","title":"آزمون روانبنههای یانگ (YSQ)"},"version":"1","edition":"","edition_version":null,"client":{"id":"GH96XXXX","name":"XXXX"},"room":{"id":"RS9XXXX","manager":{"id":"GH9XXXX","name":"XXXX","user_id":"IR963XXXX"},"center":{"id":"RS9XXXXX","acceptation":null,"status":"active","type":"counseling_center","detail":{"title":"XXXXX"}},"acceptation":null,"status":"active","type":"room"},"case":null,"code":null,"created_at":1690877786,"started_at":1690878958,"scored_at":1690899713,"closed_at":1690880365,"total_amount":0,"prepayment":false,"purchased":true,"amount":null,"billing":null,"description":"## دستور اجرای آزمون\n\nافراد از این جمله ها ممکن است برای توصیف خودشان استفاده کنند. لطفا هر جمله را با دقت بخوانید و ببینید تا چه حد توصیف درستی از شما به دست میدهد .اگر شما برای پاسخ دادن خاطر جمع نیستید، بر پایه چیزی که احساس میکنید جواب دهید، نه بر اساس آنچه فکر میکنید درست است .","psychologist_description":null,"items":[{"type":"text","text":"اغلب کسی را نداشتهام که از من حمایت کند، حرفهایش را بامن بزند و عمیقا نگران اتفاقاتی باشد که برای من میافتد.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"من به افراد نزدیک خیلی وابستهم، چون میترسم که مبادا مرا ترک کنند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"6"},{"type":"text","text":"احساس میکنم مردم از من سود جویی میکنند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"وصله ناجور جمع هستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"مردان یا زنانی که دوستشان دارم، وقتی عیبهای مرا ببینند، نمیتوانند دوستم داشته باشند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"تقریبا هیچ کاری را نمیتوانم به خوبی دیگران انجام دهم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"احساس میکنم نمیتوانم به تنهایی از پس کارهای زندگی روز مرهام بر بیایم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"نمیتوانم از شر این احساس رها شوم که مبادا اتفاق بدی بیفتد.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"5"},{"type":"text","text":"قادر نیستم از والدینم جدا شوم.کاری که هم سن و سال هایم انجام میدهند","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"اعتقاد دارم که اگر بخواهم هر کاری انجام بدهم، برای خودم دردسر درست میکنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"در نهایت، کار مراقبت از نزدیکانم روی دوش من است.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"از این که احساسهای مثبتم ( مثل محبت، هم دردی ) را به دیگران ابراز کنم خیلی خجالت میکشم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"باید در هر کاری که انجام میدهم بهترین باشم، نمیتوانم بپذیرم که نفر دوم باشم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"وقتی از کسی چیزی میخواهم، خیلی برای من سخت است که نه بشنوم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"5"},{"type":"text","text":"حوصله انجام کارهای متداول زندگی یا کارهای ملال آور را ندارم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"ثروت و معاشرت با افراد سر شناس باعث احساس ارزشمندی من میشود.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"حتی زمانی که کارها خوب پیش میرود، احساس میکنم که این حس خوب، موقتی است.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"اگر اشتباه کنم باید تنبیه شوم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"به طور کلی کسی نبوده که به من عاطفه، محبت و صداقت نشان دهد.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"آن قدر به مردم نیاز مندم که نگران از دست دادن آن ها هستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"احساس میکنم در حضور دیگران باید از خودم محافظت کنم. چون در غیر اینصورت عمدا به من آسیب میزنند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"اساسا خیلی با دیگران فرق دارم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"اگر کسی واقعا مرا بشناسد، مایل نیست بامن رابطهای صیمیبرقرار کند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"هر زمان پیشرفتی در کارم به وجود میآید، احساس بی کفایتی میکنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"فکر میکنم در انجام کارهای روز مره، آدم وابستهای هستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"احساس میکنم هر لحظه ممکن است یک فاجعه طبیعی، جنایی، حقوقی یا پزشکی برای من اتفاق بیفتد.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"من و والدینم تمایل داریم خود را بیش از حد در زندگی و مسایل دیگران درگیر کنیم ","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"احساس میکنم چارهای ندارم جز اینکه به خواستههای دیگران تن بدهم، چون در غیر این صورت یا مرا ترک میکنند یا در صدد تلافی بر میآیند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"آدم خوبی هستم چون بیش از آن که به فکر خود باشم به فکر دیگرانم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"از این که احساساتم را به دیگران ابراز کنم خیلی شرمسار میشوم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"سعی میکنم نهایت تلاش خودم را بکنم، خوب بودن نسبی کار هیچ گاه مرا راضی نمیکند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"آدم خاصی هستم و نمیتوانم محدودیت هایی را که بر سر راه دیگران وجود دارد، بپذیرم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"اگر به یکی از اهدافم نرسم زود مایوس میشوم و دست از تلاش بر میدارم","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"دستیابی به موفقیت برای من بی نهایت ارزشمند است به شرط این که دیگران این موفقیتها را ببینند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"اگر اتفاقات خوبی در زندگیام بیفتد، نگرانم که مبادا بدشانسی از راه برسد.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"اگر سنگ تمام نگذارم بدون شک شکست میخورم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"در بیش تر اوقات زندگی این احساس به من دست نداد که برای فرد دیگری، شخص ویژه و ممتاز به شمار میروم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"نگرانم افرادی که دوستشان دارم، فرد دیگری را پیدا کنند و اورا به من ترجیح بدهند و مرا ترک کنند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"دیگران دیر یا زود به من خیانت میکنند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"نمیتوانم به کسی تعلق خاطر داشته باشم، انسان گوشهگیری هستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"لیاقت عشق، توجه و احترام دیگران را ندارم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"بیش تر مردم در حوزههای کار ( یا تحصیل ) یا پیشرفت از من توانا ترند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"عقل درست و حسابی ندارم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"نگرانم که مبادا دیگران به من صدمه جسمی بزنند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"اگر من و والدینم، مسایل جزیی و خصوصی خود را از یکدیگر پنهان کنیم، احساس گناه یا خیانت میکنیم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"در روابطم به دیگران اجازه میدهم که برمن مسلط شوند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"از بس سرگرم انجام کارهای دیگران هستم، وقت کمیبرای خودم میماند ","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"برای من خیلی سخت است که صمیمی و بی تکلف رفتار کنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"من باید به تمام مسئولیتهایم عمل کنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"6"},{"type":"text","text":"ازاین که مرا محدود کنند یا جلوی کارم را بگیرند، به شدت متنفرم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"خیلی برای من سخت است که به خاطر دستیابی به هدف بلند مدت، از سر خیر رضایتمندی فوری بگذرم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"اگر نتوانم توجه دیگران را جلب کنم، احساس میکنم آدم کم اهمیتی هستم","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"خیلی نمی توانم در کارها دقت کنم چون تقریبا همیشه کارها غلط از آب در میآید.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"اگر اشتباه کنم باید تنبیه شوم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"در اغلب اوقات زندگی کسی را نداشتهام که واقعا به حرف دل من گوش دهند، مرا بفهمند یا این که احساسها و نیازهای واقعی مرا درک کنند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"وقتی احساس میکنم کسی که برای من مهم است از من دوری میکند، مأیوس میشوم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"نسبت به انگیزههای دیگران، سو ظن شدید دارم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"احساس میکنم با مردم بیگانهام.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"احساس میکنم هیچ کس مرا دوست ندارم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"اکثر افراد در کار یا تحصیل از من با استعداد ترند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"اگر به قضاوتهای خودم در موقعیتهای روزمره زندگی اعتماد کنم، تصمیمهای اشتباهی میگیرم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"نگرانم که کل سرمایهام را از دست بدهم و فقیر و بی خانمان شوم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"اغلب احساس میکنم انگار سایه سنگین والدینم دائم بر سر من است...به نحوی که نمیتوانم یک زندگی جداگانه برای خودم داشته باشم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"همیشه به دیگران اجازه میدهم که به جای من تصمیم بگیرند چون واقعا نمیدانم چی میخواهم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"همیشه به درد دل دیگران گوش دادهام.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"6"},{"type":"text","text":"آن قدر خودم را کنترل میکنم که مردم فکر میکنند آدم بی احساسی هستم","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"احساس میکنم برای پیشرفت و دستیابی به خواستههایم، همواره تحت فشار هستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"احساس میکنم نباید از قوانین و قراردادهای بهنجاری که مردم تابع آن ها هستند، اطاعت کنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"نمی توانم خودم را مجبور کنم که کارهای بدون لذت انجام بدهم، حتی اگر بدانم که این کار ها نتایج خوبی به دنبال دارد.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"در هر جمع یا اجتماعی به دنبال دریافت توجه و تحسین دیگران هستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"مهم نیست که چقدر سختکوش باشم، نگرانم که تمام سرمایهام را بر باد فنا بدهم","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"دلیل اشتباه من مهم نیست، زمانی که مرتکب اشتباه میشوم باید جریمه شوم","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"وقتی نمیدانستم کاری را چگونه انجام بدهم، به ندرت شخصی پیدا میشود که مرا نصیحت یا راهنمایی کند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"برخی اوقات آنقدر نگران آن هستم که دیگران مرا ترک کنند که آن ها را از خودم دور میکنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"معمولا به طور جدی به انگیزههای نهایی مردم فکر میکنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"همیشه احساس میکنم در جمع، جایی ندارم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"در بسیاری از جنبهها چنان شخصیت پر از عیب و ایرادی که نمیتوانم در کنار دیگران راحت باشم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"در کار (یا تحصیل ) مثل بقیه با هوش نیستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"نمی توانم به تواناییهای خودم برای حل مشکلات روزمره اعتماد کنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"نگرانم به بیماری خطرناکی مبتلا شوم حتی وقتی که پزشک هیچ گونه علامت خطری تشخیص نداده است.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"اغلب احساس میکنم هویت جداگانه ایی از والدینم یا همسرم ندارم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"خیلی برای من مشکل است که از دیگران تقاضا کنم حقوقم را رعایت و احساساتم را درک کنند.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"3"},{"type":"text","text":"اطرافیان معتقدند که من برای رفع نیازهای دیگران تلاش میکنم ولی برای خودم کاری نمیکنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"از نظر دیگران، من آدم عصبی و ناراحتی هستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"},{"type":"text","text":"وقتی کاری را اشتباه انجام میدهم، نمیتوانم خودم را ببخشم یا دست به بهانه تراشی بزنم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"احساس میکنم کارها و خواستههای من ارزشمند تر از کارها و خواستههای دیگران است.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"به ندرت توانستهام به تصمیم ها و راه حلهایم پایبند باشم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"برای این که احساس کنم آدم ارزشمندی هستم نیازمند تایید، تحسین و تمجید زیاد دیگران هستم.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"4"},{"type":"text","text":"نگرانم که مبادا یک تصمیم اشتباه به فاجعهای تمام عیار منجر شود.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"2"},{"type":"text","text":"آدم بدی هستم که لایق تنبیه است.","answer":{"type":"optional","options":["کاملاً غلط","تقریباً غلط","بیشتر درست تا غلط","اندکی درست","تقریباً درست","کاملاً درست"]},"user_answered":"1"}],"prerequisites":[{"type":"text","label":"gender","text":"جنسیت","answer":{"type":"select","options":["زن","مرد"]},"alias":"gender","force":true,"user_answered":"1"},{"type":"text","label":"age","text":"سن","answer":{"type":"number"},"alias":"age","force":true,"user_answered":"37"},{"type":"text","label":"education","text":"تحصیلات","answer":{"type":"select","options":["ابتدایی اول","ابتدایی دوم","متوسطه اول","متوسطه دوم","دیپلم","کارشناسی","کارشناسی ارشد","پزشکی عمومی","متخصص","دکتری تخصصی","حوزوی مقدمات","حوزوی سطح۱","حوزوی سطح۲","حوزوی سطح۳","حوزوی سطح۴"]},"alias":"education","force":true,"user_answered":"6"},{"type":"text","label":"marital_status","text":"وضعیت تأهل","answer":{"type":"select","options":["مجرد","متأهل"]},"alias":"marital_status","force":true,"user_answered":"2"}],"cornometer":23,"score":{"ed":6,"ab":14,"ma":7,"si":8,"ds":6,"fa":11,"ai":7,"vu":11,"eu":6,"sb":13,"ss":14,"ei":7,"us":14,"et":13,"is":12,"as":16,"np":10,"pu":9},"score_current_version":"1.0.0","score_last_version":"1.0.0"}
|
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
const { Profile, FS } = require("../Profile");
|
|
2
|
+
|
|
3
|
+
class PMCIEF9A extends Profile {
|
|
4
|
+
// Number of pages
|
|
5
|
+
static pages = 3;
|
|
6
|
+
|
|
7
|
+
// Labels of the sample
|
|
8
|
+
labels = {
|
|
9
|
+
L1: { eng: "axis_2_raw", fr: "", max: 45 },
|
|
10
|
+
L2: { eng: "axis_2_percentage", fr: "" },
|
|
11
|
+
|
|
12
|
+
L3: { eng: "axis_3_raw", fr: "", max: 20 },
|
|
13
|
+
L4: { eng: "axis_3_percentage", fr: "" },
|
|
14
|
+
|
|
15
|
+
L5: { eng: "axis_4_raw", fr: "" },
|
|
16
|
+
L6: { eng: "axis_4_percentage", fr: "" },
|
|
17
|
+
|
|
18
|
+
L7: { eng: "axis_4_section_1_raw", fr: null, max: 0 },
|
|
19
|
+
L8: { eng: "axis_4_section_1_percentage", fr: null, max: 0 },
|
|
20
|
+
|
|
21
|
+
L9: { eng: "axis_4_section_3_raw", fr: null, max: 0 },
|
|
22
|
+
L10: { eng: "axis_4_section_3_percentage", fr: null, max: 0 },
|
|
23
|
+
|
|
24
|
+
L11: { eng: "axis_4_section_3_family", fr: null, max: 0 },
|
|
25
|
+
L12: { eng: "axis_4_section_3_educational", fr: null, max: 0 },
|
|
26
|
+
|
|
27
|
+
L13: { eng: "axis_4_section_4_raw", fr: null, max: 0 },
|
|
28
|
+
L14: { eng: "axis_4_section_4_percentage", fr: null, max: 0 },
|
|
29
|
+
|
|
30
|
+
L15: { eng: "axis_5_raw", fr: null, max: 0 },
|
|
31
|
+
L16: { eng: "axis_5_percentage", fr: null, max: 0 },
|
|
32
|
+
|
|
33
|
+
L17: { eng: "axis_6_raw", fr: null, max: 0 },
|
|
34
|
+
L18: { eng: "axis_6_percentage", fr: null, max: 0 },
|
|
35
|
+
|
|
36
|
+
L19: { eng: "axis_6_favorites_raw", fr: null, max: 0 },
|
|
37
|
+
L20: { eng: "axis_6_favorites_percentage", fr: null, max: 0 },
|
|
38
|
+
|
|
39
|
+
L21: { eng: "axis_6_worries_raw", fr: null, max: 0 },
|
|
40
|
+
L22: { eng: "axis_6_worries_percentage", fr: null, max: 0 },
|
|
41
|
+
|
|
42
|
+
L23: { eng: "axis_7_section_1_options_option_1_raw", fr: "باهم مخالفیم", max: 27 },
|
|
43
|
+
L24: { eng: "axis_7_section_1_options_option_1_percentage", fr: null, max: 0 },
|
|
44
|
+
|
|
45
|
+
L25: { eng: "axis_7_section_1_options_option_2_raw", fr: "به نتیجه نرسیدهایم", max: 27 },
|
|
46
|
+
L26: { eng: "axis_7_section_1_options_option_2_percentage", fr: null, max: 0 },
|
|
47
|
+
|
|
48
|
+
L27: { eng: "axis_7_section_1_options_option_3_raw", fr: "من کوتاه آمدهام", max: 27 },
|
|
49
|
+
L28: { eng: "axis_7_section_1_options_option_3_percentage", fr: null, max: 0 },
|
|
50
|
+
|
|
51
|
+
L29: { eng: "axis_7_section_1_options_option_4_raw", fr: "کنار آمدهایم", max: 27 },
|
|
52
|
+
L30: { eng: "axis_7_section_1_options_option_4_percentage", fr: null, max: 0 },
|
|
53
|
+
|
|
54
|
+
L31: { eng: "axis_7_section_1_options_option_5_raw", fr: "با گفتگو توافق کردیم", max: 27 },
|
|
55
|
+
L32: { eng: "axis_7_section_1_options_option_5_percentage", fr: null, max: 0 },
|
|
56
|
+
|
|
57
|
+
L33: { eng: "axis_7_section_1_options_option_6_raw", fr: "کاملا باهم موافقیم", max: 27 },
|
|
58
|
+
L34: { eng: "axis_7_section_1_options_option_6_percentage", fr: null, max: 0 },
|
|
59
|
+
|
|
60
|
+
L35: { eng: "axis_7_section_1_againest_raw", fr: "مخالفها", max: 54 },
|
|
61
|
+
L36: { eng: "axis_7_section_1_againest_percentage", fr: null, max: 0 },
|
|
62
|
+
|
|
63
|
+
L37: { eng: "axis_7_section_1_compromise_raw", fr: "تفاهمها", max: 54 },
|
|
64
|
+
L38: { eng: "axis_7_section_1_compromise_percentage", fr: null, max: 0 },
|
|
65
|
+
|
|
66
|
+
L39: { eng: "axis_7_section_1_agreement_raw", fr: "توافقها", max: 54 },
|
|
67
|
+
L40: { eng: "axis_7_section_1_agreement_percentage", fr: null, max: 0 },
|
|
68
|
+
|
|
69
|
+
L41: { eng: "axis_7_section_2_raw", fr: null, max: 0 },
|
|
70
|
+
L42: { eng: "axis_7_section_2_percentage", fr: null, max: 0 },
|
|
71
|
+
|
|
72
|
+
L43: { eng: "axis_7_section_2_religion_raw", fr: "موضوع معنویت (مذهب)", max: 24 },
|
|
73
|
+
L44: { eng: "axis_7_section_2_religion_percentage", fr: null, max: 0 },
|
|
74
|
+
|
|
75
|
+
L45: { eng: "axis_7_section_2_sex_raw", fr: "موضوع ارتباط زناشویی (جنسی)", max: 20 },
|
|
76
|
+
L46: { eng: "axis_7_section_2_sex_percentage", fr: null, max: 0 },
|
|
77
|
+
|
|
78
|
+
L47: { eng: "axis_7_section_2_role_raw", fr: "موضوع نقش", max: 20 },
|
|
79
|
+
L48: { eng: "axis_7_section_2_role_percentage", fr: null, max: 0 },
|
|
80
|
+
|
|
81
|
+
L49: { eng: "axis_7_section_2_financial_raw", fr: "موضوع موارد مالی مشکلآفرین", max: 20 },
|
|
82
|
+
L50: { eng: "axis_7_section_2_financial_percentage", fr: null, max: 0 },
|
|
83
|
+
|
|
84
|
+
L51: { eng: "axis_7_section_2_flexibility_raw", fr: "موضوع انعطافپذیری", max: 20 },
|
|
85
|
+
L52: { eng: "axis_7_section_2_flexibility_percentage", fr: null, max: 0 },
|
|
86
|
+
|
|
87
|
+
L53: { eng: "axis_7_section_2_proximity_raw", fr: "موضوع قرابت", max: 20 },
|
|
88
|
+
L54: { eng: "axis_7_section_2_proximity_percentage", fr: null, max: 0 },
|
|
89
|
+
|
|
90
|
+
L55: { eng: "axis_7_section_2_sociability_raw", fr: "موضوع برقراری ارتباط (معاشرت)", max: 20 },
|
|
91
|
+
L56: { eng: "axis_7_section_2_sociability_percentage", fr: null, max: 0 },
|
|
92
|
+
|
|
93
|
+
L57: { eng: "axis_7_section_2_conflict_resolution_raw", fr: "موضوع حل تعارض", max: 20 },
|
|
94
|
+
L58: { eng: "axis_7_section_2_conflict_resolution_percentage", fr: null, max: 0 },
|
|
95
|
+
|
|
96
|
+
L59: { eng: "axis_8_section_1_me_raw", fr: null, max: 0 },
|
|
97
|
+
L60: { eng: "axis_8_section_1_me_percentage", fr: null, max: 0 },
|
|
98
|
+
|
|
99
|
+
L61: { eng: "axis_8_section_1_me_social_raw", fr: "اجتماعی بودن", max: 0 },
|
|
100
|
+
L62: { eng: "axis_8_section_1_me_social_percentage", fr: null, max: 0 },
|
|
101
|
+
|
|
102
|
+
L63: { eng: "axis_8_section_1_me_administratorship_raw", fr: "مدیریت", max: 0 },
|
|
103
|
+
L64: { eng: "axis_8_section_1_me_administratorship_percentage", fr: null, max: 0 },
|
|
104
|
+
|
|
105
|
+
L65: { eng: "axis_8_section_1_me_moral_raw", fr: "اخلاق", max: 0 },
|
|
106
|
+
L66: { eng: "axis_8_section_1_me_moral_percentage", fr: null, max: 0 },
|
|
107
|
+
|
|
108
|
+
L67: { eng: "axis_8_section_1_me_rationality_raw", fr: "عقلانیت", max: 0 },
|
|
109
|
+
L68: { eng: "axis_8_section_1_me_rationality_percentage", fr: null, max: 0 },
|
|
110
|
+
|
|
111
|
+
L69: { eng: "axis_8_section_1_me_anger_raw", fr: "عصبانیت", max: 0 },
|
|
112
|
+
L70: { eng: "axis_8_section_1_me_anger_percentage", fr: null, max: 0 },
|
|
113
|
+
|
|
114
|
+
L71: { eng: "axis_8_section_1_partner_raw", fr: null, max: 0 },
|
|
115
|
+
L72: { eng: "axis_8_section_1_partner_percentage", fr: null, max: 0 },
|
|
116
|
+
|
|
117
|
+
L73: { eng: "axis_8_section_1_partner_social_raw", fr: null, max: 0 },
|
|
118
|
+
L74: { eng: "axis_8_section_1_partner_social_percentage", fr: null, max: 0 },
|
|
119
|
+
|
|
120
|
+
L75: { eng: "axis_8_section_1_partner_administratorship_raw", fr: null, max: 0 },
|
|
121
|
+
L76: { eng: "axis_8_section_1_partner_administratorship_percentage", fr: null, max: 0 },
|
|
122
|
+
|
|
123
|
+
L77: { eng: "axis_8_section_1_partner_moral_raw", fr: null, max: 0 },
|
|
124
|
+
L78: { eng: "axis_8_section_1_partner_moral_percentage", fr: null, max: 0 },
|
|
125
|
+
|
|
126
|
+
L79: { eng: "axis_8_section_1_partner_rationality_raw", fr: null, max: 0 },
|
|
127
|
+
L80: { eng: "axis_8_section_1_partner_rationality_percentage", fr: null, max: 0 },
|
|
128
|
+
|
|
129
|
+
L81: { eng: "axis_8_section_1_partner_anger_raw", fr: null, max: 0 },
|
|
130
|
+
L82: { eng: "axis_8_section_1_partner_anger_percentage", fr: null, max: 0 },
|
|
131
|
+
|
|
132
|
+
L83: { eng: "axis_8_section_2_raw", fr: null, max: 0 },
|
|
133
|
+
L84: { eng: "axis_8_section_2_percentage", fr: null, max: 0 },
|
|
134
|
+
|
|
135
|
+
L85: { eng: "axis_8_section_2_me_raw", fr: null, max: 0 },
|
|
136
|
+
L86: { eng: "axis_8_section_2_me_percentage", fr: null, max: 0 },
|
|
137
|
+
|
|
138
|
+
L87: { eng: "axis_8_section_2_me_c_raw", fr: "وظیفهشناسی (C)", max: 0 },
|
|
139
|
+
L88: { eng: "axis_8_section_2_me_c_percentage", fr: null, max: 0 },
|
|
140
|
+
|
|
141
|
+
L89: { eng: "axis_8_section_2_me_a_raw", fr: "توافقپذیری (A)", max: 0 },
|
|
142
|
+
L90: { eng: "axis_8_section_2_me_a_percentage", fr: null, max: 0 },
|
|
143
|
+
|
|
144
|
+
L91: { eng: "axis_8_section_2_me_o_raw", fr: "اشتیاق به تجربیات جدید (O)", max: 0 },
|
|
145
|
+
L92: { eng: "axis_8_section_2_me_o_percentage", fr: null, max: 0 },
|
|
146
|
+
|
|
147
|
+
L93: { eng: "axis_8_section_2_me_e_raw", fr: "برونگرایی (E)", max: 0 },
|
|
148
|
+
L94: { eng: "axis_8_section_2_me_e_percentage", fr: null, max: 0 },
|
|
149
|
+
|
|
150
|
+
L95: { eng: "axis_8_section_2_me_n_raw", fr: "نوروتیک بودن (N)", max: 0 },
|
|
151
|
+
L96: { eng: "axis_8_section_2_me_n_percentage", fr: null, max: 0 },
|
|
152
|
+
|
|
153
|
+
L97: { eng: "axis_8_section_2_partner_raw", fr: null, max: 0 },
|
|
154
|
+
L98: { eng: "axis_8_section_2_partner_percentage", fr: null, max: 0 },
|
|
155
|
+
|
|
156
|
+
L99: { eng: "axis_8_section_2_partner_c_raw", fr: null, max: 0 },
|
|
157
|
+
L101: { eng: "axis_8_section_2_partner_c_percentage", fr: null, max: 0 },
|
|
158
|
+
|
|
159
|
+
L102: { eng: "axis_8_section_2_partner_a_raw", fr: null, max: 0 },
|
|
160
|
+
L103: { eng: "axis_8_section_2_partner_a_percentage", fr: null, max: 0 },
|
|
161
|
+
|
|
162
|
+
L104: { eng: "axis_8_section_2_partner_o_raw", fr: null, max: 0 },
|
|
163
|
+
L105: { eng: "axis_8_section_2_partner_o_percentage", fr: null, max: 0 },
|
|
164
|
+
|
|
165
|
+
L106: { eng: "axis_8_section_2_partner_e_raw", fr: null, max: 0 },
|
|
166
|
+
L107: { eng: "axis_8_section_2_partner_e_percentage", fr: null, max: 0 },
|
|
167
|
+
|
|
168
|
+
L108: { eng: "axis_8_section_2_partner_n_raw", fr: null, max: 0 },
|
|
169
|
+
L109: { eng: "axis_8_section_2_partner_n_percentage", fr: null, max: 0 },
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
profileSpec = {
|
|
173
|
+
/* "sample" determines some important info about the sample and profile */
|
|
174
|
+
/* Default prerequisites: 1. gender, 2. age, 3. education */
|
|
175
|
+
/* "prerequisites" is synonym to "fields" in our program */
|
|
176
|
+
sample: {
|
|
177
|
+
name: "پرسشنامه ارزیابی مشاوره پیش از ازدواج فرم ب" /* Name of the sample */,
|
|
178
|
+
multiProfile: false /* Whether the sample has multiple profiles or not */,
|
|
179
|
+
questions: true /* Determines whether to get questions from inital dataset or not */,
|
|
180
|
+
defaultFields: false /* Determines whether to have default prerequisites in the profile or not */,
|
|
181
|
+
fields: ["name", "p_name"] /* In case you want to get some additional fields and show in the profile */,
|
|
182
|
+
},
|
|
183
|
+
/* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
|
|
184
|
+
/* calculating its dimensions carefully is of great importance */
|
|
185
|
+
profile: {
|
|
186
|
+
get dimensions() {
|
|
187
|
+
return {
|
|
188
|
+
width: 828 + 2 * this.padding.x,
|
|
189
|
+
height: 634 + 2 * this.padding.y,
|
|
190
|
+
};
|
|
191
|
+
},
|
|
192
|
+
padding: {
|
|
193
|
+
x: 37.5,
|
|
194
|
+
y: 40,
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
/* "labels" part which has to be provided for each profile */
|
|
198
|
+
labels: Object.values(this.labels),
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
constructor(dataset, options, config = {}) {
|
|
202
|
+
super();
|
|
203
|
+
this._init(dataset, options, config);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
_calcContext() {
|
|
207
|
+
const { dataset } = this;
|
|
208
|
+
|
|
209
|
+
const section2 = section2circle(dataset);
|
|
210
|
+
const section3 = {
|
|
211
|
+
total: Object.assign({}, dataset.score[2], { ml: dataset.score[2].mark * 9 - 9 }),
|
|
212
|
+
percentage: dataset.score[3],
|
|
213
|
+
};
|
|
214
|
+
const section5 = section5circle(dataset);
|
|
215
|
+
|
|
216
|
+
const section4 = {
|
|
217
|
+
total : {
|
|
218
|
+
total : dataset.score[4],
|
|
219
|
+
percentage : dataset.score[5],
|
|
220
|
+
},
|
|
221
|
+
first: {
|
|
222
|
+
total : dataset.score[6],
|
|
223
|
+
percentage : dataset.score[7],
|
|
224
|
+
},
|
|
225
|
+
third: {
|
|
226
|
+
total : dataset.score[8],
|
|
227
|
+
percentage : dataset.score[9],
|
|
228
|
+
family: Object.assign({}, dataset.score[10], {percentage : Math.round((parseInt(dataset.score[10].mark) * 100) / 32)}),
|
|
229
|
+
educational: Object.assign({}, dataset.score[11], {percentage : Math.round((parseInt(dataset.score[11].mark) * 100) / 32)}),
|
|
230
|
+
},
|
|
231
|
+
fourth: {
|
|
232
|
+
total : dataset.score[12],
|
|
233
|
+
percentage : dataset.score[13],
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
};
|
|
237
|
+
const has_extend = !dataset.questions[102].user_answered ? true : false
|
|
238
|
+
const section6 = {
|
|
239
|
+
gauge : section6circle(dataset, has_extend),
|
|
240
|
+
favorites : {
|
|
241
|
+
total: dataset.score[18],
|
|
242
|
+
percentage: dataset.score[19],
|
|
243
|
+
},
|
|
244
|
+
worries : {
|
|
245
|
+
total: dataset.score[20],
|
|
246
|
+
percentage: dataset.score[21],
|
|
247
|
+
max : has_extend ? 136 : 132,
|
|
248
|
+
height : (has_extend ? 136 : 132) * 1.2,
|
|
249
|
+
has_extend : has_extend
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const s72_items = []
|
|
253
|
+
for(let i = 0; i<16; i+=2){
|
|
254
|
+
const score = dataset.score[i+42];
|
|
255
|
+
score.percentage = (parseInt(dataset.score[i+43].mark));
|
|
256
|
+
s72_items.push(score)
|
|
257
|
+
}
|
|
258
|
+
const section7 = {
|
|
259
|
+
s2 : {
|
|
260
|
+
raw:dataset.score[40].mark,
|
|
261
|
+
percentage: parseInt(dataset.score[41].mark),
|
|
262
|
+
items: s72_items,
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const s81_items = []
|
|
267
|
+
|
|
268
|
+
for(let i = 0; i< 10; i+=2){
|
|
269
|
+
const score = {
|
|
270
|
+
title: dataset.score[i + 60].label.fr,
|
|
271
|
+
me : {
|
|
272
|
+
raw : dataset.score[i + 60].mark,
|
|
273
|
+
percentage : parseInt(dataset.score[i + 61].mark),
|
|
274
|
+
},
|
|
275
|
+
partner : {
|
|
276
|
+
raw : dataset.score[i + 72].mark,
|
|
277
|
+
percentage : parseInt(dataset.score[i + 73].mark),
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
s81_items.push(score)
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const s82_items = []
|
|
284
|
+
|
|
285
|
+
for(let i = 0; i< 10; i+=2){
|
|
286
|
+
const score = {
|
|
287
|
+
title: dataset.score[i + 86].label.fr,
|
|
288
|
+
me : {
|
|
289
|
+
raw : dataset.score[i + 86].mark,
|
|
290
|
+
percentage : parseInt(dataset.score[i + 87].mark),
|
|
291
|
+
},
|
|
292
|
+
partner : {
|
|
293
|
+
raw : dataset.score[i + 98].mark,
|
|
294
|
+
percentage : parseInt(dataset.score[i + 99].mark),
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
s82_items.push(score)
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const section8 = {
|
|
301
|
+
s1:{
|
|
302
|
+
items:s81_items,
|
|
303
|
+
me: {
|
|
304
|
+
raw: dataset.score[58].mark,
|
|
305
|
+
percentage: parseInt(dataset.score[59].mark),
|
|
306
|
+
},
|
|
307
|
+
partner: {
|
|
308
|
+
raw: dataset.score[70].mark,
|
|
309
|
+
percentage: parseInt(dataset.score[71].mark),
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
s2 : {
|
|
313
|
+
items:s82_items,
|
|
314
|
+
me: {
|
|
315
|
+
raw: dataset.score[84].mark,
|
|
316
|
+
percentage: parseInt(dataset.score[85].mark),
|
|
317
|
+
},
|
|
318
|
+
partner: {
|
|
319
|
+
raw: dataset.score[96].mark,
|
|
320
|
+
percentage: parseInt(dataset.score[97].mark),
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return [{ section2, section3, section4, section5, section6 }, section7, section8];
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function section2circle(dataset) {
|
|
329
|
+
const raw = dataset.score[0];
|
|
330
|
+
const percentage = dataset.score[1];
|
|
331
|
+
const circle = {
|
|
332
|
+
maxValue: 45 /* Maximum value of raw mark provided by the dataset */,
|
|
333
|
+
fill: "#4F46E5" /* Color used in the raw element */,
|
|
334
|
+
circle: {
|
|
335
|
+
R: 60 /* Radius of the outer circle of the raw element */,
|
|
336
|
+
r: 42 /* Radius of the inner circle of the raw element */,
|
|
337
|
+
brs: {
|
|
338
|
+
tl: 5 /* Top left border radius */,
|
|
339
|
+
bl: 5 /* Bottom left border radius */,
|
|
340
|
+
tr: 5 /* Top right border radius */,
|
|
341
|
+
br: 5 /* Bottom right border radius */,
|
|
342
|
+
} /* Border radiuses at each end of the gauge of the raw element */,
|
|
343
|
+
angles: {
|
|
344
|
+
start: FS.toRadians(-90),
|
|
345
|
+
end: FS.toRadians(180),
|
|
346
|
+
} /* Angles of each end of the raw element */,
|
|
347
|
+
direction: false /* Clockwise direction for the raw gauge element */,
|
|
348
|
+
get totalAngle() {
|
|
349
|
+
return this.direction
|
|
350
|
+
? 2 * Math.PI - (this.angles.end - this.angles.start)
|
|
351
|
+
: this.angles.end - this.angles.start;
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
ticks: {
|
|
355
|
+
num: 2 /* Number of ticks */,
|
|
356
|
+
number: {
|
|
357
|
+
offset: 25 /* Offset from the line */,
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
// Calculate Ticks Numbers Array for Raw
|
|
363
|
+
const rawTicksNumbers = FS.createArithmeticSequence(
|
|
364
|
+
circle.maxValue,
|
|
365
|
+
-circle.maxValue / (circle.ticks.num - 1),
|
|
366
|
+
circle.ticks.num
|
|
367
|
+
).reverse();
|
|
368
|
+
|
|
369
|
+
// Gather Required Info for Raw
|
|
370
|
+
return {
|
|
371
|
+
circle: circle,
|
|
372
|
+
percentage: percentage,
|
|
373
|
+
label: raw.label,
|
|
374
|
+
mark: raw.mark,
|
|
375
|
+
zeta: (raw.mark / circle.maxValue) * circle.circle.totalAngle + circle.circle.angles.start,
|
|
376
|
+
fill: circle.fill,
|
|
377
|
+
opacity: FS.roundTo2(0.5 * (1 + raw.mark / circle.maxValue)),
|
|
378
|
+
start: {
|
|
379
|
+
number: rawTicksNumbers[0],
|
|
380
|
+
angle: (rawTicksNumbers[0] / circle.maxValue) * circle.circle.totalAngle + circle.circle.angles.start,
|
|
381
|
+
},
|
|
382
|
+
end: {
|
|
383
|
+
number: rawTicksNumbers[1],
|
|
384
|
+
angle: (rawTicksNumbers[1] / circle.maxValue) * circle.circle.totalAngle + circle.circle.angles.start,
|
|
385
|
+
},
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
function section6circle(dataset, has_extend) {
|
|
390
|
+
const raw = dataset.score[16];
|
|
391
|
+
const percentage = dataset.score[17];
|
|
392
|
+
const circle = {
|
|
393
|
+
maxValue: has_extend ? 168 : 164 /* Maximum value of raw mark provided by the dataset */,
|
|
394
|
+
fill: "#64748B" /* Color used in the raw element */,
|
|
395
|
+
circle: {
|
|
396
|
+
R: 40 /* Radius of the outer circle of the raw element */,
|
|
397
|
+
r: 24 /* Radius of the inner circle of the raw element */,
|
|
398
|
+
brs: {
|
|
399
|
+
tl: 2 /* Top left border radius */,
|
|
400
|
+
bl: 2 /* Bottom left border radius */,
|
|
401
|
+
tr: 2 /* Top right border radius */,
|
|
402
|
+
br: 2 /* Bottom right border radius */,
|
|
403
|
+
} /* Border radiuses at each end of the gauge of the raw element */,
|
|
404
|
+
angles: {
|
|
405
|
+
start: FS.toRadians(-90),
|
|
406
|
+
end: FS.toRadians(180),
|
|
407
|
+
} /* Angles of each end of the raw element */,
|
|
408
|
+
direction: false /* Clockwise direction for the raw gauge element */,
|
|
409
|
+
get totalAngle() {
|
|
410
|
+
return this.direction
|
|
411
|
+
? 2 * Math.PI - (this.angles.end - this.angles.start)
|
|
412
|
+
: this.angles.end - this.angles.start;
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
ticks: {
|
|
416
|
+
num: 2 /* Number of ticks */,
|
|
417
|
+
number: {
|
|
418
|
+
offset: 164 /* Offset from the line */,
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
// Calculate Ticks Numbers Array for Raw
|
|
424
|
+
const rawTicksNumbers = FS.createArithmeticSequence(
|
|
425
|
+
circle.maxValue,
|
|
426
|
+
-circle.maxValue / (circle.ticks.num - 1),
|
|
427
|
+
circle.ticks.num
|
|
428
|
+
).reverse();
|
|
429
|
+
|
|
430
|
+
// Gather Required Info for Raw
|
|
431
|
+
return {
|
|
432
|
+
circle: circle,
|
|
433
|
+
percentage: percentage,
|
|
434
|
+
label: raw.label,
|
|
435
|
+
mark: raw.mark,
|
|
436
|
+
zeta: (raw.mark / circle.maxValue) * circle.circle.totalAngle + circle.circle.angles.start,
|
|
437
|
+
fill: circle.fill,
|
|
438
|
+
opacity: FS.roundTo2(0.5 * (1 + raw.mark / circle.maxValue)),
|
|
439
|
+
start: {
|
|
440
|
+
number: rawTicksNumbers[0],
|
|
441
|
+
angle: (rawTicksNumbers[0] / circle.maxValue) * circle.circle.totalAngle + circle.circle.angles.start,
|
|
442
|
+
},
|
|
443
|
+
end: {
|
|
444
|
+
number: rawTicksNumbers[1],
|
|
445
|
+
angle: (rawTicksNumbers[1] / circle.maxValue) * circle.circle.totalAngle + circle.circle.angles.start,
|
|
446
|
+
},
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
function section5circle(dataset){
|
|
451
|
+
const raw = dataset.score[14]
|
|
452
|
+
const percentage = dataset.score[15]
|
|
453
|
+
const circle = {
|
|
454
|
+
minValue: 0 /* Minimum value of the item mark */,
|
|
455
|
+
maxValue: 44 /* Maximum value of the item mark */,
|
|
456
|
+
stops: [44] /* Stops array of the item mark */,
|
|
457
|
+
circle: {
|
|
458
|
+
center: {
|
|
459
|
+
radius: 21.5 /* Radius of the central circle */,
|
|
460
|
+
},
|
|
461
|
+
main: {
|
|
462
|
+
R: 86 /* Radius of the outer circle of the item element */,
|
|
463
|
+
r: 68.8 /* Radius of the inner circle of the item element */,
|
|
464
|
+
brs: {
|
|
465
|
+
tl: 0 /* Top left border radius */,
|
|
466
|
+
bl: 0 /* Bottom left border radius */,
|
|
467
|
+
tr: 0 /* Top right border radius */,
|
|
468
|
+
br: 0 /* Bottom right border radius */,
|
|
469
|
+
} /* Border radiuses at each end of the gauge of the item element */,
|
|
470
|
+
angles: {
|
|
471
|
+
start: FS.toRadians(-180),
|
|
472
|
+
end: FS.toRadians(0),
|
|
473
|
+
} /* Angles of each end of the item element */,
|
|
474
|
+
direction: false /* Clockwise direction for the item gauge element */,
|
|
475
|
+
base: {
|
|
476
|
+
fill: "#F3F4F6" /* Fill of the base part of the item gauge */,
|
|
477
|
+
stroke: "#E5E7EB" /* Stroke of the base part of the item gauge */,
|
|
478
|
+
},
|
|
479
|
+
body: {
|
|
480
|
+
fill: "#DB2777" /* Fill of the body part of the item gauge */,
|
|
481
|
+
stroke: "#9D174D" /* Stroke of the base part of the item gauge */,
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
}
|
|
486
|
+
return {
|
|
487
|
+
raw : raw,
|
|
488
|
+
percentage : percentage,
|
|
489
|
+
circle: circle,
|
|
490
|
+
item : {
|
|
491
|
+
label: raw.label,
|
|
492
|
+
mark: raw.mark,
|
|
493
|
+
angle: _markToAngle(
|
|
494
|
+
raw.mark,
|
|
495
|
+
circle.minValue,
|
|
496
|
+
circle.maxValue,
|
|
497
|
+
circle.circle.main.angles,
|
|
498
|
+
circle.circle.main.direction
|
|
499
|
+
),
|
|
500
|
+
stops: circle.stops.map((stop) => ({
|
|
501
|
+
mark: stop,
|
|
502
|
+
angle: _markToAngle(
|
|
503
|
+
stop,
|
|
504
|
+
circle.minValue,
|
|
505
|
+
circle.maxValue,
|
|
506
|
+
circle.circle.main.angles,
|
|
507
|
+
circle.circle.main.direction
|
|
508
|
+
),
|
|
509
|
+
})),
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
function _markToAngle(mark, min, max, angles, direction) {
|
|
515
|
+
const totalAngle = _calcDiffAngle(angles.end, angles.start, direction);
|
|
516
|
+
const deltaTheta = ((mark - min) / (max - min)) * totalAngle;
|
|
517
|
+
return _calcDistAngle(deltaTheta, angles.start, direction);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function _calcDiffAngle(theta, theta0, direction) {
|
|
521
|
+
return direction ? 2 * Math.PI - (theta - theta0) : theta - theta0;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
function _calcDistAngle(deltaTheta, theta0, direction) {
|
|
525
|
+
return direction ? 2 * Math.PI - deltaTheta + theta0 : deltaTheta + theta0;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
module.exports = PMCIEF9A;
|