Mobile, Phone, Fax güncellemesi
This commit is contained in:
parent
b37010d1bc
commit
ef8f830810
22 changed files with 426 additions and 285 deletions
|
|
@ -10,7 +10,7 @@ public class CustomTenantDto
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public string OrganizationName { get; set; }
|
public string OrganizationName { get; set; }
|
||||||
public string Founder { get; set; }
|
public string Founder { get; set; }
|
||||||
public long VknTckn { get; set; }
|
public long? VknTckn { get; set; }
|
||||||
public string TaxOffice { get; set; }
|
public string TaxOffice { get; set; }
|
||||||
public string Country { get; set; }
|
public string Country { get; set; }
|
||||||
public string City { get; set; }
|
public string City { get; set; }
|
||||||
|
|
@ -19,7 +19,7 @@ public class CustomTenantDto
|
||||||
public string Address1 { get; set; }
|
public string Address1 { get; set; }
|
||||||
public string Address2 { get; set; }
|
public string Address2 { get; set; }
|
||||||
public string PostalCode { get; set; }
|
public string PostalCode { get; set; }
|
||||||
public long MobileNumber { get; set; }
|
public long? MobileNumber { get; set; }
|
||||||
public long? PhoneNumber { get; set; }
|
public long? PhoneNumber { get; set; }
|
||||||
public long? FaxNumber { get; set; }
|
public long? FaxNumber { get; set; }
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1244,9 +1244,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
Text = "Seed",
|
Text = "Seed",
|
||||||
AuthName = AppCodes.Branches + ".Update",
|
AuthName = AppCodes.Branches + ".Update",
|
||||||
DialogName = "BranchSeed",
|
DialogName = "BranchSeed",
|
||||||
DialogParameters = JsonSerializer.Serialize(new {
|
DialogParameters = JsonSerializer.Serialize(
|
||||||
name = "@Id",
|
new { id = "@Id", name = "@Name"}
|
||||||
})
|
)
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,7 @@ public static class LookupQueryValues
|
||||||
$"SELECT \"Name\" AS \"Key\", " +
|
$"SELECT \"Name\" AS \"Key\", " +
|
||||||
$"CONCAT(\"Name\", ' (', \"DisplayName\", ')') AS \"Name\" " +
|
$"CONCAT(\"Name\", ' (', \"DisplayName\", ')') AS \"Name\" " +
|
||||||
$"FROM \"AbpPermissions\" " +
|
$"FROM \"AbpPermissions\" " +
|
||||||
$"WHERE \"IsEnabled\" = 'false' " +
|
$"WHERE \"IsEnabled\" = 'true' " +
|
||||||
$"ORDER BY \"Name\";";
|
$"ORDER BY \"Name\";";
|
||||||
|
|
||||||
public static string MenuCodeValues =
|
public static string MenuCodeValues =
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,8 @@ public class BranchSeedManager : DomainService
|
||||||
InsertedItems = []
|
InsertedItems = []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (items.RegistrationTypes.Count > 0)
|
||||||
|
{
|
||||||
var registrationTypeLog = CreateLog(nameof(RegistrationType));
|
var registrationTypeLog = CreateLog(nameof(RegistrationType));
|
||||||
foreach (var item in items.RegistrationTypes)
|
foreach (var item in items.RegistrationTypes)
|
||||||
{
|
{
|
||||||
|
|
@ -95,11 +96,19 @@ public class BranchSeedManager : DomainService
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
|
|
||||||
registrationTypeLog.InsertedCount++;
|
registrationTypeLog.InsertedCount++;
|
||||||
registrationTypeLog.InsertedItems.Add(item.Name);
|
registrationTypeLog.InsertedItems.Add(
|
||||||
|
$"{{ " +
|
||||||
|
$"\"name\": \"{item.Name}\", " +
|
||||||
|
$"\"status\": \"{item.Status}\" " +
|
||||||
|
$"}}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.Details.Add(registrationTypeLog);
|
result.Details.Add(registrationTypeLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.RegistrationMethods.Count > 0)
|
||||||
|
{
|
||||||
var registrationMethodLog = CreateLog(nameof(RegistrationMethod));
|
var registrationMethodLog = CreateLog(nameof(RegistrationMethod));
|
||||||
foreach (var item in items.RegistrationMethods)
|
foreach (var item in items.RegistrationMethods)
|
||||||
{
|
{
|
||||||
|
|
@ -120,12 +129,21 @@ public class BranchSeedManager : DomainService
|
||||||
});
|
});
|
||||||
|
|
||||||
registrationMethodLog.InsertedCount++;
|
registrationMethodLog.InsertedCount++;
|
||||||
registrationMethodLog.InsertedItems.Add(item.Name);
|
registrationMethodLog.InsertedItems.Add(
|
||||||
|
$"{{ " +
|
||||||
|
$"\"name\": \"{item.Name}\", " +
|
||||||
|
$"\"status\": \"{item.Status}\", " +
|
||||||
|
$"\"registrationType\": \"{item.RegistrationTypeName}\" " +
|
||||||
|
$"}}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.Details.Add(registrationMethodLog);
|
result.Details.Add(registrationMethodLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.ClassTypes.Count > 0)
|
||||||
|
{
|
||||||
var classTypeLog = CreateLog(nameof(ClassType));
|
var classTypeLog = CreateLog(nameof(ClassType));
|
||||||
foreach (var item in items.ClassTypes)
|
foreach (var item in items.ClassTypes)
|
||||||
{
|
{
|
||||||
|
|
@ -148,12 +166,23 @@ public class BranchSeedManager : DomainService
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
|
|
||||||
classTypeLog.InsertedCount++;
|
classTypeLog.InsertedCount++;
|
||||||
classTypeLog.InsertedItems.Add(item.Name);
|
classTypeLog.InsertedItems.Add(
|
||||||
|
$"{{ " +
|
||||||
|
$"\"name\": \"{item.Name}\", " +
|
||||||
|
$"\"status\": \"{item.Status}\", " +
|
||||||
|
$"\"registrationType\": \"{item.RegistrationTypeName}\", " +
|
||||||
|
$"\"minStudentCount\": {item.MinStudentCount}, " +
|
||||||
|
$"\"maxStudentCount\": {item.MaxStudentCount} " +
|
||||||
|
$"}}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.Details.Add(classTypeLog);
|
result.Details.Add(classTypeLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.Classes.Count > 0)
|
||||||
|
{
|
||||||
var classLog = CreateLog(nameof(Class));
|
var classLog = CreateLog(nameof(Class));
|
||||||
foreach (var item in items.Classes)
|
foreach (var item in items.Classes)
|
||||||
{
|
{
|
||||||
|
|
@ -174,12 +203,21 @@ public class BranchSeedManager : DomainService
|
||||||
});
|
});
|
||||||
|
|
||||||
classLog.InsertedCount++;
|
classLog.InsertedCount++;
|
||||||
classLog.InsertedItems.Add(item.Name);
|
classLog.InsertedItems.Add(
|
||||||
|
$"{{ " +
|
||||||
|
$"\"name\": \"{item.Name}\", " +
|
||||||
|
$"\"status\": \"{item.Status}\", " +
|
||||||
|
$"\"classType\": \"{item.ClassTypeName}\" " +
|
||||||
|
$"}}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.Details.Add(classLog);
|
result.Details.Add(classLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.Levels.Count > 0)
|
||||||
|
{
|
||||||
var levelLog = CreateLog(nameof(Level));
|
var levelLog = CreateLog(nameof(Level));
|
||||||
foreach (var item in items.Levels)
|
foreach (var item in items.Levels)
|
||||||
{
|
{
|
||||||
|
|
@ -205,12 +243,26 @@ public class BranchSeedManager : DomainService
|
||||||
});
|
});
|
||||||
|
|
||||||
levelLog.InsertedCount++;
|
levelLog.InsertedCount++;
|
||||||
levelLog.InsertedItems.Add(item.Name);
|
levelLog.InsertedItems.Add(
|
||||||
|
$"{{ " +
|
||||||
|
$"\"name\": \"{item.Name}\", " +
|
||||||
|
$"\"status\": \"{item.Status}\", " +
|
||||||
|
$"\"classType\": \"{item.ClassTypeName}\", " +
|
||||||
|
$"\"levelType\": \"{item.LevelType}\", " +
|
||||||
|
$"\"order\": {item.Order}, " +
|
||||||
|
$"\"lessonCount\": {item.LessonCount}, " +
|
||||||
|
$"\"lessonDuration\": {item.LessonDuration}, " +
|
||||||
|
$"\"monthlyPaymentRate\": {item.MonthlyPaymentRate} " +
|
||||||
|
$"}}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.Details.Add(levelLog);
|
result.Details.Add(levelLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.LessonPeriods.Count > 0)
|
||||||
|
{
|
||||||
var lessonPeriodLog = CreateLog(nameof(LessonPeriod));
|
var lessonPeriodLog = CreateLog(nameof(LessonPeriod));
|
||||||
foreach (var item in items.LessonPeriods)
|
foreach (var item in items.LessonPeriods)
|
||||||
{
|
{
|
||||||
|
|
@ -231,11 +283,23 @@ public class BranchSeedManager : DomainService
|
||||||
});
|
});
|
||||||
|
|
||||||
lessonPeriodLog.InsertedCount++;
|
lessonPeriodLog.InsertedCount++;
|
||||||
lessonPeriodLog.InsertedItems.Add(item.Name);
|
lessonPeriodLog.InsertedItems.Add(
|
||||||
|
$"{{ " +
|
||||||
|
$"\"name\": \"{item.Name}\", " +
|
||||||
|
$"\"day\": \"{item.Day}\", " +
|
||||||
|
$"\"lesson1\": \"{item.Lesson1}\", " +
|
||||||
|
$"\"lesson2\": \"{item.Lesson2}\", " +
|
||||||
|
$"\"lesson3\": \"{item.Lesson3}\", " +
|
||||||
|
$"\"lesson4\": \"{item.Lesson4}\" " +
|
||||||
|
$"}}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.Details.Add(lessonPeriodLog);
|
result.Details.Add(lessonPeriodLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.Schedules.Count > 0)
|
||||||
|
{
|
||||||
var scheduleLog = CreateLog(nameof(Schedule));
|
var scheduleLog = CreateLog(nameof(Schedule));
|
||||||
foreach (var item in items.Schedules)
|
foreach (var item in items.Schedules)
|
||||||
{
|
{
|
||||||
|
|
@ -267,11 +331,32 @@ public class BranchSeedManager : DomainService
|
||||||
});
|
});
|
||||||
|
|
||||||
scheduleLog.InsertedCount++;
|
scheduleLog.InsertedCount++;
|
||||||
scheduleLog.InsertedItems.Add(item.Name);
|
scheduleLog.InsertedItems.Add(
|
||||||
|
$"{{ \"name\": \"{item.Name}\", " +
|
||||||
|
$"\"status\": \"{item.Status}\", " +
|
||||||
|
$"\"startTime\": \"{item.StartTime:HH\\:mm}\", " +
|
||||||
|
$"\"endTime\": \"{item.EndTime:HH\\:mm}\", " +
|
||||||
|
$"\"lessonMinute\": {item.LessonMinute}, " +
|
||||||
|
$"\"lessonBreakMinute\": {item.LessonBreakMinute}, " +
|
||||||
|
$"\"lessonCount\": {item.LessonCount}, " +
|
||||||
|
$"\"lunchTime\": \"{item.LunchTime:HH\\:mm}\", " +
|
||||||
|
$"\"lunchMinute\": {item.LunchMinute}, " +
|
||||||
|
$"\"includeLunch\": {item.IncludeLunch.ToString().ToLower()}, " +
|
||||||
|
$"\"monday\": {item.Monday.ToString().ToLower()}, " +
|
||||||
|
$"\"tuesday\": {item.Tuesday.ToString().ToLower()}, " +
|
||||||
|
$"\"wednesday\": {item.Wednesday.ToString().ToLower()}, " +
|
||||||
|
$"\"thursday\": {item.Thursday.ToString().ToLower()}, " +
|
||||||
|
$"\"friday\": {item.Friday.ToString().ToLower()}, " +
|
||||||
|
$"\"saturday\": {item.Saturday.ToString().ToLower()}, " +
|
||||||
|
$"\"sunday\": {item.Sunday.ToString().ToLower()} }}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.Details.Add(scheduleLog);
|
result.Details.Add(scheduleLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.Meals.Count > 0)
|
||||||
|
{
|
||||||
var mealLog = CreateLog(nameof(Meal));
|
var mealLog = CreateLog(nameof(Meal));
|
||||||
foreach (var item in items.Meals)
|
foreach (var item in items.Meals)
|
||||||
{
|
{
|
||||||
|
|
@ -284,14 +369,16 @@ public class BranchSeedManager : DomainService
|
||||||
BranchId = branchId,
|
BranchId = branchId,
|
||||||
Date = item.Date,
|
Date = item.Date,
|
||||||
TotalCalorie = item.TotalCalorie,
|
TotalCalorie = item.TotalCalorie,
|
||||||
Materials = item.Materials
|
Materials = item.Materials,
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
|
|
||||||
mealLog.InsertedCount++;
|
mealLog.InsertedCount++;
|
||||||
mealLog.InsertedItems.Add(string.Format("{0} {1} {2}", item.Date, item.Type, item.Materials));
|
|
||||||
|
mealLog.InsertedItems.Add($"{{ \"date\": \"{item.Date:yyyy-MM-dd}\", \"type\": \"{item.Type}\", \"materials\": \"{item.Materials.Replace("|", ", ")}\" }}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.Details.Add(mealLog);
|
result.Details.Add(mealLog);
|
||||||
|
}
|
||||||
|
|
||||||
result.Success = true;
|
result.Success = true;
|
||||||
result.Message = $"Seed işlemi başarıyla tamamlandı. Toplam {result.TotalInsertedCount} kayıt eklendi.";
|
result.Message = $"Seed işlemi başarıyla tamamlandı. Toplam {result.TotalInsertedCount} kayıt eklendi.";
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ public class BranchUsers : Entity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid BranchId { get; set; }
|
public Guid BranchId { get; set; }
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
|
|
||||||
Guid? IMultiTenant.TenantId => TenantId;
|
Guid? IMultiTenant.TenantId => TenantId;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ public class Class : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; }
|
public Guid? BranchId { get; set; }
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public Guid ClassTypeId { get; set; }
|
public Guid ClassTypeId { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ public class ClassType : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; }
|
public Guid? BranchId { get; set; }
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public Guid RegistrationTypeId { get; set; }
|
public Guid RegistrationTypeId { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ public class LessonPeriod : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; }
|
public Guid? BranchId { get; set; }
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Day { get; set; }
|
public string Day { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ public class Level : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; }
|
public Guid? BranchId { get; set; }
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public Guid ClassTypeId { get; set; } // SinifTipiID (FK)
|
public Guid ClassTypeId { get; set; } // SinifTipiID (FK)
|
||||||
public string LevelType { get; set; } // SeviyeTipi
|
public string LevelType { get; set; } // SeviyeTipi
|
||||||
public string Name { get; set; } // SeviyeKodu
|
public string Name { get; set; } // SeviyeKodu
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ public class RegistrationMethod : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; } // SubeID
|
public Guid? BranchId { get; set; } // SubeID
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public Guid RegistrationTypeId { get; set; } // KayitTipiID
|
public Guid RegistrationTypeId { get; set; } // KayitTipiID
|
||||||
public string Name { get; set; } // KayitSekli
|
public string Name { get; set; } // KayitSekli
|
||||||
public string Status { get; set; } // Durum
|
public string Status { get; set; } // Durum
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ public class RegistrationType : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; } // SubeID
|
public Guid? BranchId { get; set; } // SubeID
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public string Name { get; set; } // KayitTipi
|
public string Name { get; set; } // KayitTipi
|
||||||
public string Status { get; set; } // Durum
|
public string Status { get; set; } // Durum
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ public class Schedule : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; }
|
public Guid? BranchId { get; set; }
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ public class Meal : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; }
|
public Guid? BranchId { get; set; }
|
||||||
|
public Branch Branch { get; set; }
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public decimal TotalCalorie { get; set; }
|
public decimal TotalCalorie { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public class Order : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
|
||||||
public string OrganizationName { get; set; }
|
public string OrganizationName { get; set; }
|
||||||
public string Founder { get; set; }
|
public string Founder { get; set; }
|
||||||
public long VknTckn { get; set; }
|
public long? VknTckn { get; set; }
|
||||||
public string TaxOffice { get; set; }
|
public string TaxOffice { get; set; }
|
||||||
public string Address1 { get; set; }
|
public string Address1 { get; set; }
|
||||||
public string Address2 { get; set; }
|
public string Address2 { get; set; }
|
||||||
|
|
@ -22,7 +22,7 @@ public class Order : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public string Country { get; set; }
|
public string Country { get; set; }
|
||||||
public string City { get; set; }
|
public string City { get; set; }
|
||||||
public string PostalCode { get; set; }
|
public string PostalCode { get; set; }
|
||||||
public long MobileNumber { get; set; }
|
public long? MobileNumber { get; set; }
|
||||||
public long? PhoneNumber { get; set; }
|
public long? PhoneNumber { get; set; }
|
||||||
public long? FaxNumber { get; set; }
|
public long? FaxNumber { get; set; }
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Volo.Abp.Domain.Entities.Auditing;
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
|
||||||
namespace Kurs.Platform.Entities;
|
namespace Kurs.Platform.Entities;
|
||||||
|
|
@ -24,4 +26,14 @@ public class Branch : FullAuditedEntity<Guid>
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
public string Website { get; set; }
|
public string Website { get; set; }
|
||||||
public bool? IsActive { get; set; }
|
public bool? IsActive { get; set; }
|
||||||
|
|
||||||
|
public ICollection<BranchUsers> UserBranches { get; set; }
|
||||||
|
public ICollection<RegistrationType> RegistrationTypes { get; set; }
|
||||||
|
public ICollection<RegistrationMethod> RegistrationMethods { get; set; }
|
||||||
|
public ICollection<ClassType> ClassTypes { get; set; }
|
||||||
|
public ICollection<Class> Classes { get; set; }
|
||||||
|
public ICollection<Level> Levels { get; set; }
|
||||||
|
public ICollection<LessonPeriod> LessonPeriods { get; set; }
|
||||||
|
public ICollection<Schedule> Schedules { get; set; }
|
||||||
|
public ICollection<Meal> Meals { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ public static class AbpTenantExtensions
|
||||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.Founder);
|
return tenant.GetProperty<string>(PlatformConsts.Tenants.Founder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetVknTckn(this Tenant tenant, long vknTckn)
|
public static void SetVknTckn(this Tenant tenant, long? vknTckn)
|
||||||
{
|
{
|
||||||
tenant.SetProperty(PlatformConsts.Tenants.VknTckn, vknTckn);
|
tenant.SetProperty(PlatformConsts.Tenants.VknTckn, vknTckn.HasValue ? vknTckn : null);
|
||||||
}
|
}
|
||||||
public static long GetVknTckn(this Tenant tenant)
|
public static long? GetVknTckn(this Tenant tenant)
|
||||||
{
|
{
|
||||||
return tenant.GetProperty<long>(PlatformConsts.Tenants.VknTckn);
|
return tenant.GetProperty<long?>(PlatformConsts.Tenants.VknTckn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetTaxOffice(this Tenant tenant, string taxOffice)
|
public static void SetTaxOffice(this Tenant tenant, string taxOffice)
|
||||||
|
|
@ -114,29 +114,29 @@ public static class AbpTenantExtensions
|
||||||
|
|
||||||
public static void SetPhoneNumber(this Tenant tenant, long? phoneNumber)
|
public static void SetPhoneNumber(this Tenant tenant, long? phoneNumber)
|
||||||
{
|
{
|
||||||
tenant.SetProperty(PlatformConsts.Tenants.PhoneNumber, phoneNumber);
|
tenant.SetProperty(PlatformConsts.Tenants.PhoneNumber, phoneNumber.HasValue ? phoneNumber : null);
|
||||||
}
|
}
|
||||||
public static long GetPhoneNumber(this Tenant tenant)
|
public static long? GetPhoneNumber(this Tenant tenant)
|
||||||
{
|
{
|
||||||
return tenant.GetProperty<long>(PlatformConsts.Tenants.PhoneNumber);
|
return tenant.GetProperty<long?>(PlatformConsts.Tenants.PhoneNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetMobileNumber(this Tenant tenant, long? mobileNumber)
|
public static void SetMobileNumber(this Tenant tenant, long? mobileNumber)
|
||||||
{
|
{
|
||||||
tenant.SetProperty(PlatformConsts.Tenants.MobileNumber, mobileNumber);
|
tenant.SetProperty(PlatformConsts.Tenants.MobileNumber, mobileNumber.HasValue ? mobileNumber : null);
|
||||||
}
|
}
|
||||||
public static long GetMobileNumber(this Tenant tenant)
|
public static long? GetMobileNumber(this Tenant tenant)
|
||||||
{
|
{
|
||||||
return tenant.GetProperty<long>(PlatformConsts.Tenants.MobileNumber);
|
return tenant.GetProperty<long?>(PlatformConsts.Tenants.MobileNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetFaxNumber(this Tenant tenant, long? faxNumber)
|
public static void SetFaxNumber(this Tenant tenant, long? faxNumber)
|
||||||
{
|
{
|
||||||
tenant.SetProperty(PlatformConsts.Tenants.FaxNumber, faxNumber);
|
tenant.SetProperty(PlatformConsts.Tenants.FaxNumber, faxNumber.HasValue ? faxNumber : null);
|
||||||
}
|
}
|
||||||
public static long GetFaxNumber(this Tenant tenant)
|
public static long? GetFaxNumber(this Tenant tenant)
|
||||||
{
|
{
|
||||||
return tenant.GetProperty<long>(PlatformConsts.Tenants.FaxNumber);
|
return tenant.GetProperty<long?>(PlatformConsts.Tenants.FaxNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetEmail(this Tenant tenant, string email)
|
public static void SetEmail(this Tenant tenant, string email)
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,11 @@ public class PlatformDbContext :
|
||||||
b.Property(a => a.UserId).IsRequired();
|
b.Property(a => a.UserId).IsRequired();
|
||||||
b.Property(a => a.BranchId).IsRequired();
|
b.Property(a => a.BranchId).IsRequired();
|
||||||
b.Property(a => a.TenantId);
|
b.Property(a => a.TenantId);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.UserBranches)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<GlobalSearch>(b =>
|
builder.Entity<GlobalSearch>(b =>
|
||||||
|
|
@ -964,6 +969,11 @@ public class PlatformDbContext :
|
||||||
.WithOne(x => x.Schedule)
|
.WithOne(x => x.Schedule)
|
||||||
.HasForeignKey(x => x.ScheduleId)
|
.HasForeignKey(x => x.ScheduleId)
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.Schedules)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<ScheduleLesson>(b =>
|
builder.Entity<ScheduleLesson>(b =>
|
||||||
|
|
@ -1005,6 +1015,11 @@ public class PlatformDbContext :
|
||||||
.WithOne(x => x.RegistrationType)
|
.WithOne(x => x.RegistrationType)
|
||||||
.HasForeignKey(x => x.RegistrationTypeId)
|
.HasForeignKey(x => x.RegistrationTypeId)
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.RegistrationTypes)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<RegistrationMethod>(b =>
|
builder.Entity<RegistrationMethod>(b =>
|
||||||
|
|
@ -1014,6 +1029,11 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(x => x.Name).HasMaxLength(50);
|
b.Property(x => x.Name).HasMaxLength(50);
|
||||||
b.Property(x => x.Status).HasMaxLength(10);
|
b.Property(x => x.Status).HasMaxLength(10);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.RegistrationMethods)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<ClassType>(b =>
|
builder.Entity<ClassType>(b =>
|
||||||
|
|
@ -1035,6 +1055,11 @@ public class PlatformDbContext :
|
||||||
.WithOne(x => x.ClassType)
|
.WithOne(x => x.ClassType)
|
||||||
.HasForeignKey(x => x.ClassTypeId)
|
.HasForeignKey(x => x.ClassTypeId)
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.ClassTypes)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Class>(b =>
|
builder.Entity<Class>(b =>
|
||||||
|
|
@ -1044,6 +1069,11 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(x => x.Name).IsRequired().HasMaxLength(64);
|
b.Property(x => x.Name).IsRequired().HasMaxLength(64);
|
||||||
b.Property(x => x.Status).HasMaxLength(20);
|
b.Property(x => x.Status).HasMaxLength(20);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.Classes)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Level>(b =>
|
builder.Entity<Level>(b =>
|
||||||
|
|
@ -1055,6 +1085,11 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.Name).HasMaxLength(50).IsRequired();
|
b.Property(x => x.Name).HasMaxLength(50).IsRequired();
|
||||||
b.Property(x => x.Status).HasMaxLength(10);
|
b.Property(x => x.Status).HasMaxLength(10);
|
||||||
b.Property(x => x.MonthlyPaymentRate).HasPrecision(18, 4);
|
b.Property(x => x.MonthlyPaymentRate).HasPrecision(18, 4);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.Levels)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Interesting>(b =>
|
builder.Entity<Interesting>(b =>
|
||||||
|
|
@ -1199,6 +1234,11 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.Lesson2).HasMaxLength(10);
|
b.Property(x => x.Lesson2).HasMaxLength(10);
|
||||||
b.Property(x => x.Lesson3).HasMaxLength(10);
|
b.Property(x => x.Lesson3).HasMaxLength(10);
|
||||||
b.Property(x => x.Lesson4).HasMaxLength(10);
|
b.Property(x => x.Lesson4).HasMaxLength(10);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.LessonPeriods)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<MeetingMethod>(b =>
|
builder.Entity<MeetingMethod>(b =>
|
||||||
|
|
@ -1277,6 +1317,11 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.Type).HasMaxLength(20);
|
b.Property(x => x.Type).HasMaxLength(20);
|
||||||
b.Property(x => x.TotalCalorie).HasPrecision(9, 2);
|
b.Property(x => x.TotalCalorie).HasPrecision(9, 2);
|
||||||
b.Property(x => x.Materials).HasMaxLength(500);
|
b.Property(x => x.Materials).HasMaxLength(500);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Branch)
|
||||||
|
.WithMany(x => x.Meals)
|
||||||
|
.HasForeignKey(x => x.BranchId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Document>(b =>
|
builder.Entity<Document>(b =>
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ public static class PlatformEfCoreEntityExtensionMappings
|
||||||
);
|
);
|
||||||
|
|
||||||
ObjectExtensionManager.Instance
|
ObjectExtensionManager.Instance
|
||||||
.MapEfCoreProperty<Tenant, long>(
|
.MapEfCoreProperty<Tenant, long?>(
|
||||||
PlatformConsts.Tenants.VknTckn,
|
PlatformConsts.Tenants.VknTckn,
|
||||||
(entityBuilder, propertyBuilder) =>
|
(entityBuilder, propertyBuilder) =>
|
||||||
{
|
{
|
||||||
|
|
@ -155,7 +155,7 @@ public static class PlatformEfCoreEntityExtensionMappings
|
||||||
);
|
);
|
||||||
|
|
||||||
ObjectExtensionManager.Instance
|
ObjectExtensionManager.Instance
|
||||||
.MapEfCoreProperty<Tenant, long>(
|
.MapEfCoreProperty<Tenant, long?>(
|
||||||
PlatformConsts.Tenants.PhoneNumber,
|
PlatformConsts.Tenants.PhoneNumber,
|
||||||
(entityBuilder, propertyBuilder) =>
|
(entityBuilder, propertyBuilder) =>
|
||||||
{
|
{
|
||||||
|
|
@ -164,7 +164,7 @@ public static class PlatformEfCoreEntityExtensionMappings
|
||||||
);
|
);
|
||||||
|
|
||||||
ObjectExtensionManager.Instance
|
ObjectExtensionManager.Instance
|
||||||
.MapEfCoreProperty<Tenant, long>(
|
.MapEfCoreProperty<Tenant, long?>(
|
||||||
PlatformConsts.Tenants.MobileNumber,
|
PlatformConsts.Tenants.MobileNumber,
|
||||||
(entityBuilder, propertyBuilder) =>
|
(entityBuilder, propertyBuilder) =>
|
||||||
{
|
{
|
||||||
|
|
@ -173,7 +173,7 @@ public static class PlatformEfCoreEntityExtensionMappings
|
||||||
);
|
);
|
||||||
|
|
||||||
ObjectExtensionManager.Instance
|
ObjectExtensionManager.Instance
|
||||||
.MapEfCoreProperty<Tenant, long>(
|
.MapEfCoreProperty<Tenant, long?>(
|
||||||
PlatformConsts.Tenants.FaxNumber,
|
PlatformConsts.Tenants.FaxNumber,
|
||||||
(entityBuilder, propertyBuilder) =>
|
(entityBuilder, propertyBuilder) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Kurs.Platform.Migrations
|
namespace Kurs.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251103202730_Initial")]
|
[Migration("20251104061839_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -12198,7 +12198,7 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)")
|
.HasColumnType("nvarchar(max)")
|
||||||
.HasColumnName("ExtraProperties");
|
.HasColumnName("ExtraProperties");
|
||||||
|
|
||||||
b.Property<long>("FaxNumber")
|
b.Property<long?>("FaxNumber")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Founder")
|
b.Property<string>("Founder")
|
||||||
|
|
@ -12227,7 +12227,7 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<long>("MobileNumber")
|
b.Property<long?>("MobileNumber")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
|
|
@ -12244,7 +12244,7 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<long>("PhoneNumber")
|
b.Property<long?>("PhoneNumber")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("PostalCode")
|
b.Property<string>("PostalCode")
|
||||||
|
|
@ -12259,7 +12259,7 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<long>("VknTckn")
|
b.Property<long?>("VknTckn")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Website")
|
b.Property<string>("Website")
|
||||||
|
|
@ -347,17 +347,17 @@ namespace Kurs.Platform.Migrations
|
||||||
Country = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
Country = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
District = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
District = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
FaxNumber = table.Column<long>(type: "bigint", nullable: false),
|
FaxNumber = table.Column<long>(type: "bigint", nullable: true),
|
||||||
Founder = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
Founder = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||||
MenuGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
MenuGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||||
MobileNumber = table.Column<long>(type: "bigint", nullable: false),
|
MobileNumber = table.Column<long>(type: "bigint", nullable: true),
|
||||||
OrganizationName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
OrganizationName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||||
PhoneNumber = table.Column<long>(type: "bigint", nullable: false),
|
PhoneNumber = table.Column<long>(type: "bigint", nullable: true),
|
||||||
PostalCode = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
|
PostalCode = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
|
||||||
Street = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
Street = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
TaxOffice = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
TaxOffice = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||||
VknTckn = table.Column<long>(type: "bigint", nullable: false),
|
VknTckn = table.Column<long>(type: "bigint", nullable: true),
|
||||||
Website = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
Website = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||||
|
|
@ -12195,7 +12195,7 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)")
|
.HasColumnType("nvarchar(max)")
|
||||||
.HasColumnName("ExtraProperties");
|
.HasColumnName("ExtraProperties");
|
||||||
|
|
||||||
b.Property<long>("FaxNumber")
|
b.Property<long?>("FaxNumber")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Founder")
|
b.Property<string>("Founder")
|
||||||
|
|
@ -12224,7 +12224,7 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<long>("MobileNumber")
|
b.Property<long?>("MobileNumber")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
|
|
@ -12241,7 +12241,7 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<long>("PhoneNumber")
|
b.Property<long?>("PhoneNumber")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("PostalCode")
|
b.Property<string>("PostalCode")
|
||||||
|
|
@ -12256,7 +12256,7 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<long>("VknTckn")
|
b.Property<long?>("VknTckn")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Website")
|
b.Property<string>("Website")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Button } from '@/components/ui'
|
import { Badge, Button } from '@/components/ui'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
import { Dialog, Notification, toast } from '@/components/ui'
|
import { Dialog, Notification, toast } from '@/components/ui'
|
||||||
import type { BranchSeedResultDto } from '@/proxy/branch/seed'
|
import type { BranchSeedResultDto } from '@/proxy/branch/seed'
|
||||||
|
|
@ -63,24 +63,27 @@ function BranchSeed({
|
||||||
<h5 className="mb-4 text-lg font-semibold">Branch Seed - {name}</h5>
|
<h5 className="mb-4 text-lg font-semibold">Branch Seed - {name}</h5>
|
||||||
<hr className="mb-3" />
|
<hr className="mb-3" />
|
||||||
|
|
||||||
{/* Başlat butonu */}
|
|
||||||
<div className="mb-4 flex justify-end">
|
|
||||||
<Button size='sm' variant="solid" onClick={handleRunSeed} loading={isLoading}>
|
|
||||||
{isLoading ? 'Seed Çalıştırılıyor...' : 'Seed İşlemini Başlat'}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Sonuç */}
|
|
||||||
{result && (
|
|
||||||
<div className="mt-3 space-y-4">
|
<div className="mt-3 space-y-4">
|
||||||
|
{/* Başlık ve buton aynı satırda */}
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
{result.success ? (
|
{result &&
|
||||||
|
(result.success ? (
|
||||||
<span className="text-green-600 font-semibold">✅ Seed İşlemi Başarılı</span>
|
<span className="text-green-600 font-semibold">✅ Seed İşlemi Başarılı</span>
|
||||||
) : (
|
) : (
|
||||||
<span className="text-red-600 font-semibold">❌ Seed İşlemi Başarısız</span>
|
<span className="text-red-600 font-semibold">❌ Seed İşlemi Başarısız</span>
|
||||||
)}
|
))}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Button size="xs" variant="solid" onClick={handleRunSeed} loading={isLoading}>
|
||||||
|
{isLoading ? 'Seed Çalıştırılıyor...' : 'Seed İşlemini Başlat'}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Sonuç Detayları */}
|
||||||
|
{result && (
|
||||||
|
<>
|
||||||
<p className="font-medium text-gray-700">{result.message}</p>
|
<p className="font-medium text-gray-700">{result.message}</p>
|
||||||
|
|
||||||
<p className="text-sm text-gray-600">
|
<p className="text-sm text-gray-600">
|
||||||
|
|
@ -90,7 +93,7 @@ function BranchSeed({
|
||||||
|
|
||||||
{/* Detay Tablosu */}
|
{/* Detay Tablosu */}
|
||||||
{result.details.length > 0 && (
|
{result.details.length > 0 && (
|
||||||
<div className="overflow-x-auto border border-gray-200 rounded-md">
|
<div className="overflow-x-auto overflow-y-auto border border-gray-200 rounded-md max-h-[50vh]">
|
||||||
<table className="min-w-full text-sm">
|
<table className="min-w-full text-sm">
|
||||||
<thead className="bg-gray-100 sticky top-0">
|
<thead className="bg-gray-100 sticky top-0">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -104,27 +107,19 @@ function BranchSeed({
|
||||||
{result.details.map((d) => (
|
{result.details.map((d) => (
|
||||||
<tr key={d.entityName} className="hover:bg-gray-50">
|
<tr key={d.entityName} className="hover:bg-gray-50">
|
||||||
<td className="border px-3 py-2 font-semibold text-gray-700">
|
<td className="border px-3 py-2 font-semibold text-gray-700">
|
||||||
{d.entityName}
|
<div className="flex items-center gap-2">
|
||||||
|
<span>{d.entityName}</span>
|
||||||
|
<Badge content={d.insertedCount} />
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{/* Eklenen kolonunu tek satır formatında göster */}
|
{/* Eklenen kolonunu tek satır formatında göster */}
|
||||||
<td className="border px-3 py-2">
|
<td className="border px-3 py-2">{d.insertedItems.join(', ')}</td>
|
||||||
{d.insertedCount > 0
|
|
||||||
? `${d.insertedCount} - { ${d.insertedItems.join(', ')} }`
|
|
||||||
: '—'}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td className="border px-3 py-2 text-yellow-700">
|
<td className="border px-3 py-2 text-yellow-700">
|
||||||
{d.warnings.length > 0
|
{d.warnings.join(', ')}
|
||||||
? `${d.warnings.length} - { ${d.warnings.join(', ')} }`
|
|
||||||
: '—'}
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td className="border px-3 py-2 text-red-700">
|
<td className="border px-3 py-2 text-red-700">{d.errors.join(', ')}</td>
|
||||||
{d.errors.length > 0
|
|
||||||
? `${d.errors.length} - { ${d.errors.join(', ')} }`
|
|
||||||
: '—'}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
@ -135,8 +130,9 @@ function BranchSeed({
|
||||||
{!result.details.length && (
|
{!result.details.length && (
|
||||||
<p className="text-gray-500 text-sm">Hiç detay bilgisi bulunamadı.</p>
|
<p className="text-gray-500 text-sm">Hiç detay bilgisi bulunamadı.</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Container>
|
</Container>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue