Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
ESDP_froot.kz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ESDP_froot.kz
ESDP_froot.kz
Commits
eaddb018
Commit
eaddb018
authored
Apr 06, 2021
by
Elena Tsoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#62
добавлены проверки на наличие файлов
parent
6a3b73de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
Account.js
front/src/components/Account/Account.js
+14
-13
PaymentById.js
front/src/containers/PaymentById/PaymentById.js
+4
-4
No files found.
front/src/components/Account/Account.js
View file @
eaddb018
...
...
@@ -38,8 +38,8 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s
<
th
>
Сумма
платежа
<
/th
>
<
th
>
Инициатор
<
/th
>
<
th
>
Файл
<
/th
>
<
th
>
Статус
платежа
<
/th>
{
user
&&
user
.
role
.
includes
(
'addPayment'
)
&&
<
th
>
Повтор
платежа
<
/th>
}
<
th
>
Статус
платежа
<
/th>
<
/tr
>
<
/thead
>
<
tbody
>
...
...
@@ -61,10 +61,21 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s
<
td
>
{
payment
.
priority
}
<
/td
>
<
td
>
{
payment
.
sum
}
<
/td
>
<
td
>
{
`
${
payment
.
user
&&
payment
.
user
.
surname
}
${
payment
.
user
&&
payment
.
user
.
name
}
`
}
<
/td
>
<
td
>
<
td
>
{
payment
.
image
?
<>
<
span
onClick
=
{()
=>
openModal
(
apiURL
+
"/uploads/"
+
payment
.
image
)}
>
Посмотреть
<
/span><br /
>
<
a
onClick
=
{()
=>
download
(
apiURL
+
"/uploads/"
+
payment
.
image
,
"file.jpg"
)}
>
Скачать
<
/a>
<
a
onClick
=
{()
=>
download
(
apiURL
+
"/uploads/"
+
payment
.
image
,
"file.jpg"
)}
>
Скачать
<
/a
>
<
/> : <span>Файл отсутствует</
span
>
}
<
/td
>
{
registry
&&
user
&&
(
user
.
_id
===
payment
.
user
.
_id
||
user
.
role
.
includes
(
'approvePayment'
))?
<
td
>
{
payment
.
repeatability
?
(
<>
<
span
>
да
<
/span
>
<
button
className
=
"Account__btn"
onClick
=
{()
=>
stopRepeatability
(
payment
.
_id
)}
>
Отменить
<
/button
>
<
/
>
):
<
span
>
нет
<
/span>
}
<
/td>:user && user.role.includes
(
'viewAllPayments'
)
&& <td
>
{
!
payment
.
repeatability
?
<
span
>
нет
<
/span> : <span >да</
span
>
}
<
/td>
}
{
!
registry
&&
user
&&
user
.
role
.
includes
(
'viewAllPayments'
)
&&
<
td
onClick
=
{
e
=>
statusDateChange
(
e
)}
>
{
!
payment
.
approved
&&
<
span
style
=
{{
color
:
'red'
}}
>
Не
подтвержден
<
/span>
}
{
payment
.
approved
&&
!
payment
.
paided
&&
<
span
style
=
{{
color
:
'orange'
}}
>
Подтвержден
<
/span>
}
...
...
@@ -92,16 +103,6 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s
<
button
className
=
"Account__btn"
onClick
=
{()
=>
cancelPay
(
payment
.
_id
)}
>
Отменить
<
/button
>
<
/>
)
}
<
/td>
}
{
registry
&&
user
&&
(
user
.
_id
===
payment
.
user
.
_id
||
user
.
role
.
includes
(
'approvePayment'
))?
<
td
>
{
payment
.
repeatability
?
(
<>
<
span
>
да
<
/span
>
<
button
className
=
"Account__btn"
onClick
=
{()
=>
stopRepeatability
(
payment
.
_id
)}
>
Отменить
<
/button
>
<
/
>
):
<
span
>
нет
<
/span>
}
<
/td>:user && user.role.includes
(
'viewAllPayments'
)
&& <td
>
{
!
payment
.
repeatability
?
<
span
>
нет
<
/span> : <span >да</
span
>
}
<
/td>
}
<
/tr
>
))}
<
/tbody
>
...
...
front/src/containers/PaymentById/PaymentById.js
View file @
eaddb018
...
...
@@ -43,10 +43,10 @@ const PaymentById = () => {
<
p
><
b
>
Повторящийся
платеж
:
<
/b> {payment.repeatability
?
"да": "нет"}</
p
>
<
p
><
b
>
Периодичность
платежа
:
<
/b> {periodicity}</
p
>
<
/div
>
<
div
>
<
p
className
=
"flex-column"
><
b
>
Счет
:
<
/b
>
<
img
src
=
{
apiURL
+
"/uploads/"
+
payment
.
image
}
alt
=
{
payment
.
image
}
/
>
<
/p
>
<
div
className
=
"flex-column"
>
<
h4
>
Счет
:
<
/h4
>
{
payment
.
image
?
<
img
src
=
{
apiURL
+
"/uploads/"
+
payment
.
image
}
alt
=
{
payment
.
image
}
/>: <p>Счет отсутствует</
p
>
}
<
/div
>
<
/div
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment