Department ve Jobposition seçim düzenlemesi

This commit is contained in:
Sedat Öztürk 2026-06-27 21:38:36 +03:00
parent 9e76ab5b4e
commit 352cf047b0
6 changed files with 41 additions and 8 deletions

View file

@ -227,10 +227,38 @@ public static class LookupQueryValues
$"\"Name\" AS \"Name\" " +
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition))}\" " +
$"WHERE " +
$"(\"DepartmentId\" = @param0 OR \"ParentId\" IS NULL OR @param0 IS NULL) " +
$"(\"DepartmentId\" = @param0 OR @param0 IS NULL) " +
$"AND \"IsDeleted\" = 'false' " +
$"ORDER BY \"Name\";";
public static string JobPositionFullValues =
$";WITH \"DepartmentTree\" AS " +
$"( " +
$"SELECT \"Id\", \"ParentId\" " +
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Department))}\" " +
$"WHERE \"Id\" = @param0 " +
$"OR @param0 IS NULL " +
$"UNION ALL " +
$"SELECT d.\"Id\", d.\"ParentId\" " +
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Department))}\" d " +
$"INNER JOIN \"DepartmentTree\" dt " +
$"ON d.\"Id\" = dt.\"ParentId\" " +
$") " +
$"SELECT " +
$"jp.\"Id\" AS \"Key\", " +
$"jp.\"Name\" AS \"Name\" " +
$"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition))}\" jp " +
$"WHERE " +
$"jp.\"IsDeleted\" = 'false' " +
$"AND " +
$"( " +
$"jp.\"DepartmentId\" IN (SELECT \"Id\" FROM \"DepartmentTree\") " +
$"OR jp.\"ParentId\" IS NULL " +
$") " +
$"ORDER BY jp.\"Name\";";
public static string SurveyQuestionValues =
$"SELECT " +
$"\"Id\" AS \"Key\", " +

View file

@ -2653,7 +2653,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.JobPositionValues,
LookupQuery = LookupQueryValues.JobPositionFullValues,
CascadeRelationField = "DepartmentId",
CascadeFilterOperator="=",
CascadeParentFields = "DepartmentId",

View file

@ -1436,6 +1436,11 @@
"Name": "Finans",
"ParentName": "Yönetim"
},
{
"Id": "051048d7-2f44-4f9d-b5a1-6e7f8a9b0c1d",
"Name": "Muhasebe",
"ParentName": "Finans"
},
{
"Id": "3cd38ab3-7e6f-4b8d-9c0a-5f4e3d2c1b0a",
"Name": "Bilgi İşlem",
@ -1480,13 +1485,13 @@
},
{
"Id": "b7c8d9e0-f1a2-4b3c-8d9e-0f1a2b3c4d5e",
"DepartmentName": "Finans",
"DepartmentName": "Muhasebe",
"Name": "Muhasebe Müdürü",
"ParentName": "Finans Müdürü"
},
{
"Id": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f",
"DepartmentName": "Finans",
"DepartmentName": "Muhasebe",
"Name": "Muhasebe Şefi",
"ParentName": "Muhasebe Müdürü"
}

View file

@ -7,7 +7,7 @@
"AttachmentsPath": "C:\\Private\\Projects\\sozsoft-platform\\configs\\mail-queue\\attachments",
"CdnUrl": "http://localhost:4005",
"CdnPath": "D:\\Sozsoft\\sozsoft-platform\\configs\\docker\\data\\cdn",
"Version": "1.0.5",
"Version": "1.0.7",
"BackupPath": "/var/opt/mssql/backup"
},
"ConnectionStrings": {

View file

@ -1,7 +1,7 @@
{
"name": "sozsoft-platform-ui",
"private": true,
"version": "1.0.6",
"version": "1.0.7",
"elstarVersion": "2.1.6",
"type": "module",
"scripts": {

View file

@ -218,9 +218,9 @@ export function MenuAddDialog({
void rawItems
const fieldCls =
'h-11 px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-sm text-gray-700 dark:text-gray-200 outline-none focus:border-indigo-400 w-full'
'h-9 px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-sm text-gray-700 dark:text-gray-200 outline-none focus:border-indigo-400 w-full'
const disabledCls =
'h-11 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700 text-sm text-gray-400 dark:text-gray-500 cursor-not-allowed w-full'
'h-9 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700 text-sm text-gray-400 dark:text-gray-500 cursor-not-allowed w-full'
const labelCls = 'text-xs font-medium text-gray-500 dark:text-gray-400 mb-1'
const toCodeToken = (value: string) => value.replace(/\s+/g, '')