Demo Talebi
This commit is contained in:
parent
284d0d777c
commit
9f33c896b9
15 changed files with 7253 additions and 217 deletions
16
api/src/Kurs.Platform.Application.Contracts/Demo/DemoDto.cs
Normal file
16
api/src/Kurs.Platform.Application.Contracts/Demo/DemoDto.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Kurs.Platform.Demos;
|
||||
|
||||
public class DemoDto : FullAuditedEntityDto<Guid>
|
||||
{
|
||||
public string OrganizationName { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public string Address { get; set; }
|
||||
public int NumberOfBranches { get; set; }
|
||||
public int NumberOfUsers { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
|
|
@ -1,41 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Kurs.Platform.Data.Seeds;
|
||||
using Kurs.Platform.Entities;
|
||||
using Kurs.Sender.Mail;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
|
||||
namespace Kurs.Platform.Dashboard;
|
||||
|
||||
public class ContactFormDto
|
||||
{
|
||||
public string OrganizationName { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string NumberOfBranches { get; set; }
|
||||
public string NumberOfUsers { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
namespace Kurs.Platform.Demos;
|
||||
|
||||
public class DemoAppService : PlatformAppService
|
||||
{
|
||||
private readonly ISettingProvider settingProvider;
|
||||
private readonly IKursEmailSender emailSender;
|
||||
private readonly ISettingProvider _settingProvider;
|
||||
private readonly IKursEmailSender _emailSender;
|
||||
private readonly IRepository<Demo, Guid> _repository;
|
||||
|
||||
public DemoAppService(
|
||||
ISettingProvider settingProvider,
|
||||
IKursEmailSender emailSender
|
||||
)
|
||||
IKursEmailSender emailSender,
|
||||
IRepository<Demo, Guid> repository
|
||||
)
|
||||
{
|
||||
this.settingProvider = settingProvider;
|
||||
this.emailSender = emailSender;
|
||||
_settingProvider = settingProvider;
|
||||
_emailSender = emailSender;
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public async Task DemoFormAsync(ContactFormDto input)
|
||||
[AllowAnonymous]
|
||||
public async Task CreateDemoAsync(DemoDto input)
|
||||
{
|
||||
var demo = ObjectMapper.Map<DemoDto, Demo>(input);
|
||||
await _repository.InsertAsync(demo);
|
||||
|
||||
var bodyBuilder = new StringBuilder();
|
||||
bodyBuilder.AppendLine($"Şirket: {input.OrganizationName}");
|
||||
bodyBuilder.AppendLine($"Ad Soyad: {input.FullName}");
|
||||
|
|
@ -45,11 +43,11 @@ public class DemoAppService : PlatformAppService
|
|||
bodyBuilder.AppendLine($"Şube Sayısı: {input.NumberOfBranches}");
|
||||
bodyBuilder.AppendLine($"Kullanıcı Sayısı: {input.NumberOfUsers}");
|
||||
bodyBuilder.AppendLine($"Mesaj: {input.Message}");
|
||||
|
||||
var SenderName = await settingProvider.GetOrNullAsync(SeedConsts.AbpSettings.Mailing.Default.DefaultFromDisplayName);
|
||||
var SenderEmailAddress = await settingProvider.GetOrNullAsync(SeedConsts.AbpSettings.Mailing.Default.DefaultFromAddress);
|
||||
|
||||
await emailSender.QueueEmailAsync(
|
||||
var SenderName = await _settingProvider.GetOrNullAsync(SeedConsts.AbpSettings.Mailing.Default.DefaultFromDisplayName);
|
||||
var SenderEmailAddress = await _settingProvider.GetOrNullAsync(SeedConsts.AbpSettings.Mailing.Default.DefaultFromAddress);
|
||||
|
||||
await _emailSender.QueueEmailAsync(
|
||||
SenderEmailAddress,
|
||||
new KeyValuePair<string, string>(SenderName, SenderEmailAddress),
|
||||
null,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
using AutoMapper;
|
||||
using Kurs.Platform.Entities;
|
||||
|
||||
namespace Kurs.Platform.Demos;
|
||||
|
||||
public class DemoAutoMapperProfile : Profile
|
||||
{
|
||||
public DemoAutoMapperProfile()
|
||||
{
|
||||
CreateMap<Demo, DemoDto>().ReverseMap();
|
||||
}
|
||||
}
|
||||
|
|
@ -13576,6 +13576,310 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Demos
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Demo))
|
||||
{
|
||||
var listFormDemo = await _listFormRepository.InsertAsync(
|
||||
new ListForm
|
||||
{
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Demo,
|
||||
Name = AppCodes.Demos,
|
||||
Title = AppCodes.Demos,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = false,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Demos,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = SelectCommandByTableName("Demo"),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
|
||||
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||
SelectionJson = JsonSerializer.Serialize(new SelectionDto
|
||||
{
|
||||
Mode = GridOptions.SelectionModeSingle,
|
||||
AllowSelectAll = false
|
||||
}),
|
||||
ColumnOptionJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
ColumnFixingEnabled = true,
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
D = AppCodes.Demos + ".Delete",
|
||||
E = AppCodes.Demos + ".Export",
|
||||
I = AppCodes.Demos + ".Import"
|
||||
}),
|
||||
PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto
|
||||
{
|
||||
Visible = true,
|
||||
AllowedPageSizes = "10,20,50,100",
|
||||
ShowPageSizeSelector = true,
|
||||
ShowNavigationButtons = true,
|
||||
ShowInfo = false,
|
||||
InfoText = "Page {0} of {1} ({2} items)",
|
||||
DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive,
|
||||
ScrollingMode = GridColumnOptions.ScrollingModeStandard,
|
||||
LoadPanelEnabled = "auto",
|
||||
LoadPanelText = "Loading..."
|
||||
}),
|
||||
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||
{
|
||||
Popup = new GridEditingPopupDto
|
||||
{
|
||||
Title = "Demo Form",
|
||||
Width = 500,
|
||||
Height = 300
|
||||
},
|
||||
AllowDeleting = true,
|
||||
AllowAdding = true,
|
||||
AllowUpdating = true,
|
||||
SendOnlyChangedFormValuesUpdate = false
|
||||
}),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||
{
|
||||
new()
|
||||
{
|
||||
Order = 1,
|
||||
ColCount = 1,
|
||||
ColSpan = 2,
|
||||
ItemType = "group",
|
||||
Items =
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Id", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "OrganizationName", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "FullName", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 4, DataField = "Email", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Phone", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "Address", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 7, DataField = "NumberOfBranches", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "NumberOfUsers", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 9, DataField = "Message", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea },
|
||||
]
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
#region Report Categories Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||
{
|
||||
new ValidationRuleDto { Type = "required" }
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "OrganizationName",
|
||||
Width = 200,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||
{
|
||||
new ValidationRuleDto { Type = "required" }
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "FullName",
|
||||
Width = 150,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Email",
|
||||
Width = 150,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Phone",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Address",
|
||||
Width = 200,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "NumberOfBranches",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "NumberOfUsers",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormDemo.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Message",
|
||||
Width = 300,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10003,176 +10003,180 @@
|
|||
"en": "Loading component...",
|
||||
"tr": "Bileşen yükleniyor..."
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.remoteBranchTraining",
|
||||
"tr": "Uzaktan Şube Eğitimi (5 Saat)",
|
||||
"en": "Remote Branch Training (5 Hours)"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.remoteBranchTraining.desc",
|
||||
"tr": "Sistem kullanımı sırasında kullanıcı hataları ortaya çıkabilir, Sözsoft kullanıcı hatalarının giderilmesi yönünde destek hizmeti sunmaktadır.",
|
||||
"en": "During system usage, user errors may occur. Sözsoft provides support services to resolve user errors."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.branchHosting",
|
||||
"tr": "Şube Barındırma Hizmeti",
|
||||
"en": "Branch Hosting Service"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.branchHosting.desc",
|
||||
"tr": "Şube veya şubelerinize ait tüm bilgilerinizin veya resimlerinizin barındırıldığı alan kiralama hizmetidir.",
|
||||
"en": "A hosting service where all your branch-related information or images are stored."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms100k",
|
||||
"tr": "100,000 SMS SOFTWARE",
|
||||
"en": "100,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms100k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.teacherLicense",
|
||||
"tr": "Öğretmen Lisansı",
|
||||
"en": "Teacher License"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.teacherLicense.desc",
|
||||
"tr": "Şube/şubelerinizde sistemin kaç öğretmen tarafından kullandırılacağı kararına bağlı olarak belirlenir. Öğretmen lisansları aylık/yıllık kullanım olarak sunulmaktadır.",
|
||||
"en": "Determined by how many teachers in your branch/branches will use the system. Teacher licenses are offered monthly/annually."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.extraHourlyService",
|
||||
"tr": "Saatlik Ek Hizmet",
|
||||
"en": "Extra Hourly Service"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.extraHourlyService.desc",
|
||||
"tr": "Şubelerin standart hizmetlerin dışında istedikleri özel çalışmaları için belirlenen saatlik hizmet bedelidir.",
|
||||
"en": "Hourly service fee for special work requested outside the standard services of branches."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms50k",
|
||||
"tr": "50,000 SMS SOFTWARE",
|
||||
"en": "50,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms50k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms25k",
|
||||
"tr": "25,000 SMS SOFTWARE",
|
||||
"en": "25,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms25k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms10k",
|
||||
"tr": "10,000 SMS SOFTWARE",
|
||||
"en": "10,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms10k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms5k",
|
||||
"tr": "5,000 SMS SOFTWARE",
|
||||
"en": "5,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms5k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.smsBlocking",
|
||||
"tr": "SMS Engelleme Hizmeti",
|
||||
"en": "SMS Blocking Service"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.smsBlocking.desc",
|
||||
"tr": "Şube/şubelerinizden gönderilen SMS'lerin kursiyerler tarafından engelleme hizmetidir.",
|
||||
"en": "A service that allows recipients to block SMS messages sent from your branch/branches."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.backupService",
|
||||
"tr": "Veri Yedekleme Hizmeti",
|
||||
"en": "Data Backup Service"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.backupService.desc",
|
||||
"tr": "Bilgileriniz bizler için de önemlidir. Bu doğrultuda aldığımız yüksek güvenlik önlemlerinin yanısıra BACK-UP/ yedekleme hizmeti sunmaktayız.",
|
||||
"en": "Your data is also important to us. In addition to our high security measures, we provide a BACK-UP/backup service."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.userLicense",
|
||||
"tr": "Kullanıcı Lisansı",
|
||||
"en": "User License"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.userLicense.desc",
|
||||
"tr": "Şube/şubelerinizde sistemin kaç personel tarafından kullandırılacağı kararına bağlı olarak belirlenir. Kullanıcı lisansları aylık/yıllık kullanım olarak sunulmaktadır.",
|
||||
"en": "Determined by how many personnel in your branch/branches will use the system. User licenses are offered monthly/annually."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.remoteSupportContract",
|
||||
"tr": "Şube Uzaktan Destek Sözleşmesi",
|
||||
"en": "Branch Remote Support Contract"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.remoteSupportContract.desc",
|
||||
"tr": "Kullanıcıların/Şubelerin talebi doğrultusunda imzalanan servis sözleşmesi ile Sözsoft kapsamı ve detayı sözleşmelerimizde yer alan iş birliği hizmeti sağlamaktadır.",
|
||||
"en": "With a service contract signed upon user/branch request, Sözsoft provides cooperation services as detailed in our agreements."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.mobileReporting",
|
||||
"tr": "Mobil Raporlama Arayüzü",
|
||||
"en": "Mobile Reporting Interface"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.mobileReporting.desc",
|
||||
"tr": "kursyazilimi.com mobil arayüzü ile şubeler bazında akıllı telefon teknolojisi ile yönetim imkanı sağlamaktadır.",
|
||||
"en": "With kursyazilimi.com’s mobile interface, management is possible per branch using smartphone technology."
|
||||
}
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.remoteBranchTraining",
|
||||
"tr": "Uzaktan Şube Eğitimi (5 Saat)",
|
||||
"en": "Remote Branch Training (5 Hours)"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.remoteBranchTraining.desc",
|
||||
"tr": "Sistem kullanımı sırasında kullanıcı hataları ortaya çıkabilir, Sözsoft kullanıcı hatalarının giderilmesi yönünde destek hizmeti sunmaktadır.",
|
||||
"en": "During system usage, user errors may occur. Sözsoft provides support services to resolve user errors."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.branchHosting",
|
||||
"tr": "Şube Barındırma Hizmeti",
|
||||
"en": "Branch Hosting Service"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.branchHosting.desc",
|
||||
"tr": "Şube veya şubelerinize ait tüm bilgilerinizin veya resimlerinizin barındırıldığı alan kiralama hizmetidir.",
|
||||
"en": "A hosting service where all your branch-related information or images are stored."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms100k",
|
||||
"tr": "100,000 SMS SOFTWARE",
|
||||
"en": "100,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms100k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.teacherLicense",
|
||||
"tr": "Öğretmen Lisansı",
|
||||
"en": "Teacher License"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.teacherLicense.desc",
|
||||
"tr": "Şube/şubelerinizde sistemin kaç öğretmen tarafından kullandırılacağı kararına bağlı olarak belirlenir. Öğretmen lisansları aylık/yıllık kullanım olarak sunulmaktadır.",
|
||||
"en": "Determined by how many teachers in your branch/branches will use the system. Teacher licenses are offered monthly/annually."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.extraHourlyService",
|
||||
"tr": "Saatlik Ek Hizmet",
|
||||
"en": "Extra Hourly Service"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.extraHourlyService.desc",
|
||||
"tr": "Şubelerin standart hizmetlerin dışında istedikleri özel çalışmaları için belirlenen saatlik hizmet bedelidir.",
|
||||
"en": "Hourly service fee for special work requested outside the standard services of branches."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms50k",
|
||||
"tr": "50,000 SMS SOFTWARE",
|
||||
"en": "50,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms50k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms25k",
|
||||
"tr": "25,000 SMS SOFTWARE",
|
||||
"en": "25,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms25k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms10k",
|
||||
"tr": "10,000 SMS SOFTWARE",
|
||||
"en": "10,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms10k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms5k",
|
||||
"tr": "5,000 SMS SOFTWARE",
|
||||
"en": "5,000 SMS SOFTWARE"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.sms5k.desc",
|
||||
"tr": "http://www.smsyukle.com adresinden yüklenebilir. İhtiyacınız olan SMS adedini belirleyerek, SMS satın almak için lütfen SMS yükle linkine tıklayın veya bize ulaşın.",
|
||||
"en": "Available at http://www.smsyukle.com. Select the number of SMS you need and click the SMS load link or contact us to purchase."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.smsBlocking",
|
||||
"tr": "SMS Engelleme Hizmeti",
|
||||
"en": "SMS Blocking Service"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.smsBlocking.desc",
|
||||
"tr": "Şube/şubelerinizden gönderilen SMS'lerin kursiyerler tarafından engelleme hizmetidir.",
|
||||
"en": "A service that allows recipients to block SMS messages sent from your branch/branches."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.backupService",
|
||||
"tr": "Veri Yedekleme Hizmeti",
|
||||
"en": "Data Backup Service"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.backupService.desc",
|
||||
"tr": "Bilgileriniz bizler için de önemlidir. Bu doğrultuda aldığımız yüksek güvenlik önlemlerinin yanısıra BACK-UP/ yedekleme hizmeti sunmaktayız.",
|
||||
"en": "Your data is also important to us. In addition to our high security measures, we provide a BACK-UP/backup service."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.userLicense",
|
||||
"tr": "Kullanıcı Lisansı",
|
||||
"en": "User License"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.userLicense.desc",
|
||||
"tr": "Şube/şubelerinizde sistemin kaç personel tarafından kullandırılacağı kararına bağlı olarak belirlenir. Kullanıcı lisansları aylık/yıllık kullanım olarak sunulmaktadır.",
|
||||
"en": "Determined by how many personnel in your branch/branches will use the system. User licenses are offered monthly/annually."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.remoteSupportContract",
|
||||
"tr": "Şube Uzaktan Destek Sözleşmesi",
|
||||
"en": "Branch Remote Support Contract"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.remoteSupportContract.desc",
|
||||
"tr": "Kullanıcıların/Şubelerin talebi doğrultusunda imzalanan servis sözleşmesi ile Sözsoft kapsamı ve detayı sözleşmelerimizde yer alan iş birliği hizmeti sağlamaktadır.",
|
||||
"en": "With a service contract signed upon user/branch request, Sözsoft provides cooperation services as detailed in our agreements."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.mobileReporting",
|
||||
"tr": "Mobil Raporlama Arayüzü",
|
||||
"en": "Mobile Reporting Interface"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.mobileReporting.desc",
|
||||
"tr": "kursyazilimi.com mobil arayüzü ile şubeler bazında akıllı telefon teknolojisi ile yönetim imkanı sağlamaktadır.",
|
||||
"en": "With kursyazilimi.com’s mobile interface, management is possible per branch using smartphone technology."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Demos",
|
||||
"tr": "Demolar",
|
||||
"en": "Demos"
|
||||
}
|
||||
],
|
||||
"Settings": [
|
||||
{
|
||||
|
|
@ -12077,6 +12081,16 @@
|
|||
"Icon": "FcCollect",
|
||||
"RequiredPermissionName": "App.Orders.PurchaseOrders",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Demos",
|
||||
"DisplayName": "App.Demos",
|
||||
"Order": 16,
|
||||
"Url": "/admin/list/list-demo",
|
||||
"Icon": "FcMissedCall",
|
||||
"RequiredPermissionName": "App.Demos",
|
||||
"IsDisabled": false
|
||||
}
|
||||
],
|
||||
"PermissionGroupDefinitionRecords": [
|
||||
|
|
@ -12163,6 +12177,10 @@
|
|||
{
|
||||
"Name": "App.Orders",
|
||||
"DisplayName": "App.Orders"
|
||||
},
|
||||
{
|
||||
"Name": "App.Demos",
|
||||
"DisplayName": "App.Demos"
|
||||
}
|
||||
],
|
||||
"PermissionDefinitionRecords": [
|
||||
|
|
@ -14477,6 +14495,54 @@
|
|||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Demos",
|
||||
"Name": "App.Demos",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Demos",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Demos",
|
||||
"Name": "App.Demos.Create",
|
||||
"ParentName": "App.Demos",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Demos",
|
||||
"Name": "App.Demos.Update",
|
||||
"ParentName": "App.Demos",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Demos",
|
||||
"Name": "App.Demos.Delete",
|
||||
"ParentName": "App.Demos",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Demos",
|
||||
"Name": "App.Demos.Export",
|
||||
"ParentName": "App.Demos",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Demos",
|
||||
"Name": "App.Demos.Import",
|
||||
"ParentName": "App.Demos",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
}
|
||||
],
|
||||
"Sectors": [
|
||||
|
|
|
|||
|
|
@ -368,6 +368,7 @@ public static class PlatformConsts
|
|||
public const string InstallmentOption = "list-installmentoption";
|
||||
public const string PurchaseOrder = "list-purchaseorder";
|
||||
public const string ReportCategory = "list-reportcategory";
|
||||
public const string Demo = "list-demo";
|
||||
}
|
||||
|
||||
public static class Forms
|
||||
|
|
|
|||
|
|
@ -400,6 +400,8 @@ public static class SeedConsts
|
|||
public const string Default = Prefix.App + ".Reports";
|
||||
public const string Categories = Default + ".Categories";
|
||||
}
|
||||
|
||||
public const string Demos = Prefix.App + ".Demos";
|
||||
}
|
||||
|
||||
public static class DataSources
|
||||
|
|
|
|||
23
api/src/Kurs.Platform.Domain/Entities/Demo.cs
Normal file
23
api/src/Kurs.Platform.Domain/Entities/Demo.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class Demo : FullAuditedEntity<Guid>
|
||||
{
|
||||
[Required]
|
||||
public string OrganizationName { get; set; }
|
||||
[Required]
|
||||
public string FullName { get; set; }
|
||||
[Required]
|
||||
public string Email { get; set; }
|
||||
[Required]
|
||||
public string Phone { get; set; }
|
||||
[Required]
|
||||
public string Address { get; set; }
|
||||
public int NumberOfBranches { get; set; }
|
||||
public int NumberOfUsers { get; set; }
|
||||
[Required]
|
||||
public string Message { get; set; }
|
||||
}
|
||||
|
|
@ -89,6 +89,7 @@ public class PlatformDbContext :
|
|||
public DbSet<ReportParameter> ReportParameters { get; set; }
|
||||
public DbSet<ReportGenerated> ReportGenerated { get; set; }
|
||||
public DbSet<ReportCategory> ReportCategories { get; set; }
|
||||
public DbSet<Demo> Demos { get; set; }
|
||||
|
||||
#region Entities from the modules
|
||||
|
||||
|
|
@ -765,5 +766,20 @@ public class PlatformDbContext :
|
|||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.IsRequired(false);
|
||||
});
|
||||
|
||||
builder.Entity<Demo>(b =>
|
||||
{
|
||||
b.ToTable(PlatformConsts.DbTablePrefix + nameof(Demo), PlatformConsts.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.OrganizationName).IsRequired(true).HasMaxLength(256);
|
||||
b.Property(x => x.FullName).IsRequired().HasMaxLength(256);
|
||||
b.Property(x => x.Email).IsRequired().HasMaxLength(256);
|
||||
b.Property(x => x.Phone).IsRequired().HasMaxLength(20);
|
||||
b.Property(x => x.Address).IsRequired().HasMaxLength(512);
|
||||
b.Property(x => x.NumberOfBranches).IsRequired();
|
||||
b.Property(x => x.NumberOfUsers).IsRequired();
|
||||
b.Property(x => x.Message).IsRequired().HasMaxLength(2000);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6468
api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250817192506_Demo.Designer.cs
generated
Normal file
6468
api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250817192506_Demo.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Demo : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PDemo",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
OrganizationName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
FullName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Phone = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
NumberOfBranches = table.Column<int>(type: "int", nullable: false),
|
||||
NumberOfUsers = table.Column<int>(type: "int", nullable: false),
|
||||
Message = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PDemo", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PDemo");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2036,6 +2036,78 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("PDataSource", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Demo", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("NumberOfBranches")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumberOfUsers")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrganizationName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<string>("Phone")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PDemo", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.GlobalSearch", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
|
|
|
|||
11
ui/src/proxy/demo/models.ts
Normal file
11
ui/src/proxy/demo/models.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export interface DemoDto {
|
||||
id: string; // Guid karşılığı string
|
||||
organizationName: string;
|
||||
fullName: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
address: string;
|
||||
numberOfBranches: number;
|
||||
numberOfUsers: number;
|
||||
message: string;
|
||||
}
|
||||
9
ui/src/services/demo.service.ts
Normal file
9
ui/src/services/demo.service.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { DemoDto } from '@/proxy/demo/models'
|
||||
import apiService from './api.service'
|
||||
|
||||
export const createDemoAsync = (input: DemoDto) =>
|
||||
apiService.fetchData<DemoDto>({
|
||||
method: 'POST',
|
||||
url: `/api/app/demo/demo`,
|
||||
data: input as any,
|
||||
})
|
||||
|
|
@ -11,38 +11,31 @@ import {
|
|||
FaCheckCircle
|
||||
} from 'react-icons/fa';
|
||||
import { useLocalization } from "@/utils/hooks/useLocalization";
|
||||
import { createDemoAsync } from "@/services/demo.service";
|
||||
import { DemoDto } from "@/proxy/demo/models";
|
||||
|
||||
interface DemoModalProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
interface FormData {
|
||||
organizationName: string;
|
||||
fullName: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
address: string;
|
||||
numberOfBranches: string;
|
||||
numberOfUsers: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
const Demo: React.FC<DemoModalProps> = ({ isOpen, onClose }) => {
|
||||
const { translate } = useLocalization()
|
||||
|
||||
const [formData, setFormData] = useState<FormData>({
|
||||
const [formData, setFormData] = useState<DemoDto>({
|
||||
id: crypto.randomUUID(),
|
||||
organizationName: "",
|
||||
fullName: "",
|
||||
email: "",
|
||||
phone: "",
|
||||
address: "",
|
||||
numberOfBranches: "",
|
||||
numberOfUsers: "",
|
||||
numberOfBranches: 0,
|
||||
numberOfUsers: 0,
|
||||
message: "",
|
||||
});
|
||||
|
||||
const [errors, setErrors] = useState<Partial<FormData>>({});
|
||||
const [errors, setErrors] = useState<Partial<DemoDto>>({});
|
||||
const [isSubmitted, setIsSubmitted] = useState(false);
|
||||
|
||||
const handleInputChange = (
|
||||
|
|
@ -54,7 +47,7 @@ const Demo: React.FC<DemoModalProps> = ({ isOpen, onClose }) => {
|
|||
[name]: value,
|
||||
}));
|
||||
|
||||
if (errors[name as keyof FormData]) {
|
||||
if (errors[name as keyof DemoDto]) {
|
||||
setErrors((prev) => ({
|
||||
...prev,
|
||||
[name]: "",
|
||||
|
|
@ -63,7 +56,7 @@ const Demo: React.FC<DemoModalProps> = ({ isOpen, onClose }) => {
|
|||
};
|
||||
|
||||
const validateForm = (): boolean => {
|
||||
const newErrors: Partial<FormData> = {};
|
||||
const newErrors: Partial<DemoDto> = {};
|
||||
|
||||
if (!formData.organizationName.trim())
|
||||
newErrors.organizationName = "Organization name is required";
|
||||
|
|
@ -75,10 +68,6 @@ const Demo: React.FC<DemoModalProps> = ({ isOpen, onClose }) => {
|
|||
}
|
||||
if (!formData.phone.trim()) newErrors.phone = "Phone number is required";
|
||||
if (!formData.address.trim()) newErrors.address = "Address is required";
|
||||
if (!formData.numberOfBranches.trim())
|
||||
newErrors.numberOfBranches = "Number of branches is required";
|
||||
if (!formData.numberOfUsers.trim())
|
||||
newErrors.numberOfUsers = "Number of users is required";
|
||||
if (!formData.message.trim()) newErrors.message = "Message is required";
|
||||
|
||||
setErrors(newErrors);
|
||||
|
|
@ -91,7 +80,7 @@ const Demo: React.FC<DemoModalProps> = ({ isOpen, onClose }) => {
|
|||
if (!validateForm()) return;
|
||||
|
||||
try {
|
||||
//await demoService.createDemoForm(formData);
|
||||
await createDemoAsync(formData);
|
||||
setIsSubmitted(true);
|
||||
onClose(); // modal'ı otomatik kapat
|
||||
} catch (error) {
|
||||
|
|
@ -144,13 +133,14 @@ const Demo: React.FC<DemoModalProps> = ({ isOpen, onClose }) => {
|
|||
onClick={() => {
|
||||
setIsSubmitted(false);
|
||||
setFormData({
|
||||
id: crypto.randomUUID(),
|
||||
organizationName: "",
|
||||
fullName: "",
|
||||
email: "",
|
||||
phone: "",
|
||||
address: "",
|
||||
numberOfBranches: "",
|
||||
numberOfUsers: "",
|
||||
numberOfBranches: 0,
|
||||
numberOfUsers: 0,
|
||||
message: "",
|
||||
});
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue