30 lines
4.7 KiB
JSON
30 lines
4.7 KiB
JSON
|
|
{
|
||
|
|
"ListFormCode": "Sas.DeveloperKit.CustomComponents",
|
||
|
|
"KeyFieldName": "Id",
|
||
|
|
"GeneratedAt": "2026-10-04T13:55:55Z",
|
||
|
|
"Order": 0,
|
||
|
|
"Rows": [
|
||
|
|
{
|
||
|
|
"Id": "98a5c0b9-c8d6-5e83-ae76-d9ccb5b70cba",
|
||
|
|
"Name": "TeamPerformanceWidget",
|
||
|
|
"RoutePath": null,
|
||
|
|
"Description": "Intranet panosu: yöneticinin ekibindeki değerlendirmelerin özeti",
|
||
|
|
"IsActive": true,
|
||
|
|
"Dependencies": [],
|
||
|
|
"Code": "// Yoneticinin ekip ozeti. Satirlar ekranin sorgusundan gelir (ManagerId = oturum acan kullanici);\n// degerlendirmesini bekleyen calisanlar adlariyla listelenir.\nconst TEAM = 'Hr.TeamPerformanceReview'\n\nconst Stat = ({ label, value, children }) => (\n <div className=\"flex items-center gap-3 rounded-lg border border-gray-200 bg-gray-50 p-3 dark:border-gray-700 dark:bg-gray-900/40\">\n {children}\n <div className=\"min-w-0\">\n <div className=\"text-lg font-semibold text-gray-900 dark:text-white\">{value}</div>\n <div className=\"truncate text-xs text-gray-500 dark:text-gray-400\">{label}</div>\n </div>\n </div>\n)\n\nconst TeamPerformanceWidget = () => {\n const [rows, setRows] = useState([])\n const [loading, setLoading] = useState(true)\n\n useEffect(() => {\n let active = true\n apiService\n .fetchData({\n method: 'GET',\n url: '/api/app/list-form-select/select',\n params: { listFormCode: TEAM, take: 500 },\n })\n .then((response) => active && setRows(response.data?.data ?? []))\n .catch(() => {})\n .finally(() => active && setLoading(false))\n return () => {\n active = false\n }\n }, [])\n\n const inGoalOrSelf = rows.filter((r) => r.Status === 'GoalSetting' || r.Status === 'SelfReview')\n const awaitingMe = rows.filter((r) => r.Status === 'ManagerReview')\n const completed = rows.filter((r) => r.Status === 'Completed')\n\n return (\n <div className=\"overflow-hidden rounded-xl border border-gray-200/50 bg-white shadow-lg dark:border-gray-700/50 dark:bg-gray-800\">\n <div className=\"flex items-center gap-2 border-b border-gray-200 p-4 dark:border-gray-700\">\n <PlatformIcon name=\"FaUsers\" className=\"h-5 w-5 text-indigo-500\" />\n <h2 className=\"text-base font-semibold text-gray-900 dark:text-white\">\n {translate('::Sas.DashboardWidget.TeamPerformance')}\n </h2>\n </div>\n <div className=\"space-y-3 p-3\">\n {loading ? (\n <div className=\"p-4 text-center text-sm text-gray-500\">...</div>\n ) : rows.length === 0 ? (\n <div className=\"p-4 text-center text-sm text-gray-500 dark:text-gray-400\">\n {translate('::Sas.DashboardWidget.Performance.NoTeamReview')}\n </div>\n ) : (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <Stat label={translate('::Hr.Performance.Widget.AwaitingMe')} value={awaitingMe.length}>\n <PlatformIcon name=\"FaUserTie\" className=\"h-5 w-5 text-purple-500\" />\n </Stat>\n <Stat label={translate('::Hr.Performance.Widget.InGoalOrSelf')} value={inGoalOrSelf.length}>\n <PlatformIcon name=\"FaHourglassHalf\" className=\"h-5 w-5 text-amber-500\" />\n </Stat>\n <Stat label={translate('::Hr.Performance.Widget.Completed')} value={completed.length}>\n <PlatformIcon name=\"FaCheckCircle\" className=\"h-5 w-5 text-green-500\" />\n </Stat>\n <Stat label={translate('::Sas.Widget.Total')} value={rows.length}>\n <PlatformIcon name=\"FaClipboardList\" className=\"h-5 w-5 text-blue-500\" />\n </Stat>\n </div>\n {awaitingMe.length > 0 && (\n <ul className=\"divide-y divide-gray-100 rounded-lg border border-gray-200 dark:divide-gray-700 dark:border-gray-700\">\n {awaitingMe.slice(0, 5).map((r) => (\n <li key={r.Id} className=\"truncate px-3 py-2 text-sm text-gray-700 dark:text-gray-200\">\n {r.EmployeeName}\n </li>\n ))}\n </ul>\n )}\n </>\n )}\n <a href={'/admin/list/' + TEAM} className=\"text-sm font-medium text-indigo-600 hover:underline dark:text-indigo-400\">\n {translate('::Hr.TeamPerformanceReview')} →\n </a>\n </div>\n </div>\n )\n}\n\nexport default TeamPerformanceWidget",
|
||
|
|
"Props": null,
|
||
|
|
"DataSources": [],
|
||
|
|
"SeoTitle": null,
|
||
|
|
"SeoDescription": null,
|
||
|
|
"SeoKeywords": null,
|
||
|
|
"SeoOgImage": null,
|
||
|
|
"SeoCanonicalUrl": null,
|
||
|
|
"SeoNoIndex": true,
|
||
|
|
"SeoIncludeInSitemap": false,
|
||
|
|
"SeoChangeFrequency": null,
|
||
|
|
"SeoPriority": null,
|
||
|
|
"SeoStructuredData": null
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|