Skip to content

Commit cd0391a

Browse files
authored
Merge pull request #74 from Gid733/master
Added update for all cases & SDK update
2 parents 9b28e6b + c391226 commit cd0391a

File tree

7 files changed

+28
-11
lines changed

7 files changed

+28
-11
lines changed

eFormAPI/eFormAPI.Common/eFormAPI.Common.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@
7474
<HintPath>..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
7575
<Private>True</Private>
7676
</Reference>
77-
<Reference Include="Microting.eForm, Version=2.1.76.0, Culture=neutral, processorArchitecture=AMD64">
77+
<Reference Include="Microting.eForm, Version=2.1.76.0, Culture=neutral, PublicKeyToken=null">
7878
<HintPath>..\packages\Microting.eForm.2.1.76\lib\net45\Microting.eForm.dll</HintPath>
7979
</Reference>
80-
<Reference Include="MySql.Data, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
80+
<Reference Include="MySql.Data, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
8181
<HintPath>..\packages\MySql.Data.6.9.11\lib\net45\MySql.Data.dll</HintPath>
8282
</Reference>
83-
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
83+
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
8484
<HintPath>..\packages\MySql.Data.Entity.6.9.11\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
8585
</Reference>
8686
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">

eFormAPI/eFormAPI/Controllers/CasesController.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ public OperationResult Update(ReplyRequest model)
8989
try
9090
{
9191
core.CaseUpdate(model.Id, fieldValueList, checkListValueList);
92+
var allCases = core.CaseReadAll(model.Id, null, null);
93+
foreach (var caseObject in allCases) {
94+
core.CaseUpdateFieldValues(caseObject.Id);
95+
}
9296
return new OperationResult(true, "Case has been updated");
9397
}
9498
catch (Exception)

eFormAPI/eFormAPI/eFormAPI.Web.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@
127127
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
128128
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
129129
</Reference>
130-
<Reference Include="Microting.eForm, Version=2.1.76.0, Culture=neutral, processorArchitecture=AMD64">
130+
<Reference Include="Microting.eForm, Version=2.1.76.0, Culture=neutral, PublicKeyToken=null">
131131
<HintPath>..\packages\Microting.eForm.2.1.76\lib\net45\Microting.eForm.dll</HintPath>
132132
</Reference>
133-
<Reference Include="MySql.Data, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
133+
<Reference Include="MySql.Data, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
134134
<HintPath>..\packages\MySql.Data.6.9.11\lib\net45\MySql.Data.dll</HintPath>
135135
</Reference>
136-
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
136+
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
137137
<HintPath>..\packages\MySql.Data.Entity.6.9.11\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
138138
</Reference>
139139
<Reference Include="Newtonsoft.Json">

eFormAPI/eFormAPI/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
<package id="Microsoft.Owin.Security.Cookies" version="3.1.0" targetFramework="net46" />
3939
<package id="Microsoft.Owin.Security.OAuth" version="3.1.0" targetFramework="net46" />
4040
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net46" />
41-
<package id="Microting.eForm" version="2.1.76" targetFramework="net461" />
41+
<package id="Microting.eForm" version="2.1.76" targetFramework="net46" />
4242
<package id="Modernizr" version="2.8.3" targetFramework="net46" />
43-
<package id="MySql.Data" version="6.9.11" targetFramework="net461" />
44-
<package id="MySql.Data.Entity" version="6.9.11" targetFramework="net461" />
43+
<package id="MySql.Data" version="6.9.11" targetFramework="net46" />
44+
<package id="MySql.Data.Entity" version="6.9.11" targetFramework="net46" />
4545
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" />
4646
<package id="NLog" version="4.4.11" targetFramework="net46" />
4747
<package id="NLog.Config" version="4.4.11" targetFramework="net46" />
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.m-t-1 {
2+
margin-top: 10px;
3+
}

eform-client/src/app/modules/cases/components/cases-edit/cases-edit.component.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ <h1 class="page-title header-page-title">
3333
</li>
3434
<br>
3535
<li class="text-center">
36-
<button class="btn btn-ar btn-danger" (click)="gem()" id="submit_form">Save</button>
36+
<button class="btn btn-ar btn-danger" [disabled]="isFormLocked" (click)="gem()" id="submit_form">
37+
Save <i *ngIf="isFormLocked" class="fa fa-spinner fa-spin"></i>
38+
</button>
39+
</li>
40+
<li class="text-center m-t-1" *ngIf="isFormLocked">
41+
<p>Updating cases, please wait...</p>
3742
</li>
3843
</ul>
3944
</div>

eform-client/src/app/modules/cases/components/cases-edit/cases-edit.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ import {EFormService} from 'app/services';
88

99
@Component({
1010
selector: 'app-cases-edit',
11-
templateUrl: './cases-edit.component.html'
11+
templateUrl: './cases-edit.component.html',
12+
styleUrls: ['./cases-edit.component.css']
1213
})
1314
export class CasesEditComponent implements OnInit {
1415
@ViewChildren(CaseEditElementComponent) editElements: QueryList<CaseEditElementComponent>;
1516
id: number;
1617
templateId: number;
18+
isFormLocked = false;
1719
currentTemplate: TemplateDto = new TemplateDto;
1820
replyElement: ReplyElement = new ReplyElement();
1921
// REQUEST
@@ -36,6 +38,7 @@ export class CasesEditComponent implements OnInit {
3638
}
3739

3840
gem() {
41+
this.isFormLocked = true;
3942
this.requestModels = [];
4043
this.editElements.forEach(x => {
4144
x.extractData();
@@ -47,9 +50,11 @@ export class CasesEditComponent implements OnInit {
4750
this.casesService.updateCase(this.replyRequest).subscribe(operation => {
4851
if (operation && operation.success) {
4952
this.replyElement = new ReplyElement();
53+
this.isFormLocked = false;
5054
this.router.navigate(['/cases/', this.currentTemplate.id]).then();
5155
this.notifyService.success({text: operation.message});
5256
} else {
57+
this.isFormLocked = false;
5358
this.notifyService.error({text: operation.message || 'Error'});
5459
}
5560
});

0 commit comments

Comments
 (0)