Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Dida Adams Arizona
Tia-dev
Commits
448cf80a
Commit
448cf80a
authored
Mar 19, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
managdoc, tp ro, ro
parent
27f39644
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
857 additions
and
411 deletions
+857
-411
index.js
src/api/index.js
+5
-0
AllDocument.js
src/container/DocumentManagement/AllDocument.js
+21
-5
RollingOutlook.js
src/container/RollingOutlook.js
+21
-10
TaxPlanningRO.js
src/container/RollingOutlook/TaxPlanningRO.js
+810
-396
No files found.
src/api/index.js
View file @
448cf80a
...
...
@@ -249,6 +249,9 @@ const create = (type = "") => {
const
getRollingOutlookLastUpdate
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_latest_update'
,
body
)
const
getRollingOutlookRevision
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_revision'
,
body
)
const
getRollingOutlookIsApprover
=
(
body
)
=>
api
.
get
(
'transaction/rolling_outlook/is_approver'
)
const
uploadAttachmentRO
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/upload_attachment'
,
body
)
const
deleteAttachmentRO
=
(
id
)
=>
api
.
post
(
`transaction/rolling_outlook/delete_attachment/
${
id
}
`
)
const
getRollingOutlookBS
=
(
body
)
=>
api
.
post
(
'transaction/balance_sheet/rolling_outlook/get_report_hierarki'
,
body
)
const
checkImportRollingOutlookBS
=
(
body
)
=>
api
.
post
(
'transaction/balance_sheet/rolling_outlook/check_import'
,
body
)
const
importRollingOutlookBS
=
(
body
)
=>
api
.
post
(
'transaction/balance_sheet/rolling_outlook/import_rolling_outlook'
,
body
)
...
...
@@ -727,6 +730,8 @@ const create = (type = "") => {
getRollingOutlookLastUpdate
,
getRollingOutlookRevision
,
getRollingOutlookIsApprover
,
uploadAttachmentRO
,
deleteAttachmentRO
,
checkImportRollingOutlookBS
,
importRollingOutlookBS
}
...
...
src/container/DocumentManagement/AllDocument.js
View file @
448cf80a
...
...
@@ -50,7 +50,7 @@ export default class getAllDocument extends Component {
}
this
.
setState
({
loading
:
true
})
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
//
console.log(response)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
...
...
@@ -69,6 +69,7 @@ export default class getAllDocument extends Component {
String
(
Number
(
item
.
document_size
)
/
1000
+
' KB'
),
item
.
created_by
,
item
.
created_at
,
item
.
values
])
}
else
{
if
(
indexId
!==
-
1
)
{
...
...
@@ -83,6 +84,7 @@ export default class getAllDocument extends Component {
String
(
Number
(
item
.
document_size
)
/
1000
+
' KB'
),
item
.
created_by
,
item
.
created_at
,
item
.
values
])
}
}
...
...
@@ -121,17 +123,18 @@ export default class getAllDocument extends Component {
}
openPopUp
=
async
(
index
,
val
,
type
)
=>
{
console
.
log
(
index
)
if
(
type
===
'download'
)
{
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/document/download_document?documentName=`
+
this
.
state
.
docPath
[
val
]
+
"&&fileType="
+
index
[
6
]
)
res
=
await
res
.
blob
()
//
console.log(res)
console
.
log
(
res
)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
index
[
1
];
a
.
download
=
(
String
(
index
[
3
]).
includes
(
":"
)
?
String
(
index
[
3
]).
replace
(
":"
,
" ("
)
+
` )`
:
String
(
index
[
3
]))
+
" - "
+
index
[
4
]
+
" - "
+
index
[
5
]
+
" - "
+
index
[
10
]
+
"."
+
index
[
6
];
a
.
click
();
}
}
...
...
@@ -270,7 +273,14 @@ export default class getAllDocument extends Component {
);
}
}
},
"File Name"
,
"Description"
,
},
{
name
:
"File Name"
,
options
:
{
display
:
false
}
},
"Description"
,
{
name
:
"Company Name"
,
options
:
{
...
...
@@ -289,7 +299,13 @@ export default class getAllDocument extends Component {
display
:
String
(
this
.
props
.
data
.
value
).
includes
(
'Manual Book TIA'
)
?
false
:
true
}
},
"Type"
,
"File Size"
,
"Created By"
,
"Created Date"
"Type"
,
"File Size"
,
"Created By"
,
"Created Date"
,
{
name
:
"Category"
,
options
:
{
display
:
false
}
},
]
const
loadingComponent
=
(
...
...
src/container/RollingOutlook.js
View file @
448cf80a
...
...
@@ -552,14 +552,14 @@ export default class RollingOutlook extends Component {
}
uploadAttachment
(
formData
)
{
//
var object = {};
//
formData.forEach(function (value, key) {
//
object[key] = value;
//
});
//
var json = JSON.stringify(object);
//
console.log(object)
//
console.log(json)
api
.
create
().
uploadAttachment
(
formData
).
then
(
response
=>
{
var
object
=
{};
formData
.
forEach
(
function
(
value
,
key
)
{
object
[
key
]
=
value
;
});
var
json
=
JSON
.
stringify
(
object
);
console
.
log
(
object
)
console
.
log
(
json
)
api
.
create
().
uploadAttachment
RO
(
formData
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -572,7 +572,7 @@ export default class RollingOutlook extends Component {
}
deleteAttachment
(
item
)
{
api
.
create
().
deleteAttachment
(
item
.
attachment_id
).
then
(
response
=>
{
api
.
create
().
deleteAttachment
RO
(
item
.
attachment_id
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getRollingOutlookID
()
...
...
@@ -610,6 +610,17 @@ export default class RollingOutlook extends Component {
let
length
=
name
.
split
(
"."
).
length
let
fileType
=
name
.
split
(
"."
)[
length
-
1
]
console
.
log
(
fileType
);
// console.log(fileurl);
let
indexStrip
=
String
(
fileurl
).
indexOf
(
"-"
)
let
fileName
=
String
(
fileurl
).
substr
(
indexStrip
+
1
,
String
(
fileurl
).
length
)
let
cobaSplit
=
String
(
fileName
).
split
(
"-"
)
let
mapSplit
=
""
cobaSplit
.
map
((
item
,
index
)
=>
{
if
(
item
!=
""
){
mapSplit
+=
index
==
0
?
`
${
titleCase
(
item
)}
`
:
`
${
item
}
`
}
})
// console.log(mapSplit);
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/master_budget/download_attachment?fileName=
${
fileurl
}
&&fileType=
${
fileType
}
`
// console.log(url);
let
res
=
await
fetch
(
...
...
@@ -621,7 +632,7 @@ export default class RollingOutlook extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Rolling Outlook Attachment.xlsx'
;
a
.
download
=
"(Rolling Outlook Attachment) - "
+
mapSplit
;
a
.
click
();
}
}
...
...
src/container/RollingOutlook/TaxPlanningRO.js
View file @
448cf80a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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