{ "ListFormCode": "App.DeveloperKit.CustomComponents", "KeyFieldName": "Id", "GeneratedAt": "2026-10-04T13:55:55Z", "Order": 0, "Rows": [ { "Id": "b2d9fa60-b052-5039-a0fc-146f4e5b2e8c", "Name": "MyPerformanceWidget", "RoutePath": null, "Description": "Intranet panosu: çalışanın aktif değerlendirmesi, puanları ve gelişim aksiyonları", "IsActive": true, "Dependencies": [], "Code": "// Calisanin kendi performans ozeti. Veri ekranlarin kendi sorgusundan okunur: satir suzmesi\n// (EmployeeId = oturum acan kullanici) ve yetki ListForm'da kalir, bilesen yalnizca sayar.\nconst REVIEWS = 'App.Hr.MyPerformanceReview'\nconst PLANS = 'App.Hr.MyDevelopmentPlan'\n\nconst loadRows = async (listFormCode) => {\n const response = await apiService.fetchData({\n method: 'GET',\n url: '/api/app/list-form-select/select',\n params: { listFormCode, take: 500 },\n })\n return response.data?.data ?? []\n}\n\nconst formatScore = (value) =>\n value === null || value === undefined || value === '' ? '-' : Number(value).toFixed(1)\n\nconst Stat = ({ label, value, children }) => (\n
\n {children}\n
\n
{value}
\n
{label}
\n
\n
\n)\n\nconst MyPerformanceWidget = () => {\n const [reviews, setReviews] = useState([])\n const [plans, setPlans] = useState([])\n const [loading, setLoading] = useState(true)\n const canSeePlans = checkPermission(PLANS)\n\n useEffect(() => {\n let active = true\n Promise.all([loadRows(REVIEWS), canSeePlans ? loadRows(PLANS) : Promise.resolve([])])\n .then(([reviewRows, planRows]) => {\n if (!active) return\n setReviews(reviewRows)\n setPlans(planRows)\n })\n .catch(() => {})\n .finally(() => active && setLoading(false))\n return () => {\n active = false\n }\n }, [canSeePlans])\n\n const completed = reviews.filter((r) => r.Status === 'Completed')\n const current = reviews.find((r) => r.Status !== 'Completed')\n const scored = completed.filter((r) => r.OverallScore !== null && r.OverallScore !== undefined)\n const average = scored.length\n ? scored.reduce((sum, r) => sum + Number(r.OverallScore), 0) / scored.length\n : null\n const today = new Date().toISOString().slice(0, 10)\n const openPlans = plans.filter((p) => p.Status === 'Planned' || p.Status === 'InProgress')\n const overduePlans = openPlans.filter((p) => p.DueDate && String(p.DueDate).slice(0, 10) < today)\n\n return (\n
\n
\n \n

\n {translate('::App.DashboardWidget.MyPerformance')}\n

\n
\n
\n {loading ? (\n
...
\n ) : reviews.length === 0 ? (\n
\n {translate('::App.DashboardWidget.Performance.NoReview')}\n
\n ) : (\n <>\n {current && (\n
\n
\n {translate('::App.DashboardWidget.Performance.ActiveReview')}\n
\n
\n {translate('::App.Hr.PerformanceReview.Status.' + current.Status)}\n
\n
\n
\n {translate('::App.Listform.ListformField.GoalScore')}\n
{formatScore(current.GoalScore)}
\n
\n
\n {translate('::App.Listform.ListformField.CompetencyScore')}\n
{formatScore(current.CompetencyScore)}
\n
\n
\n {translate('::App.Listform.ListformField.OverallScore')}\n
{formatScore(current.OverallScore)}
\n
\n
\n
\n )}\n
\n \n \n \n \n \n \n {canSeePlans && (\n \n \n \n )}\n {canSeePlans && (\n \n \n \n )}\n
\n \n )}\n
\n \n {translate('::App.Hr.MyPerformanceReview')} →\n \n {canSeePlans && (\n \n {translate('::App.Hr.MyDevelopmentPlan')} →\n \n )}\n
\n
\n
\n )\n}\n\nexport default MyPerformanceWidget", "Props": null, "DataSources": [], "SeoTitle": null, "SeoDescription": null, "SeoKeywords": null, "SeoOgImage": null, "SeoCanonicalUrl": null, "SeoNoIndex": true, "SeoIncludeInSitemap": false, "SeoChangeFrequency": null, "SeoPriority": null, "SeoStructuredData": null } ] }