Skip to content

Commit f52a423

Browse files
unknownunknown
authored andcommitted
#5-08-2024
1 parent 30ccf9e commit f52a423

11 files changed

Lines changed: 111 additions & 66 deletions

File tree

appsTeacher/globalVars/app.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ module.exports = function init(site) {
193193
];
194194

195195
site.paymentMethodList = [
196-
{ name: 'normal', nameEn: "Normal", nameAr: "عادي" },
197-
{ name: 'monthly', nameEn: "Monthly", nameAr: "شهري" },
198-
{ name: 'reduced', nameEn: "Reduced", nameAr: "مخفض" },
199-
{ name: 'exempt', nameEn: "Exempt", nameAr: "معفى" },
196+
{ name: "normal", nameEn: "Normal", nameAr: "عادي" },
197+
{ name: "monthly", nameEn: "Monthly", nameAr: "شهري" },
198+
{ name: "reduced", nameEn: "Reduced", nameAr: "مخفض" },
199+
{ name: "exempt", nameEn: "Exempt", nameAr: "معفى" },
200200
];
201201

202202
site.paymentTypes = [
@@ -561,14 +561,14 @@ module.exports = function init(site) {
561561

562562
site.post("/api/notificationTypesList", (req, res) => {
563563
let setting = site.getSiteSetting(req.host);
564-
if (setting.isOnline) {
564+
if (setting.isOnline && !site.notificationTypesList.some((n) => n.name == "online")) {
565565
site.notificationTypesList.push({
566566
nameAr: "أونلاين",
567567
nameEn: "Online",
568568
name: "online",
569569
});
570570
}
571-
if (setting.showParent) {
571+
if (setting.showParent && !site.notificationTypesList.some((n) => n.name == "parent")) {
572572
site.notificationTypesList.push({
573573
nameAr: "ولي الأمر",
574574
nameEn: "Parents",

appsTeacher/preparingGroups/site_files/html/modalContent.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
></i-list>
1717
</div>
1818

19-
<i-button label="##word.Student Management##" ng-show="item.date" type="list" ng-click="error = '' " onclick="site.showModal( '#studentsModal')"></i-button>
19+
<i-button label="##word.Student Management##" ng-show="item.date" type="list" ng-click="numberAbsencesAttendance()" onclick="site.showModal( '#studentsModal')"></i-button>
2020

2121

2222
<div class="row" ng-show="item.date">

appsTeacher/preparingGroups/site_files/html/studentsModal.html

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,29 @@
1010

1111
<div class="modal-body">
1212
<div class="row">
13-
<i-button type="search" label="##word.All##" ng-click="$search = ''"></i-button>
14-
<i-button type="search" label="##word.Attendance##" ng-click="$search = 'true'"></i-button>
15-
<i-button type="search" label="##word.Absences##" ng-click="$search = 'false'"></i-button>
13+
<div class="col5">
14+
<i-button type="search" label="##word.All##" ng-click="$search = ''"></i-button>
15+
<i-button type="search" label="##word.Attendance##" ng-click="$search = 'true'"></i-button>
16+
<i-button type="search" label="##word.Absences##" ng-click="$search = 'false'"></i-button>
17+
</div>
18+
<div class="table-responsive col6">
19+
<table class="table hover bold" id="t-students">
20+
<tr>
21+
<th>##word.Number Of Atudents##</th>
22+
<th>##word.Number Of Attendees##</th>
23+
<th>##word.Number Of Absences##</th>
24+
</tr>
25+
<tr>
26+
<td class="center">{{item.studentList.length}}</td>
27+
<td class="center">{{item.attendanceCount}}</td>
28+
<td class="center">{{item.absenceCount}}</td>
29+
</tr>
30+
</table>
31+
</div>
1632
</div>
1733

1834
<div class="row">
19-
<i-control type="text" ng-model="$search" label="##word.Student Search##"></i-control>
35+
<i-control type="text" ng-keydown="attendStudent($search,$event)" ng-model="$search" label="##word.Student Search##"></i-control>
2036
</div>
2137
<p class="error">{{error}}</p>
2238
<div class="row">
@@ -38,14 +54,14 @@
3854
<td class="center userPrint">{{s.student.barcode}}</td>
3955
<td class="center">
4056
<a target="_blank" ng-class="{'change-color-link' : s.clickStudentMoblie}" ng-click="clickMoblie(s,'studentMobile')" href="https://wa.me/{{s.student.mobile}}">
41-
<i class="fas fa-mobile-alt"></i>
4257
{{s.student.mobile}}
58+
<i class="fas fa-mobile-alt"></i>
4359
</a>
4460
</td>
4561
<td class="center">
4662
<a target="_blank" ng-class="{'change-color-link' : s.clickSParentMobile}" ng-click="clickMoblie(s,'parentMobile')" href="https://wa.me/{{s.student.parentMobile}}">
47-
<i class="fas fa-mobile-alt"></i>
4863
{{s.student.parentMobile}}
64+
<i class="fas fa-mobile-alt"></i>
4965
</a>
5066
</td>
5167
<td class="center">
@@ -56,9 +72,9 @@
5672
<td class="center">{{s.departureDate | date : 'mm : hh '}}</td>
5773
<td class="center"><i-control ng-model="s.notes"></i-control></td>
5874
<td class="center not-print">
59-
<i-button ng-show="!s.attend" label="##word.Attended##" ng-click="setAttendance(s,'attend')"></i-button>
75+
<i-button ng-show="!s.attend" label="##word.Attended##" ng-click="setAttendance(s,'attend');numberAbsencesAttendance()"></i-button>
6076
<i-button ng-show="s.attend && !s.departureDate" label="##word.Departure##" ng-click="setAttendance(s,'departure')"></i-button>
61-
<i-button type="close" ng-hide="s.attend == false && s.departureDate" label="##word.Absence##" ng-click="setAttendance(s,'absence')"></i-button>
77+
<i-button type="close" ng-hide="s.attend == false && s.departureDate" label="##word.Absence##" ng-click="setAttendance(s,'absence');numberAbsencesAttendance()"></i-button>
6278
</td>
6379
</tr>
6480
</table>

appsTeacher/preparingGroups/site_files/js/index.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ app.controller("preparingGroups", function ($scope, $http, $timeout) {
251251
$http({
252252
method: "POST",
253253
url: "/api/groups/handleToPreparingGroup",
254-
data: { id: id, type: "validDay" ,date : new Date()},
254+
data: { id: id, type: "validDay", date: new Date() },
255255
}).then(
256256
function (response) {
257257
$scope.busy = false;
@@ -322,11 +322,30 @@ app.controller("preparingGroups", function ($scope, $http, $timeout) {
322322
delete $scope.item.group.educationalLevel;
323323
delete $scope.item.group.schoolYear;
324324
};
325+
325326
$scope.showSearch = function () {
326327
$scope.error = "";
327328
site.showModal($scope.modalSearchID);
328329
};
329330

331+
$scope.numberAbsencesAttendance = function () {
332+
$scope.error = "";
333+
$scope.item.attendanceCount = $scope.item.studentList.filter((s) => s.attend).length;
334+
$scope.item.absenceCount = $scope.item.studentList.filter((s) => !s.attend).length;
335+
};
336+
337+
$scope.attendStudent = function (search, ev) {
338+
$scope.error = "";
339+
if (ev.which == 13) {
340+
let index = $scope.item.studentList.findIndex((itm) => itm.student.barcode == search);
341+
if (index !== -1 && !$scope.item.studentList[index].attend) {
342+
$scope.item.studentList[index].attendDate = new Date();
343+
$scope.item.studentList[index].attend = true;
344+
$scope.numberAbsencesAttendance();
345+
}
346+
}
347+
};
348+
330349
$scope.searchAll = function () {
331350
$scope.error = "";
332351
$scope.getAll($scope.search);

appsTeacher/preparingQuizzes/site_files/html/modalContent.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
items="groupsList"
1616
ng-get="getGroupsList($search)"
1717
></i-list>
18-
<i-button ng-show="item.group.id" label="##word.Student Management##" type="list" class="col4" onclick="site.showModal( '#studentsModal')"></i-button>
18+
<i-button ng-show="item.group.id" label="##word.Student Management##" type="list" class="col4" ng-click="numberAbsencesAttendance()" onclick="site.showModal( '#studentsModal')"></i-button>
1919
</div>
2020
<div class="row" ng-show="item.group.id">
2121
<div class="person-cart">

appsTeacher/preparingQuizzes/site_files/html/studentsModal.html

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,29 @@
1010

1111
<div class="modal-body">
1212
<div class="row">
13-
<i-button type="search" label="##word.All##" ng-click="$search = ''"></i-button>
14-
<i-button type="search" label="##word.Attendance##" ng-click="$search = 'true'"></i-button>
15-
<i-button type="search" label="##word.Absences##" ng-click="$search = 'false'"></i-button>
13+
<div class="col5">
14+
<i-button type="search" label="##word.All##" ng-click="$search = ''"></i-button>
15+
<i-button type="search" label="##word.Attendance##" ng-click="$search = 'true'"></i-button>
16+
<i-button type="search" label="##word.Absences##" ng-click="$search = 'false'"></i-button>
17+
</div>
18+
<div class="table-responsive col6">
19+
<table class="table hover bold" id="t-students">
20+
<tr>
21+
<th>##word.Number Of Atudents##</th>
22+
<th>##word.Number Of Attendees##</th>
23+
<th>##word.Number Of Absences##</th>
24+
</tr>
25+
<tr>
26+
<td class="center">{{item.studentList.length}}</td>
27+
<td class="center">{{item.attendanceCount}}</td>
28+
<td class="center">{{item.absenceCount}}</td>
29+
</tr>
30+
</table>
31+
</div>
1632
</div>
1733

1834
<div class="row">
19-
<i-control type="text" ng-model="$search" label="##word.Student Search##"></i-control>
35+
<i-control type="text" ng-keydown="attendStudent($search,$event)" ng-model="$search" label="##word.Student Search##"></i-control>
2036
</div>
2137
<p class="error">{{error}}</p>
2238
<div class="row">
@@ -58,9 +74,9 @@
5874
<td class="center">{{s.attendDate | date : 'mm : hh '}}</td>
5975
<td class="center">{{s.departureDate | date : 'mm : hh '}}</td>
6076
<td class="center not-print">
61-
<i-button ng-show="!s.attend" label="##word.Attended##" ng-click="setAttendance(s,'attend')"></i-button>
77+
<i-button ng-show="!s.attend" label="##word.Attended##" ng-click="setAttendance(s,'attend');numberAbsencesAttendance()"></i-button>
6278
<i-button ng-show="s.attend && !s.departureDate" label="##word.Departure##" ng-click="setAttendance(s,'departure')"></i-button>
63-
<i-button type="close" ng-hide="s.attend == false && s.departureDate" label="##word.Absence##" ng-click="setAttendance(s,'absence')"></i-button>
79+
<i-button type="close" ng-hide="s.attend == false && s.departureDate" label="##word.Absence##" ng-click="setAttendance(s,'absence');numberAbsencesAttendance()"></i-button>
6480
</td>
6581
</tr>
6682
</table>

appsTeacher/preparingQuizzes/site_files/js/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,24 @@ app.controller("preparingQuizzes", function ($scope, $http, $timeout) {
317317
delete $scope.item.group.schoolYear;
318318
};
319319

320+
$scope.numberAbsencesAttendance = function () {
321+
$scope.error = "";
322+
$scope.item.attendanceCount = $scope.item.studentList.filter((s) => s.attend).length;
323+
$scope.item.absenceCount = $scope.item.studentList.filter((s) => !s.attend).length;
324+
};
325+
326+
$scope.attendStudent = function (search, ev) {
327+
$scope.error = "";
328+
if (ev.which == 13) {
329+
let index = $scope.item.studentList.findIndex((itm) => itm.student.barcode == search);
330+
if (index !== -1 && !$scope.item.studentList[index].attend) {
331+
$scope.item.studentList[index].attendDate = new Date();
332+
$scope.item.studentList[index].attend = true;
333+
$scope.numberAbsencesAttendance();
334+
}
335+
}
336+
};
337+
320338
$scope.showSearch = function () {
321339
$scope.error = "";
322340
site.showModal($scope.modalSearchID);

appsTeacher/site-setting/site_files/html/content.html

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,8 @@
1010
<div id="siteSettings" class="tab-content">
1111
<div class="article-part">
1212
<div class="row padding border margin">
13-
<div class="row">
14-
<i-control class="col6" label="##word.Ceo Manager##" ng-model="siteSetting.ceoManager"> </i-control>
15-
<i-list
16-
class="col6"
17-
label="##word.Teacher##"
18-
x-permissions="admin"
19-
ng-hide="siteSetting.isShared"
20-
ng-model="siteSetting.teacher"
21-
display="firstName"
22-
items="teachersList"
23-
ng-get="getTeachersList($search)"
24-
></i-list>
13+
<div class="row" ng-hide="siteSetting.isShared">
14+
<i-list class="col6" label="##word.Teacher##" x-permissions="admin" ng-model="siteSetting.teacher" display="firstName" items="teachersList" ng-get="getTeachersList($search)"></i-list>
2515
</div>
2616
</div>
2717

@@ -40,7 +30,7 @@
4030
<i-control class="col6" label="##word.Link## ##word.Apple Store##" ng-model="siteSetting.appleStore"> </i-control>
4131
</div>
4232

43-
<div class="row">
33+
<div class="row" ng-show="siteSetting.isEducationalPlatform">
4434
<i-control class="col3" type="number" label="##word.Packages Limit##" ng-model="siteSetting.packagesLimit"> </i-control>
4535
<i-control class="col3" type="number" label="##word.Lectures Limit##" ng-model="siteSetting.lecturesLimit"> </i-control>
4636
<i-control class="col3" type="number" label="##word.Books Limit##" ng-model="siteSetting.booksLimit"> </i-control>
@@ -87,8 +77,8 @@
8777
</div>
8878
<div class="row">
8979
<i-textarea ng-model="siteSetting.description" label="##word.Site Description##"> </i-textarea>
90-
<i-textarea ng-model="siteSetting.textPurchaseByBook" label="##word.Text purchase by book##"> </i-textarea>
91-
<i-textarea ng-model="siteSetting.textPurchaseByCode" label="##word.Text purchase by code##"> </i-textarea>
80+
<i-textarea ng-model="siteSetting.textPurchaseByBook" ng-show="siteSetting.isEducationalPlatform" label="##word.Text purchase by book##"> </i-textarea>
81+
<i-textarea ng-model="siteSetting.textPurchaseByCode" ng-show="siteSetting.isEducationalPlatform" label="##word.Text purchase by code##"> </i-textarea>
9282
<i-textarea ng-model="siteSetting.textOurPlacesTimes" label="##word.Text our places and times##"> </i-textarea>
9383
</div>
9484

@@ -107,15 +97,15 @@
10797
<div class="row">
10898
<i-checkbox label="##word.Educational Platform##" x-permissions="admin" ng-model="siteSetting.isEducationalPlatform"> </i-checkbox>
10999
<i-checkbox label="##word.Active Center##" x-permissions="admin" ng-model="siteSetting.isCenter"> </i-checkbox>
110-
<i-checkbox label="##word.Shared Site##" x-permissions="admin" ng-model="siteSetting.isShared"> </i-checkbox>
111-
<i-checkbox label="##word.Online active##" ng-model="siteSetting.isOnline"> </i-checkbox>
100+
<i-checkbox label="##word.Shared Site##" x-permissions="admin" ng-show="siteSetting.isEducationalPlatform" ng-model="siteSetting.isShared"> </i-checkbox>
101+
<i-checkbox label="##word.Online active##" ng-show="siteSetting.isEducationalPlatform" ng-model="siteSetting.isOnline"> </i-checkbox>
112102
<i-checkbox label="##word.Cities And Areas Show##" ng-model="siteSetting.citiesAndAreasShow"> </i-checkbox>
113103
<i-checkbox label="##word.Nationalities Show##" ng-model="siteSetting.nationalitiesShow"> </i-checkbox>
114104
<i-checkbox label="##word.Name Besid Logo Show##" ng-model="siteSetting.nameBesidLogoShow"> </i-checkbox>
115105
<i-checkbox label="##word.Parent Show##" ng-model="siteSetting.showParent"> </i-checkbox>
116-
<i-checkbox label="##word.Packages Show##" ng-model="siteSetting.showPackages"> </i-checkbox>
117-
<i-checkbox label="##word.Lectures Show##" ng-model="siteSetting.showLectures"> </i-checkbox>
118-
<i-checkbox label="##word.Books Show##" ng-model="siteSetting.showBooks"> </i-checkbox>
106+
<i-checkbox label="##word.Packages Show##" ng-show="siteSetting.isEducationalPlatform" ng-model="siteSetting.showPackages"> </i-checkbox>
107+
<i-checkbox label="##word.Lectures Show##" ng-show="siteSetting.isEducationalPlatform" ng-model="siteSetting.showLectures"> </i-checkbox>
108+
<i-checkbox label="##word.Books Show##" ng-show="siteSetting.isEducationalPlatform" ng-model="siteSetting.showBooks"> </i-checkbox>
119109
<i-checkbox label="##word.Banner Show##" ng-model="siteSetting.showBanner"> </i-checkbox>
120110
<i-checkbox label="##word.Auto Student Barcode##" ng-show="siteSetting.isCenter" ng-model="siteSetting.autoStudentBarcode"> </i-checkbox>
121111
</div>

appsTeacher/teacher-theme/site_files/css/footer.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.nameNotBesidLogoShow {
22
width: 100%;
3-
height: 300px;
3+
max-height: 300px;
44
object-fit: fill;
55
border-radius: 15px;
66
}

appsTeacher/teacher-theme/site_files/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ fieldset legend {
688688
}
689689
.banner-site {
690690
width: 100%;
691-
height: 600px;
691+
max-height: 600px;
692692
object-fit: fill;
693693
border-radius: 15px;
694694
}

0 commit comments

Comments
 (0)