Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
Intranet
Overview
Overview
Details
Activity
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
Matteo
Intranet
Commits
e2c6da19
Commit
e2c6da19
authored
Jul 18, 2022
by
Matteo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modifica gestione strutture non configurate
parent
bd35dc02
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
17 deletions
+42
-17
build.gradle
android/app/build.gradle
+2
-2
package.json
package.json
+4
-0
documenti-request.ts
src/app/interface/documenti-request.ts
+1
-0
documenti.page.ts
src/app/pages/documenti/documenti.page.ts
+20
-6
segreteria.page.ts
src/app/pages/segreteria/segreteria.page.ts
+5
-1
documenti.service.ts
src/app/service/documenti.service.ts
+10
-8
No files found.
android/app/build.gradle
View file @
e2c6da19
...
@@ -12,8 +12,8 @@ android {
...
@@ -12,8 +12,8 @@ android {
applicationId
"it.aimconsulting.intranet"
applicationId
"it.aimconsulting.intranet"
minSdkVersion
rootProject
.
ext
.
minSdkVersion
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
18
versionCode
23
versionName
"
0.0.18
"
versionName
"
1.0.4
"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
aaptOptions
{
aaptOptions
{
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
...
...
package.json
View file @
e2c6da19
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
"
@angular/platform-browser
"
:
"~12.1.1"
,
"
@angular/platform-browser
"
:
"~12.1.1"
,
"
@angular/platform-browser-dynamic
"
:
"~12.1.1"
,
"
@angular/platform-browser-dynamic
"
:
"~12.1.1"
,
"
@angular/router
"
:
"~12.1.1"
,
"
@angular/router
"
:
"~12.1.1"
,
"
@awesome-cordova-plugins/app-version
"
:
"^5.39.1"
,
"
@awesome-cordova-plugins/core
"
:
"^5.39.1"
,
"
@capacitor/android
"
:
"3.2.4"
,
"
@capacitor/android
"
:
"3.2.4"
,
"
@capacitor/app
"
:
"1.0.3"
,
"
@capacitor/app
"
:
"1.0.3"
,
"
@capacitor/core
"
:
"3.2.4"
,
"
@capacitor/core
"
:
"3.2.4"
,
...
@@ -42,6 +44,8 @@
...
@@ -42,6 +44,8 @@
"
@ngx-translate/core
"
:
"^13.0.0"
,
"
@ngx-translate/core
"
:
"^13.0.0"
,
"
@ngx-translate/http-loader
"
:
"^6.0.0"
,
"
@ngx-translate/http-loader
"
:
"^6.0.0"
,
"
cordova-plugin-android-permissions
"
:
"^1.1.2"
,
"
cordova-plugin-android-permissions
"
:
"^1.1.2"
,
"
cordova-plugin-app-version
"
:
"^0.1.12"
,
"
cordova-plugin-appversion
"
:
"^1.0.0"
,
"
cordova-plugin-datepicker
"
:
"^0.9.3"
,
"
cordova-plugin-datepicker
"
:
"^0.9.3"
,
"
cordova-plugin-email-composer
"
:
"^0.9.2"
,
"
cordova-plugin-email-composer
"
:
"^0.9.2"
,
"
cordova-plugin-file
"
:
"^6.0.2"
,
"
cordova-plugin-file
"
:
"^6.0.2"
,
...
...
src/app/interface/documenti-request.ts
View file @
e2c6da19
...
@@ -5,5 +5,6 @@ export interface DocumentiRequest {
...
@@ -5,5 +5,6 @@ export interface DocumentiRequest {
cliente
:
number
;
cliente
:
number
;
limite
:
number
;
limite
:
number
;
struttura
:
number
;
struttura
:
number
;
usaStruttura
:
boolean
;
filtri
:
Pair
[];
filtri
:
Pair
[];
}
}
src/app/pages/documenti/documenti.page.ts
View file @
e2c6da19
...
@@ -51,7 +51,7 @@ export class DocumentiPage implements OnInit {
...
@@ -51,7 +51,7 @@ export class DocumentiPage implements OnInit {
eventsIdle
()
eventsIdle
()
{
{
this
.
translate
=
this
.
utilService
.
translate
;
this
.
translate
=
this
.
utilService
.
translate
;
if
(
EventsService
.
clienteCambiato
)
if
(
EventsService
.
clienteCambiato
||
EventsService
.
strutturaSelected
||
EventsService
.
strutturaSelectedHome
)
{
{
this
.
chiediDocumenti
(
"initial"
);
this
.
chiediDocumenti
(
"initial"
);
this
.
recuperaTitoli
();
this
.
recuperaTitoli
();
...
@@ -211,9 +211,14 @@ export class DocumentiPage implements OnInit {
...
@@ -211,9 +211,14 @@ export class DocumentiPage implements OnInit {
this
.
idCliente
=
AuthService
.
clienteSelezionato
.
id
;
this
.
idCliente
=
AuthService
.
clienteSelezionato
.
id
;
var
idReferente
=
AuthService
.
idReferente
;
var
idReferente
=
AuthService
.
idReferente
;
var
strutturaSel
=
this
.
utilService
.
getStrutturaSel
();
var
strutturaSel
=
this
.
utilService
.
getStrutturaSel
();
if
(
strutturaSel
==
null
)
return
;
if
(
strutturaSel
==
null
)
{
this
.
titoli
=
[];
return
;
}
this
.
utilService
.
showLoading
();
this
.
utilService
.
showLoading
();
request
=
this
.
docService
.
createTitoloRequest
(
idReferente
,
this
.
idCliente
,
strutturaSel
.
id
);
var
usaStruttura
:
boolean
=
strutturaSel
!=
null
?
strutturaSel
.
id
!=
6
:
true
;
request
=
this
.
docService
.
createTitoloRequest
(
idReferente
,
this
.
idCliente
,
strutturaSel
.
id
,
usaStruttura
);
this
.
docService
.
getTitoli
(
request
).
subscribe
((
res
:
TitoliDocumentiResponse
)
=>
{
this
.
docService
.
getTitoli
(
request
).
subscribe
((
res
:
TitoliDocumentiResponse
)
=>
{
this
.
utilService
.
closeLoading
();
this
.
utilService
.
closeLoading
();
if
(
res
.
error
){
if
(
res
.
error
){
...
@@ -243,10 +248,19 @@ export class DocumentiPage implements OnInit {
...
@@ -243,10 +248,19 @@ export class DocumentiPage implements OnInit {
this
.
idCliente
=
AuthService
.
clienteSelezionato
.
id
;
this
.
idCliente
=
AuthService
.
clienteSelezionato
.
id
;
var
idReferente
=
AuthService
.
idReferente
;
var
idReferente
=
AuthService
.
idReferente
;
var
strutturaSel
=
this
.
utilService
.
getStrutturaSel
();
var
strutturaSel
=
this
.
utilService
.
getStrutturaSel
();
if
(
strutturaSel
==
null
)
return
;
var
usaStruttura
:
boolean
=
strutturaSel
!=
null
?
strutturaSel
.
id
!=
6
:
true
;
if
(
strutturaSel
==
null
)
{
this
.
documenti
=
{
cliente
:
null
,
error
:
""
,
documenti
:
[]
};
return
;
}
this
.
utilService
.
showLoading
();
this
.
utilService
.
showLoading
();
if
(
fase
==
"initial"
)
request
=
this
.
docService
.
createInitialRequest
(
idReferente
,
this
.
idCliente
,
strutturaSel
.
id
);
if
(
fase
==
"initial"
)
request
=
this
.
docService
.
createInitialRequest
(
idReferente
,
this
.
idCliente
,
strutturaSel
.
id
,
usaStruttura
);
else
request
=
this
.
docService
.
createRequest
(
idReferente
,
this
.
idCliente
,
null
,
tit
,
null
,
dataDa
,
dataA
,
strutturaSel
.
id
);
else
request
=
this
.
docService
.
createRequest
(
idReferente
,
this
.
idCliente
,
null
,
tit
,
null
,
dataDa
,
dataA
,
strutturaSel
.
id
,
usaStruttura
);
this
.
docService
.
getDocumenti
(
request
).
subscribe
((
res
:
DocumentiResponse
)
=>
{
this
.
docService
.
getDocumenti
(
request
).
subscribe
((
res
:
DocumentiResponse
)
=>
{
this
.
utilService
.
closeLoading
();
this
.
utilService
.
closeLoading
();
if
(
res
.
error
){
if
(
res
.
error
){
...
...
src/app/pages/segreteria/segreteria.page.ts
View file @
e2c6da19
...
@@ -399,7 +399,11 @@ export class SegreteriaPage implements OnInit {
...
@@ -399,7 +399,11 @@ export class SegreteriaPage implements OnInit {
var
strutturaSel
=
null
;
var
strutturaSel
=
null
;
if
(
this
.
platform
.
is
(
"desktop"
))
strutturaSel
=
this
.
utilService
.
getStrutturaSel
();
if
(
this
.
platform
.
is
(
"desktop"
))
strutturaSel
=
this
.
utilService
.
getStrutturaSel
();
else
strutturaSel
=
this
.
strutturaSel
;
else
strutturaSel
=
this
.
strutturaSel
;
if
(
strutturaSel
==
null
)
return
;
if
(
strutturaSel
==
null
)
{
this
.
fatture
=
[];
return
;
}
this
.
utilService
.
showLoading
();
this
.
utilService
.
showLoading
();
if
(
fase
==
"initial"
)
request
=
this
.
segreteriaService
.
createFatturaRequest
(
this
.
idCliente
,
10
,
null
,
null
,
numeroP
,
numeroN
,
strutturaSel
.
id
);
if
(
fase
==
"initial"
)
request
=
this
.
segreteriaService
.
createFatturaRequest
(
this
.
idCliente
,
10
,
null
,
null
,
numeroP
,
numeroN
,
strutturaSel
.
id
);
else
request
=
this
.
segreteriaService
.
createFatturaRequest
(
this
.
idCliente
,
null
,
dataDa
,
dataA
,
numeroP
,
numeroN
,
strutturaSel
.
id
);
else
request
=
this
.
segreteriaService
.
createFatturaRequest
(
this
.
idCliente
,
null
,
dataDa
,
dataA
,
numeroP
,
numeroN
,
strutturaSel
.
id
);
...
...
src/app/service/documenti.service.ts
View file @
e2c6da19
...
@@ -25,13 +25,13 @@ export class DocumentiService {
...
@@ -25,13 +25,13 @@ export class DocumentiService {
encodeBodyTitoliDocumenti
(
params
:
DocumentiRequest
)
{
encodeBodyTitoliDocumenti
(
params
:
DocumentiRequest
)
{
var
request
=
"{
\"
referente
\"
: "
+
params
.
referente
+
",
\"
cliente
\"
: "
+
params
.
cliente
+
",
\"
limite
\"
: "
+
params
.
limite
+
var
request
=
"{
\"
referente
\"
: "
+
params
.
referente
+
",
\"
cliente
\"
: "
+
params
.
cliente
+
",
\"
limite
\"
: "
+
params
.
limite
+
",
\"
struttura
\"
: "
+
params
.
struttura
+
",
\"
filtri
\"
: {}}"
;
",
\"
struttura
\"
: "
+
params
.
struttura
+
",
\"
usaStruttura
\"
: "
+
params
.
usaStruttura
+
",
\"
filtri
\"
: {}}"
;
return
request
;
return
request
;
}
}
encodeBodyDocumenti
(
params
:
DocumentiRequest
)
{
encodeBodyDocumenti
(
params
:
DocumentiRequest
)
{
var
request
=
"{
\"
referente
\"
: "
+
params
.
referente
+
",
\"
cliente
\"
: "
+
params
.
cliente
+
",
\"
limite
\"
: "
+
params
.
limite
+
var
request
=
"{
\"
referente
\"
: "
+
params
.
referente
+
",
\"
cliente
\"
: "
+
params
.
cliente
+
",
\"
limite
\"
: "
+
params
.
limite
+
",
\"
struttura
\"
: "
+
params
.
struttura
+
",
\"
filtri
\"
: {"
;
",
\"
struttura
\"
: "
+
params
.
struttura
+
",
\"
usaStruttura
\"
: "
+
params
.
usaStruttura
+
",
\"
filtri
\"
: {"
;
var
filtro
;
var
filtro
;
var
first
=
true
;
var
first
=
true
;
var
i
;
var
i
;
...
@@ -48,7 +48,7 @@ export class DocumentiService {
...
@@ -48,7 +48,7 @@ export class DocumentiService {
return
request
;
return
request
;
}
}
createTitoloRequest
(
idReferente
,
id
:
any
,
strutturaSel
:
number
)
{
createTitoloRequest
(
idReferente
,
id
:
any
,
strutturaSel
:
number
,
usaStruttura
:
boolean
)
{
var
request
:
DocumentiRequest
;
var
request
:
DocumentiRequest
;
var
pairs
:
Pair
[]
=
new
Array
();
var
pairs
:
Pair
[]
=
new
Array
();
...
@@ -58,13 +58,14 @@ export class DocumentiService {
...
@@ -58,13 +58,14 @@ export class DocumentiService {
cliente
:
id
,
cliente
:
id
,
limite
:
null
,
limite
:
null
,
struttura
:
strutturaSel
,
struttura
:
strutturaSel
,
usaStruttura
:
usaStruttura
,
filtri
:
pairs
filtri
:
pairs
};
};
return
request
;
return
request
;
}
}
createRequest
(
idReferente
,
id
,
limite
,
titolo
,
tipo
,
daData
,
aData
,
strutturaSel
):
DocumentiRequest
createRequest
(
idReferente
,
id
,
limite
,
titolo
,
tipo
,
daData
,
aData
,
strutturaSel
,
usaStruttura
):
DocumentiRequest
{
{
var
request
:
DocumentiRequest
;
var
request
:
DocumentiRequest
;
var
pair
:
Pair
;
var
pair
:
Pair
;
...
@@ -115,20 +116,21 @@ export class DocumentiService {
...
@@ -115,20 +116,21 @@ export class DocumentiService {
cliente
:
id
,
cliente
:
id
,
limite
:
limite
,
limite
:
limite
,
struttura
:
strutturaSel
,
struttura
:
strutturaSel
,
usaStruttura
:
usaStruttura
,
filtri
:
pairs
filtri
:
pairs
};
};
return
request
;
return
request
;
}
}
createInitialRequest
(
idReferente
,
id
,
strutturaSel
):
DocumentiRequest
createInitialRequest
(
idReferente
,
id
,
strutturaSel
,
usaStruttura
):
DocumentiRequest
{
{
return
this
.
createRequest
(
idReferente
,
id
,
10
,
null
,
null
,
null
,
null
,
strutturaSel
);
return
this
.
createRequest
(
idReferente
,
id
,
10
,
null
,
null
,
null
,
null
,
strutturaSel
,
usaStruttura
);
}
}
getTitoli
(
value
:
DocumentiRequest
)
:
Observable
<
TitoliDocumentiResponse
>
{
getTitoli
(
value
:
DocumentiRequest
)
:
Observable
<
TitoliDocumentiResponse
>
{
var
param
=
this
.
encodeBodyTitoliDocumenti
(
value
);
var
param
=
this
.
encodeBodyTitoliDocumenti
(
value
);
return
this
.
httpClient
.
post
<
TitoliDocumentiResponse
>
(
this
.
httpClientDataService
.
BASE_ADDRESS
+
'/intranet/getTitoliDocumenti.do'
,
param
,
this
.
httpClientDataService
.
httpOptionsJson
)
return
this
.
httpClient
.
post
<
TitoliDocumentiResponse
>
(
this
.
httpClientDataService
.
BASE_ADDRESS
+
'/intranet/getTitoliDocumenti
Struttura
.do'
,
param
,
this
.
httpClientDataService
.
httpOptionsJson
)
.
pipe
(
.
pipe
(
catchError
(
this
.
handleError
),
catchError
(
this
.
handleError
),
tap
(
(
res
:
TitoliDocumentiResponse
)
=>
{
tap
(
(
res
:
TitoliDocumentiResponse
)
=>
{
...
@@ -148,7 +150,7 @@ export class DocumentiService {
...
@@ -148,7 +150,7 @@ export class DocumentiService {
getDocumenti
(
value
:
DocumentiRequest
):
Observable
<
DocumentiResponse
>
{
getDocumenti
(
value
:
DocumentiRequest
):
Observable
<
DocumentiResponse
>
{
var
param
=
this
.
encodeBodyDocumenti
(
value
);
var
param
=
this
.
encodeBodyDocumenti
(
value
);
return
this
.
httpClient
.
post
<
DocumentiResponse
>
(
this
.
httpClientDataService
.
BASE_ADDRESS
+
'/intranet/documentiByStruttura.do'
,
param
,
this
.
httpClientDataService
.
httpOptionsJson
)
return
this
.
httpClient
.
post
<
DocumentiResponse
>
(
this
.
httpClientDataService
.
BASE_ADDRESS
+
'/intranet/documentiByStruttura
New
.do'
,
param
,
this
.
httpClientDataService
.
httpOptionsJson
)
.
pipe
(
.
pipe
(
catchError
(
this
.
handleError
),
catchError
(
this
.
handleError
),
tap
(
(
res
:
DocumentiResponse
)
=>
{
tap
(
(
res
:
DocumentiResponse
)
=>
{
...
...
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