This commit is contained in:
dineshkumarkannan 2018-08-30 11:28:00 +05:30
commit 8510bcabf0
2 changed files with 79 additions and 9 deletions

View File

@ -145,9 +145,46 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
}
}
/*upload model*/
$scope.uploadModel = {
university: "",
uploadFor: "",
}
/*
* upload options json
* */
$scope.uploadOptions=[{
id: 1,
name: 'Received Enrolment From University',
},
{
id: 2,
name: 'Received Fees From University'
},
];
/*
watch upload model for enable upload options
*/
$scope.showFile="0";
$scope.$watchCollection('uploadModel', function (newValue,oldValue) {
if(newValue.university!='' && newValue.university!=null && newValue.uploadFor!='' && newValue.uploadFor=='1'){
$scope.showFile="1";
}
else if(newValue.university!='' && newValue.university!=null && newValue.uploadFor!='' && newValue.uploadFor=='2'){
$scope.showFile="2";
}
else{
$scope.showFile="0";
}
});
/* update received enrolment from university
* created by kms
* */
$scope.extractDetails="";
$scope.readXlsxDetails = function (workbook) {
$scope.extractDetails="";
/* DO SOMETHING WITH workbook HERE */
@ -165,7 +202,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
}
$scope.receiveEnrolmentDetails = function (details) {
$scope.receiveEnrolmentDetails = function (details,uploadForDetails) {
var updateUniversityEnrolment = {
method: 'POST',
@ -175,7 +212,10 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
},
data: {
localDetails: localDetail,
details: details
details: details,
universityID: uploadForDetails.UniversityID,
universityName: uploadForDetails.UniversityName,
}
};
@ -189,7 +229,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
}
// end
$scope.extractFormIDDetails="";
$scope.readXlsxFormDetails = function (workbook) {
$scope.extractFormIDDetails="";
/* DO SOMETHING WITH workbook HERE */

View File

@ -138,15 +138,45 @@
</tab>
<tab tabindex="2" active="tabactive2" ng-click="tabActive('tabactive2')" heading="Upload Files" id="uploadFiles">
<div class="container-fluid">
<js-xls onread="readXlsxDetails" onerror="error"></js-xls>
<button type="button" class="btn btn-success btn-o" ng-click="receiveEnrolmentDetails(extractDetails)"> Submit</button>
<div class="row">
<div class="col-md-4 form-group">
<label>
University <span class="symbol required"></span>
</label>
<select class="form-control" tabindex="1" name="formUniversity" ng-model="uploadModel.university" required>
<option value="" selected>Select University</option>
<option ng-repeat="univ in universitySearchData" value="{{univ}}">{{univ.UniversityName}}</option>
</select>
</div>
<div class="col-md-4 form-group">
<label>
Upload For <span class="symbol required"></span>
</label>
<select class="form-control" name="uploadFor" tabindex="2" id="uploadFor"
ng-model="uploadModel.uploadFor"
ng-options="upload.id as upload.name for upload in uploadOptions"
required>
<option value=""> Select</option>
</select>
</div>
<div class="container-fluid">
<js-xls onread="readXlsxFormDetails" onerror="error"></js-xls>
<button type="button" class="btn btn-success btn-o" ng-click="receiveFormIdFeeDetails(extractFormIDDetails)"> Submit</button>
</div>
<div class="col-md-3 form-group" ng-if="showFile=='1'">
<fieldset>
<js-xls onread="readXlsxDetails" onerror="error"></js-xls>
<button type="button" class="btn btn-success btn-o" style="float: right" ng-click="receiveEnrolmentDetails(extractDetails,uploadModel)" ng-disabled="extractDetails==''"> Submit</button>
</fieldset>
</div>
<div class="col-md-3 form-group" ng-if="showFile=='2'">
<fieldset>
<js-xls onread="readXlsxFormDetails" onerror="error"></js-xls>
<button type="button" class="btn btn-success btn-o" style="float: right" ng-click="receiveFormIdFeeDetails(extractFormIDDetails)" ng-disabled="extractFormIDDetails==''"> Submit</button>
</fieldset>
</div>
</div>
</div>
</tab>
</tabset>