Skip to content

Commit

Permalink
angualrjs version upgrade issue resovled
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbiryan committed Sep 6, 2023
1 parent 91c3acb commit 31dcde4
Show file tree
Hide file tree
Showing 15 changed files with 194 additions and 286 deletions.
2 changes: 1 addition & 1 deletion Source/App/Client/app/scripts/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ angular.module("dentalApp", ["ui.router", "ngGrid", "ui.bootstrap", "checklist-m
function ($urlRouterProvider, $stateProvider, $httpProvider, $qProvider) {
"use strict";

$qProvider.errorOnUnhandledRejections(false);
//$qProvider.errorOnUnhandledRejections(false);

$httpProvider.interceptors.push('tokenInterceptor');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$http.get(urlService.ProductUrl + "/GetProductsIncludeStatus").then(
function (response) {
console.log(response);
$scope.products = response;
$scope.products = response.data;
$scope.myData = $scope.products;
}, function (error) {
console.log(error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
$http.post(urlService.AppointmentUrl + "/Create", JSON.stringify($scope.appointment)).then(function(response) {
console.log(response);
$scope.filter.DateKey = $scope.appointment.Date;
$scope.loadAppointmentsByDate();
$scope.init();
init();
$scope.loadAppointmentsByDate();
}, function(error) {
console.log(error);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
];

$scope.pageName = 'new-patient';


$scope.medicalServices = [];
};
$scope.init();

Expand All @@ -28,13 +31,12 @@
};


$scope.medicalServices = [];
$scope.getMedicalServices = function () {
$scope.medicalServices = [];

$http.get(urlService.MedicalServiceUrl + "/GetAllOrderByName").then(
function (response) {
console.log(response);
$scope.medicalServices = response;
$scope.medicalServices = response.data;
},
function (error) {
console.log(error);
Expand Down
45 changes: 8 additions & 37 deletions Source/App/Client/app/scripts/patient/patient-detail.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$http.get(urlService.MedicalInfoUrl + "/GetPatientMedicalInfos", { params: { patientId: patientId } }).then(
function (response) {
console.log(response);
$scope.infos = response;
$scope.infos = response.data;

for (var i = 0; i < $scope.infos.length; i++) {
var info = $scope.infos[i];
Expand All @@ -71,7 +71,7 @@
$http.post(urlService.MedicalInfoUrl + "/SavePatientMedicalInfos", JSON.stringify(patientMedicalInfos)).then(
function (response) {
console.log(response);
$scope.infos = response;
$scope.infos = response.data;

$scope.getMedicalInfos($scope.patientInfo.Id);
}, function (error) {
Expand All @@ -85,7 +85,7 @@
$http.get(urlService.PrescriptionUrl + "/GetPatientHistory", { params: { patientId: patientId } }).then(
function (response) {
console.log(response);
$scope.patientHistories = response;
$scope.patientHistories = response.data;
}, function (error) {
console.log(error);
});
Expand Down Expand Up @@ -275,40 +275,6 @@
}
};

//$scope.printDiv = function(divName) {
// var printContents = document.getElementById(divName).innerHTML;
// var originalContents = document.body.innerHTML;
// var popupWin;
// if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
// popupWin = window.open('', '_blank', 'width=600,height=600,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no');
// popupWin.window.focus();
// popupWin.document.write('<!DOCTYPE html><html><head>' + '<link href="Content/bootstrap/bootstrap.min.css" type="text/css" rel="stylesheet"/>' + '</head><body onload="window.print()"><div class="reward-body">' + printContents + '</div></html>');
// popupWin.onbeforeunload = function(event) {
// popupWin.close();
// return '.n';
// };
// popupWin.onabort = function(event) {
// popupWin.document.close();
// popupWin.close();
// }
// } else {
// popupWin = window.open('', '_blank', 'width=800,height=600');
// popupWin.document.open();
// popupWin.document.write('<html><head><link href="../Content/bootstrap/bootstrap.min.css" type="text/css" rel="stylesheet"/></head><body onload="window.print()">' + printContents + '</html>');
// popupWin.document.close();
// }
// popupWin.document.close();
// return true;
//};

//$scope.printDiv = function (divName) {
// var printContents = document.getElementById(divName).innerHTML;
// var popupWin = window.open('', '_blank', 'width=300,height=300');
// popupWin.document.open();
// popupWin.document.write('<html><head><link href="../Content/bootstrap/bootstrap.min.css" type="text/css" rel="stylesheet"/></head><body onload="window.print()">' + printContents + '</html>');
// popupWin.document.close();
//}


//print instance model
$scope.animationsEnabled = true;
Expand Down Expand Up @@ -355,6 +321,11 @@ angular.module("dentalApp")
$uibModalInstance.close();
};

$scope.print = function () {
window.print();
$scope.cancel();
};


$scope.printDiv = function (divName) {
var printContents = document.getElementById(divName).innerHTML;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$scope.getMedicalInfos = function() {
$http.get(urlService.MedicalInfoUrl + "/GetAll").then(function (response) {
console.log(response);
$scope.infos = response;
$scope.infos = response.data;
}, function (error) {
console.log(error);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$http.get(urlService.MedicalServiceUrl + "/GetAll").then(
function (response) {
console.log(response);
$scope.services = response;
$scope.services = response.data;
}, function (error) {
console.log(error);
});
Expand Down
4 changes: 2 additions & 2 deletions Source/App/Client/app/scripts/product/product.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$http.get(urlService.ProductUrl + "/GetProducts").then(
function (response) {
console.log(response);
$scope.products = response;
$scope.products = response.data;
}, function (error) {
console.log(error);
});
Expand Down Expand Up @@ -102,7 +102,7 @@
$http.get(urlService.ProductUrl + "/SearchProduct", { params: { request: $scope.key } }).then(
function (response) {
console.log(response);
$scope.products = response;
$scope.products = response.data;
}, function (error) {
console.log(error);
});
Expand Down
4 changes: 2 additions & 2 deletions Source/App/Client/app/scripts/stock/stock.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$scope.getProductsName = function () {
$http.get(urlService.ProductUrl + "/GetProductsName").then(function (response) {
console.log(response);
$scope.productsName = response;
$scope.productsName = response.data;
}, function (error) {
console.log(error);
});
Expand Down Expand Up @@ -59,7 +59,7 @@
$scope.getProduct = function(id) {
$http.get(urlService.ProductUrl + "/GetById?request=" + id).then(function (response) {
console.log(response);
$scope.product = response;
$scope.product = response.data;
$scope.stock.OnHand = response.OnHand;
}, function (error) {
console.log(error);
Expand Down
6 changes: 3 additions & 3 deletions Source/App/Client/app/scripts/user/user.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$scope.getRoles = function() {
var success = function(response) {
console.log(response);
$scope.roles = response;
$scope.roles = response.data;
$scope.getUsers();
};
var error = function(error) {
Expand All @@ -39,7 +39,7 @@
$scope.getUsers = function() {
var success = function(response) {
console.log(response);
$scope.list = response;
$scope.list = response.data;
};
var error = function(error) {
console.log(error);
Expand Down Expand Up @@ -80,7 +80,7 @@
$scope.getUser = function(id) {
var success = function(response) {
console.log(response);
$scope.model = response;
$scope.model = response.data;
$scope.model.PasswordHash = "";
$scope.model.RetypePassword = "";
$scope.model.RoleId = response.Roles[0].RoleId;
Expand Down
4 changes: 2 additions & 2 deletions Source/App/Client/app/styles/style.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.gridStyle {
border: 1px solid rgb(212,212,212);
width: 100%;
height: calc(100vh - 200px);
height: calc(100vh - 240px);
margin-bottom: 10px;
background: #f5f5f5 !important;
}

body {
padding-top: 80px;
padding-top: 50px;
padding-bottom: 50px;
background: #EBEBEB;
}
Expand Down
Loading

0 comments on commit 31dcde4

Please sign in to comment.