Skip to content

Commit 9628542

Browse files
unknownunknown
authored andcommitted
#5-08-2024
1 parent 461e869 commit 9628542

6 files changed

Lines changed: 125 additions & 32 deletions

File tree

appsTeacher/groups/site_files/html/paymentsModal.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ <h2 class="col3 center border-1 bold padding">
3636
<tr ng-repeat="s in studentItem.paymentList">
3737
<td class="center bold">{{s.month.name##session.lang##}}</td>
3838
<td class="center bold">{{s.price}} ##word.$##</td>
39-
<td class="center bold">{{s.remain}} ##word.$##</td>
39+
<td class="center bold">
40+
{{s.remain}} ##word.$##
41+
<i-button type="save" ng-show="s.remain > 0" label="##word.Exception##" ng-click="exceptionRemain(s,true)"></i-button>
42+
<i-button type="exit" ng-show="s.exception" title="##word.Cancel Exception##" ng-click="exceptionRemain(s,false)"></i-button>
43+
</td>
4044
<td class="center">
4145
<div class="row" ng-show="s.remain > 0">
4246
<i-date class="col7" ng-model="s.$date" label="##word.Date##"></i-date>

appsTeacher/groups/site_files/html/thermalPrint.html

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,40 @@
33
<div class="center" ng-show="invoiceLogo">
44
<img class="logoPrint" ng-src="{{invoiceLogo}}" />
55
</div>
6+
<br ng-show="setting.invoiceHeader.length > 0" />
7+
<div class="row center" ng-repeat="i in setting.invoiceHeader">
8+
<p class="black font-14 center">{{i.name}}</p>
9+
</div>
10+
<br />
611

7-
<div class="row">
8-
<div class="center col-12 border-1">
9-
<span class="black font-20 bold">الطالب : {{thermal.student.firstName}}</span>
10-
</div>
12+
<div class="row center">
13+
<span class="black font-20 border-dashed">##word.Student Name## : <span class="bold">{{thermal.student.firstName}}</span></span>
1114
</div>
1215
<br />
1316
<div class="row">
14-
<div class="center col-12">
15-
<span class="black col-3 font-15">Date :</span>
16-
<span class="col-6 font-16 bold"> {{thermal.printDate |date:"dd / MM / yyyy" }} </span>
17-
<span class="black col-3 font-15">: التاريخ</span>
17+
<div class="col-12">
18+
<div class="col-1"></div>
19+
<span class="black col-4 font-15">Date / التاريخ</span>
20+
<span class="col-7 font-16 bold"> {{thermal.printDate |date:"dd / MM / yyyy" }} </span>
1821
</div>
1922
</div>
2023

2124
<div class="row">
22-
<div class="center col-12">
23-
<span class="black col-3 font-15">Time :</span>
24-
<span class="col-6 font-16 bold"> {{thermal.printDate |date:"hh : mm a" }} </span>
25-
<span class="black col-3 font-15">: الوقت</span>
25+
<div class="col-12">
26+
<div class="col-1"></div>
27+
<span class="black col-4 font-15">Time / الوقت</span>
28+
<span class="col-7 font-16 bold"> {{thermal.printDate |date:"hh : mm a" }} </span>
2629
</div>
2730
</div>
2831

2932
<br />
3033

31-
<div class="row border-1">
34+
<div class="row">
3235
<div class="col-1"></div>
3336

3437
<div class="col-4 font-18 black">
3538
<p class="font-18 black">##word.Group Name##</p>
36-
<p class="font-18 black">##word.Date##</p>
39+
<p class="font-18 black">##word.Payment Date##</p>
3740
<p class="font-18 black" ng-show="thermal.month">##word.Month##</p>
3841
<p class="font-18 black">##word.Paid##</p>
3942
<p class="font-18 black" ng-show="thermal.remain >= 0">##word.Remain##</p>
@@ -42,9 +45,14 @@
4245
<p class="font-18 black">{{thermal.groupName}}</p>
4346
<p class="font-18 black">{{thermal.date | date:"dd / MM / yyyy"}}</p>
4447
<p class="font-18 black" ng-show="thermal.month">{{thermal.month.name##session.lang##}}</p>
45-
<p class="font-18 black">{{thermal.price}} ##word.$##</p>
4648
<p class="font-18 black" ng-show="thermal.remain >= 0">{{thermal.remain}} ##word.$##</p>
49+
<p class="font-20 black border-dashed">{{thermal.price}} ##word.$##</p>
4750
</div>
4851
</div>
52+
53+
<br ng-show="setting.invoiceFooter.length > 0" />
54+
<div class="row center" ng-repeat="i in setting.invoiceFooter">
55+
<p class="black font-14 center">{{i.name}}</p>
56+
</div>
4957
</div>
5058
</div>

appsTeacher/groups/site_files/js/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ app.controller("groups", function ($scope, $http, $timeout) {
492492
site.showModal($scope.modalSearchID);
493493
};
494494

495-
$scope.thermalPrint = function (obj,subObj) {
495+
$scope.thermalPrint = function (obj, subObj) {
496496
$scope.error = "";
497497
if ($scope.busy) return;
498498
$scope.busy = true;
@@ -608,7 +608,20 @@ app.controller("groups", function ($scope, $http, $timeout) {
608608
}, 300);
609609
};
610610

611+
$scope.exceptionRemain = function (item, option) {
612+
$scope.error = "";
613+
if (option == true) {
614+
item.remain = 0;
615+
item.exception = true;
616+
} else if (option == false) {
617+
item.remain = $scope.item.price - item.price;
618+
619+
item.exception = false;
620+
}
621+
};
622+
611623
$scope.searchAll = function () {
624+
$scope.error = "";
612625
$scope.getAll($scope.search);
613626
site.hideModal($scope.modalSearchID);
614627
$scope.search = {};

appsTeacher/preparingGroups/site_files/html/studentsModal.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@
4545
<p class="bold"><span class="darkGray">##word.Day## : </span> {{item.day.name##session.lang##}}</p>
4646
</div>
4747
</div>
48+
<div class="row">
49+
<div class="col7">
50+
<p class="bold"><span class="darkGray">##word.Payment Method## : </span> {{item.group.paymentMethod.name##session.lang##}}</p>
51+
</div>
52+
<div class="col5">
53+
<p class="bold"><span class="darkGray">##word.Price## : </span> {{item.group.price}} ##word.$##</p>
54+
</div>
55+
</div>
4856
</div>
4957
</div>
5058
<div class="row">

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

Lines changed: 62 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<div class="tabs">
33
<div class="tabs-header full">
44
<a class="tab-link inline-block" onclick="site.showTabContent(event, '#siteSettings')"> ##word.Site Settings## </a>
5+
<a class="tab-link inline-block" onclick="site.showTabContent(event, '#printerProgram')" ng-show="siteSetting.isCenter"> ##word.Printers Program## </a>
56
<a class="tab-link inline-block" onclick="site.showTabContent(event, '#mainPage')"> ##word.Theme Setting## </a>
67
<a class="tab-link inline-block" onclick="site.showTabContent(event, '#blockPrograms')"> ##word.Block Programs## </a>
78
</div>
@@ -68,16 +69,6 @@
6869
items="teachersList"
6970
ng-get="getTeachersList($search)"
7071
></i-list>
71-
<i-list
72-
ng-search="siteSetting.$printerPath"
73-
class="col6"
74-
ng-show="siteSetting.isCenter"
75-
display="name"
76-
ng-model="siteSetting.thermalPrinter"
77-
label="##word.Thermal printer##"
78-
items="printersPathsList"
79-
>
80-
</i-list>
8172
</div>
8273
<div class="row">
8374
<i-control label="##word.Site Name##" class="col6" ng-model="siteSetting.siteName"> </i-control>
@@ -153,7 +144,68 @@
153144
</div>
154145
<i-button type="save" label="##word.Save##" ng-click="saveSetting('#siteSettings')"></i-button>
155146
</div>
147+
<div id="printerProgram" class="tab-content">
148+
<fieldset>
149+
<legend>##word.Printer Program##</legend>
150+
<div class="row">
151+
<i-list
152+
ng-search="siteSetting.$printerPath"
153+
class="col6"
154+
155+
display="name"
156+
ng-model="siteSetting.thermalPrinter"
157+
label="##word.Thermal printer##"
158+
items="printersPathsList"
159+
>
160+
</i-list>
161+
</div>
162+
<div class="row">
163+
<fieldset>
164+
<legend class="black">
165+
##word.Invoice Header##
166+
<i-button type="push" ng-click="addInvoiceHeader()"> </i-button>
167+
</legend>
156168

169+
<div ng-repeat="h in siteSetting.invoiceHeader track by $index" class="row">
170+
<i-control class="col8" ng-model="h.name"></i-control>
171+
172+
<i-button class="col1" type="up" ng-click="upDownList(siteSetting.invoiceHeader, 'up',$index)" ng-hide="$index == 0"> </i-button>
173+
<i-button
174+
class="col1"
175+
type="down"
176+
ng-click="upDownList(siteSetting.invoiceHeader, 'down',$index)"
177+
ng-hide="$index == (siteSetting.invoiceHeader.length - 1) "
178+
>
179+
</i-button>
180+
<i-button class="col1" type="delete" ng-click="siteSetting.invoiceHeader.length ==1 || siteSetting.invoiceHeader.splice($index,1)"> </i-button>
181+
</div>
182+
</fieldset>
183+
184+
<div class="row">
185+
<fieldset>
186+
<legend class="black">
187+
##word.Invoice Footer##
188+
<i-button type="push" ng-click="addInvoiceFooter()"> </i-button>
189+
</legend>
190+
191+
<div ng-repeat="f in siteSetting.invoiceFooter track by $index" class="row">
192+
<i-control class="col8" ng-model="f.name"></i-control>
193+
<i-button class="col1" type="up" ng-click="upDownList(siteSetting.invoiceFooter, 'up',$index)" ng-hide="$index == 0"> </i-button>
194+
<i-button
195+
class="col1"
196+
type="down"
197+
ng-click="upDownList(siteSetting.invoiceFooter, 'down',$index)"
198+
ng-hide="$index == (siteSetting.invoiceFooter.length - 1) "
199+
>
200+
</i-button>
201+
<i-button class="col1" type="delete" ng-click="siteSetting.invoiceFooter.length ==1 || siteSetting.invoiceFooter.splice($index,1)"> </i-button>
202+
</div>
203+
</fieldset>
204+
</div>
205+
</div>
206+
<i-button type="save" label="##word.Save##" ng-click="saveSetting('#printerProgram')"></i-button>
207+
</fieldset>
208+
</div>
157209
<div id="mainPage" class="tab-content">
158210
<div class="article-part">
159211
<div class="row">

appsTeacher/site-setting/site_files/js/index.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ app.controller("siteSetting", function ($scope, $http, $timeout) {
88

99
$scope.siteSetting = site.showObject("##data.#setting##");
1010
console.log($scope.siteSetting.id);
11-
11+
1212
$scope.siteTemplateList = site.showObject("##data.#templateList##");
1313
$scope.publishingSystemList = site.showObject("##data.#publishingSystem##");
1414
$scope.closingSystemList = site.showObject("##data.#closingSystem##");
@@ -80,22 +80,21 @@ app.controller("siteSetting", function ($scope, $http, $timeout) {
8080
$scope.busy = false;
8181
if (response.data.done && response.data.list.length > 0) {
8282
$scope.teachersList = response.data.list;
83-
8483
}
8584
},
8685
function (err) {
8786
$scope.busy = false;
8887
$scope.error = err;
8988
}
9089
);
91-
};
90+
};
9291

9392
$scope.getPrintersPaths = function () {
9493
$scope.busy = true;
9594
$scope.printersPathsList = [];
9695
$http({
97-
method: 'POST',
98-
url: '/api/printersPaths/all',
96+
method: "POST",
97+
url: "/api/printersPaths/all",
9998
data: {
10099
where: { active: true },
101100
select: {
@@ -120,6 +119,15 @@ app.controller("siteSetting", function ($scope, $http, $timeout) {
120119
}
121120
);
122121
};
122+
$scope.addInvoiceHeader = function () {
123+
$scope.siteSetting.invoiceHeader = $scope.siteSetting.invoiceHeader || [];
124+
$scope.siteSetting.invoiceHeader.unshift({});
125+
};
126+
127+
$scope.addInvoiceFooter = function () {
128+
$scope.siteSetting.invoiceFooter = $scope.siteSetting.invoiceFooter || [];
129+
$scope.siteSetting.invoiceFooter.unshift({});
130+
};
123131

124132

125133
$scope.upDownList = function (list, type, index) {

0 commit comments

Comments
 (0)