|
@@ -1568,7 +1568,7 @@ namespace TEAMModelOS.Controllers
|
|
keys.AddRange(emails);
|
|
keys.AddRange(emails);
|
|
}
|
|
}
|
|
|
|
|
|
- teachers.ForEach(x => { x.status = "import";x.time = now; });
|
|
|
|
|
|
+ teachers.ForEach(x => { x.status = "import";x.time = now;x.iname = x.name;x.name = null; });
|
|
if (keys.Any()) {
|
|
if (keys.Any()) {
|
|
try
|
|
try
|
|
{
|
|
{
|
|
@@ -1603,7 +1603,7 @@ namespace TEAMModelOS.Controllers
|
|
if (coreUser != null)
|
|
if (coreUser != null)
|
|
{
|
|
{
|
|
t.id = coreUser.id;
|
|
t.id = coreUser.id;
|
|
- t.cname = coreUser.name;
|
|
|
|
|
|
+ t.name = coreUser.name;
|
|
t.picture=coreUser.picture;
|
|
t.picture=coreUser.picture;
|
|
t.tmdid=coreUser.id;
|
|
t.tmdid=coreUser.id;
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile)) {
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile)) {
|
|
@@ -1623,7 +1623,7 @@ namespace TEAMModelOS.Controllers
|
|
if (coreUser != null)
|
|
if (coreUser != null)
|
|
{
|
|
{
|
|
t.id = coreUser.id;
|
|
t.id = coreUser.id;
|
|
- t.cname = coreUser.name;
|
|
|
|
|
|
+ t.name = coreUser.name;
|
|
t.picture = coreUser.picture;
|
|
t.picture = coreUser.picture;
|
|
t.tmdid = coreUser.id;
|
|
t.tmdid = coreUser.id;
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
@@ -1645,7 +1645,7 @@ namespace TEAMModelOS.Controllers
|
|
if (coreUser != null)
|
|
if (coreUser != null)
|
|
{
|
|
{
|
|
t.id = coreUser.id;
|
|
t.id = coreUser.id;
|
|
- t.cname = coreUser.name;
|
|
|
|
|
|
+ t.name = coreUser.name;
|
|
t.picture = coreUser.picture;
|
|
t.picture = coreUser.picture;
|
|
t.tmdid = coreUser.id;
|
|
t.tmdid = coreUser.id;
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
@@ -1670,7 +1670,7 @@ namespace TEAMModelOS.Controllers
|
|
t.status = "invite";
|
|
t.status = "invite";
|
|
teacher = new SchoolTeacher {
|
|
teacher = new SchoolTeacher {
|
|
id = t.id,
|
|
id = t.id,
|
|
- name = t.cname,
|
|
|
|
|
|
+ name = t.name,
|
|
permissions = new List<string>(),
|
|
permissions = new List<string>(),
|
|
picture = t.picture,
|
|
picture = t.picture,
|
|
job = null,
|
|
job = null,
|
|
@@ -1700,7 +1700,7 @@ namespace TEAMModelOS.Controllers
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReplaceItemAsync(teacherBase, teacherBase.id, new PartitionKey("Base"));
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReplaceItemAsync(teacherBase, teacherBase.id, new PartitionKey("Base"));
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- Teacher teacherBase = new Teacher { id = t.id, name = t.cname, picture = t.picture, size = 2,code="Base",pk="Base", schools = new List<TeacherSchool> {
|
|
|
|
|
|
+ Teacher teacherBase = new Teacher { id = t.id, name = t.name, picture = t.picture, size = 2,code="Base",pk="Base", schools = new List<TeacherSchool> {
|
|
new TeacherSchool {schoolId= schoolBase.id,name= schoolBase.name,picture= schoolBase.picture, areaId= schoolBase.areaId,time=now,status= "invite" },
|
|
new TeacherSchool {schoolId= schoolBase.id,name= schoolBase.name,picture= schoolBase.picture, areaId= schoolBase.areaId,time=now,status= "invite" },
|
|
} };
|
|
} };
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).CreateItemAsync(teacherBase, new PartitionKey("Base"));
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).CreateItemAsync(teacherBase, new PartitionKey("Base"));
|