Commit a53849a8 by Matteo

init ionic 6.0

parent 55f2f0ba
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# Android Profiling
*.hprof
# Cordova plugins for Capacitor
capacitor-cordova-android-plugins
# Copied web assets
app/src/main/assets/public
/build/*
!/build/.npmkeep
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "it.aimconsulting.intranet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-app')
implementation project(':capacitor-haptics')
implementation project(':capacitor-keyboard')
implementation project(':capacitor-status-bar')
implementation "com.android.support:support-v4:27.+"
implementation "com.android.support:support-v4:27.+"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "com.android.support:support-v13:27.+"
implementation "me.leolin:ShortcutBadger:1.1.17@aar"
implementation "com.google.firebase:firebase-messaging:17.0.+"
}
apply from: "../../node_modules/phonegap-plugin-multidex/multidex.gradle"
if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
{
"project_info": {
"project_number": "194791689410",
"firebase_url": "https://p2-intranet.firebaseio.com",
"project_id": "p2-intranet",
"storage_bucket": "p2-intranet.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:194791689410:android:5712a21ccecb1afda4ff5b",
"android_client_info": {
"package_name": "it.aimconsulting.intranet"
}
},
"oauth_client": [
{
"client_id": "194791689410-48g2q42ij0rg0gp9qq0u4o9gc9cfmq2m.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyADNLLRozp6XZRPc0dmv-ma-C_8BrlGIAg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "194791689410-48g2q42ij0rg0gp9qq0u4o9gc9cfmq2m.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.getcapacitor.myapp;
import static org.junit.Assert.*;
import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.getcapacitor.app", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.aimconsulting.intranet">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name="it.aimconsulting.intranet.MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>
</application>
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
</manifest>
{
"appId": "it.aimconsulting.intranet",
"appName": "2P2 App",
"webDir": "www",
"bundledWebRuntime": false
}
[
{
"pkg": "@capacitor/app",
"classpath": "com.capacitorjs.plugins.app.AppPlugin"
},
{
"pkg": "@capacitor/haptics",
"classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin"
},
{
"pkg": "@capacitor/keyboard",
"classpath": "com.capacitorjs.plugins.keyboard.KeyboardPlugin"
},
{
"pkg": "@capacitor/status-bar",
"classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin"
}
]
package it.aimconsulting.intranet;
import com.getcapacitor.BridgeActivity;
public class MainActivity extends BridgeActivity {}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">2P2 App</string>
<string name="title_activity_main">2P2 App</string>
<string name="package_name">it.aimconsulting.intranet</string>
<string name="custom_url_scheme">it.aimconsulting.intranet</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:background">@null</item>
</style>
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
<item name="android:background">@drawable/splash</item>
</style>
</resources>
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?>
<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<access origin="*" />
<feature name="Permissions">
<param name="android-package" value="com.android.plugins.Permissions"/>
</feature>
<feature name="DatePickerPlugin">
<param name="android-package" value="com.plugin.datepicker.DatePickerPlugin"/>
</feature>
<feature name="EmailComposer">
<param name="android-package" value="de.appplant.cordova.emailcomposer.EmailComposer"/>
</feature>
<feature name="File">
<param name="android-package" value="org.apache.cordova.file.FileUtils"/>
<param name="onload" value="true"/>
</feature>
<feature name="FileOpener2">
<param name="android-package" value="io.github.pwlin.cordova.plugins.fileopener2.FileOpener2"/>
</feature>
<feature name="InAppBrowser">
<param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser"/>
</feature>
<feature name="StatusBar">
<param name="android-package" value="org.apache.cordova.statusbar.StatusBar"/>
<param name="onload" value="true"/>
</feature>
<feature name="SocialSharing">
<param name="android-package" value="nl.xservices.plugins.SocialSharing"/>
</feature>
<feature name="PushNotification">
<param name="android-package" value="com.adobe.phonegap.push.PushPlugin"/>
</feature>
</widget>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="." />
<cache-path name="my_cache_images" path="." />
</paths>
\ No newline at end of file
package com.getcapacitor.myapp;
import static org.junit.Assert.*;
import org.junit.Test;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.google.gms:google-services:4.3.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: "variables.gradle"
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
include ':capacitor-keyboard'
project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android')
include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
include ':app'
include ':capacitor-cordova-android-plugins'
project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
apply from: 'capacitor.settings.gradle'
\ No newline at end of file
ext {
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
androidxActivityVersion = '1.2.0'
androidxAppCompatVersion = '1.2.0'
androidxCoordinatorLayoutVersion = '1.1.0'
androidxCoreVersion = '1.3.2'
androidxFragmentVersion = '1.3.0'
junitVersion = '4.13.1'
androidxJunitVersion = '1.1.2'
androidxEspressoCoreVersion = '3.3.0'
cordovaAndroidVersion = '7.0.0'
}
\ No newline at end of file
{
"appId": "it.aimconsulting.intranet",
"appName": "2P2 App",
"webDir": "www",
"bundledWebRuntime": false
}
<?xml version='1.0' encoding='utf-8'?>
<widget id="it.aimconsulting.intranet" version="0.0.9" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>2P2 App</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="19" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="ShowSplashScreen" value="true" />
<platform name="browser">
<preference name="ShowSplashScreen" value="false" />
</platform>
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<allow-navigation href="*" />
<config-file parent="NSAllowsArbitraryLoads" platform="ios" target="*-Info.plist">
<true />
</config-file>
<config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
<string>La App userà la Camera per allegare le foto ai Pareri</string>
</config-file>
<config-file parent="NSUserData" platform="ios" target="*-Info.plist">
<string>La App recupererà dei dati personali dal server e ne trasmetterà al server</string>
</config-file>
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
<icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" />
<icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" />
<icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-29@2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-29@3x.png" width="87" />
<icon height="48" src="resources/ios/icon/icon-24@2x.png" width="48" />
<icon height="55" src="resources/ios/icon/icon-27.5@2x.png" width="55" />
<icon height="88" src="resources/ios/icon/icon-44@2x.png" width="88" />
<icon height="172" src="resources/ios/icon/icon-86@2x.png" width="172" />
<icon height="196" src="resources/ios/icon/icon-98@2x.png" width="196" />
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
</widget>
// @ts-check
// Protractor configuration file, see link for more information // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts // https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter'); const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = { exports.config = {
allScriptsTimeout: 11000, allScriptsTimeout: 11000,
specs: [ specs: [
'./src/**/*.e2e-spec.ts' './src/**/*.e2e-spec.ts'
], ],
capabilities: { capabilities: {
'browserName': 'chrome' browserName: 'chrome'
}, },
directConnect: true, directConnect: true,
SELENIUM_PROMISE_MANAGER: false,
baseUrl: 'http://localhost:4200/', baseUrl: 'http://localhost:4200/',
framework: 'jasmine', framework: 'jasmine',
jasmineNodeOpts: { jasmineNodeOpts: {
...@@ -21,8 +26,12 @@ exports.config = { ...@@ -21,8 +26,12 @@ exports.config = {
}, },
onPrepare() { onPrepare() {
require('ts-node').register({ require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json') project: require('path').join(__dirname, './tsconfig.json')
}); });
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY
}
}));
} }
}; };
...@@ -9,6 +9,6 @@ describe('new App', () => { ...@@ -9,6 +9,6 @@ describe('new App', () => {
it('should display welcome message', () => { it('should display welcome message', () => {
page.navigateTo(); page.navigateTo();
expect(page.getPageTitle()).toContain('Tab One'); expect(page.getPageTitle()).toContain('Tab 1');
}); });
}); });
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app", "outDir": "../out-tsc/e2e",
"module": "commonjs", "module": "commonjs",
"target": "es5", "target": "es2018",
"types": [ "types": [
"jasmine", "jasmine",
"jasminewd2",
"node" "node"
] ]
} }
......
{ {
"name": "2P2 App", "name": "2P2 App",
"integrations": { "integrations": {
"cordova": {} "capacitor": {}
}, },
"type": "angular" "type": "angular"
} }
{
"name": "proxy-example",
"app_id": "",
"proxies": [
{
"path": "/stman",
"proxyUrl": "http://localhost:8080/stman"
},
{
"path": "/watch",
"proxyUrl": "www.youtube.com/watch"
}
]
}
\ No newline at end of file
{
"name": "Tabs Starter",
"baseref": "master",
"tarignore": [
"node_modules",
"package-lock.json",
"www"
],
"scripts": {
"test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --prod --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run"
}
}
App/build
App/Pods
App/Podfile.lock
App/App/public
DerivedData
xcuserdata
# Cordova plugins for Capacitor
capacitor-cordova-ios-plugins
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objects = {
/* Begin PBXBuildFile section */
2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };
504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };
504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = "<group>"; };
504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
504EC3011FED79650016851F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = {
isa = PBXGroup;
children = (
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
504EC2FB1FED79650016851F = {
isa = PBXGroup;
children = (
504EC3061FED79650016851F /* App */,
504EC3051FED79650016851F /* Products */,
7F8756D8B27F46E3366F6CEA /* Pods */,
27E2DDA53C4D2A4D1A88CE4A /* Frameworks */,
);
sourceTree = "<group>";
};
504EC3051FED79650016851F /* Products */ = {
isa = PBXGroup;
children = (
504EC3041FED79650016851F /* App.app */,
);
name = Products;
sourceTree = "<group>";
};
504EC3061FED79650016851F /* App */ = {
isa = PBXGroup;
children = (
50379B222058CBB4000EE86E /* capacitor.config.json */,
504EC3071FED79650016851F /* AppDelegate.swift */,
504EC30B1FED79650016851F /* Main.storyboard */,
504EC30E1FED79650016851F /* Assets.xcassets */,
504EC3101FED79650016851F /* LaunchScreen.storyboard */,
504EC3131FED79650016851F /* Info.plist */,
2FAD9762203C412B000D30F8 /* config.xml */,
50B271D01FEDC1A000F3C39B /* public */,
);
path = App;
sourceTree = "<group>";
};
7F8756D8B27F46E3366F6CEA /* Pods */ = {
isa = PBXGroup;
children = (
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */,
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
504EC3031FED79650016851F /* App */ = {
isa = PBXNativeTarget;
buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */;
buildPhases = (
6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */,
504EC3001FED79650016851F /* Sources */,
504EC3011FED79650016851F /* Frameworks */,
504EC3021FED79650016851F /* Resources */,
9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = App;
productName = App;
productReference = 504EC3041FED79650016851F /* App.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
504EC2FC1FED79650016851F /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0920;
TargetAttributes = {
504EC3031FED79650016851F = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */;
compatibilityVersion = "Xcode 8.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 504EC2FB1FED79650016851F;
productRefGroup = 504EC3051FED79650016851F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
504EC3031FED79650016851F /* App */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
504EC3021FED79650016851F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,
50B271D11FEDC1A000F3C39B /* public in Resources */,
504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
504EC30D1FED79650016851F /* Main.storyboard in Resources */,
2FAD9763203C412B000D30F8 /* config.xml in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
504EC3001FED79650016851F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
504EC3081FED79650016851F /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
504EC30B1FED79650016851F /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
504EC30C1FED79650016851F /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
504EC3101FED79650016851F /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
504EC3111FED79650016851F /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
504EC3141FED79650016851F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
504EC3151FED79650016851F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
504EC3171FED79650016851F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = it.aimconsulting.intranet;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
504EC3181FED79650016851F /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = it.aimconsulting.intranet;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
504EC3141FED79650016851F /* Debug */,
504EC3151FED79650016851F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
504EC3171FED79650016851F /* Debug */,
504EC3181FED79650016851F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 504EC2FC1FED79650016851F /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:App.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:App.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
import UIKit
import Capacitor
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
// Called when the app was launched with a url. Feel free to add additional processing here,
// but if you want the App API to support tracking app url opens, make sure to keep this call
return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
}
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
// Called when the app was launched with an activity, including Universal Links.
// Feel free to add additional processing here, but if you want the App API to support
// tracking app url opens, make sure to keep this call
return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event)
let statusBarRect = UIApplication.shared.statusBarFrame
guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return }
if statusBarRect.contains(touchPoint) {
NotificationCenter.default.post(name: .capacitorStatusBarTapped, object: nil)
}
}
}
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "AppIcon-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "AppIcon-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon-29x29@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "AppIcon-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "AppIcon-20x20@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon-40x40@2x-1.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "AppIcon-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "AppIcon-512@2x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "splash-2732x2732-2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "splash-2732x2732-1.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "splash-2732x2732.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17132" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17105"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<imageView key="view" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Splash" id="snD-IY-ifK">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</imageView>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="Splash" width="1366" height="1366"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
</dependencies>
<scenes>
<!--Bridge View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>2P2 App</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>mailto</string>
</array>
<key>NSPhotoLibraryUsageDescription</key>
<string>$PHOTO_LIBRARY_USAGE_DESCRIPTION</string>
</dict>
</plist>
{
"appId": "it.aimconsulting.intranet",
"appName": "2P2 App",
"webDir": "www",
"bundledWebRuntime": false
}
<?xml version='1.0' encoding='utf-8'?>
<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<access origin="*" />
<feature name="DatePicker">
<param name="ios-package" value="DatePicker"/>
</feature>
<feature name="EmailComposer">
<param name="ios-package" value="APPEmailComposer"/>
</feature>
<feature name="File">
<param name="ios-package" value="CDVFile"/>
<param name="onload" value="true"/>
</feature>
<feature name="FileOpener2">
<param name="ios-package" value="FileOpener2"/>
</feature>
<feature name="InAppBrowser">
<param name="ios-package" value="CDVWKInAppBrowser"/>
<param name="onload" value="true"/>
</feature>
<feature name="SocialSharing">
<param name="ios-package" value="SocialSharing"/>
<param name="onload" value="true"/>
</feature>
<feature name="PushNotification">
<param name="ios-package" value="PushPlugin"/>
</feature>
</widget>
\ No newline at end of file
platform :ios, '12.0'
use_frameworks!
# workaround to avoid Xcode caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
end
target 'App' do
capacitor_pods
# Add your Pods here
end
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "2P2 App", "name": "2P2 App",
"version": "0.0.2", "version": "1.0",
"author": "Ionic Framework", "author": "Aim Consulting s.r.l.",
"homepage": "https://ionicframework.com/", "homepage": "https://www.aimconsulting.it/",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
...@@ -13,112 +13,84 @@ ...@@ -13,112 +13,84 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/cdk": "^7.3.7", "@angular/common": "~12.1.1",
"@angular/common": "^7.2.2", "@angular/core": "~12.1.1",
"@angular/core": "^7.2.2", "@angular/forms": "~12.1.1",
"@angular/forms": "^7.2.2", "@angular/platform-browser": "~12.1.1",
"@angular/http": "^7.2.2", "@angular/platform-browser-dynamic": "~12.1.1",
"@angular/material": "^7.3.7", "@angular/router": "~12.1.1",
"@angular/platform-browser": "^7.2.2", "@capacitor/android": "3.2.4",
"@angular/platform-browser-dynamic": "^7.2.2", "@capacitor/app": "1.0.3",
"@angular/router": "^7.2.2", "@capacitor/core": "3.2.4",
"@ionic-native/android-permissions": "^5.6.1", "@capacitor/haptics": "1.1.0",
"@ionic-native/core": "^5.0.0", "@capacitor/ios": "3.2.4",
"@ionic-native/date-picker": "^5.6.0", "@capacitor/keyboard": "1.1.0",
"@ionic-native/email-composer": "^5.8.0", "@capacitor/status-bar": "1.0.3",
"@ionic-native/file": "^5.6.0", "@ionic-native/android-permissions": "^5.36.0",
"@ionic-native/file-opener": "^5.7.0", "@ionic-native/core": "^5.36.0",
"@ionic-native/in-app-browser": "^5.8.0", "@ionic-native/date-picker": "^5.36.0",
"@ionic-native/push": "^5.24.0", "@ionic-native/email-composer": "^5.36.0",
"@ionic-native/social-sharing": "^5.9.0", "@ionic-native/file": "^5.36.0",
"@ionic-native/splash-screen": "^5.0.0", "@ionic-native/file-opener": "^5.36.0",
"@ionic-native/status-bar": "^5.0.0", "@ionic-native/in-app-browser": "^5.36.0",
"@ionic/angular": "^4.1.0", "@ionic-native/push": "^5.36.0",
"@ionic/pro": "2.0.4", "@ionic-native/social-sharing": "^5.36.0",
"@ionic/storage": "^2.2.0", "@ionic-native/splash-screen": "^5.36.0",
"@ngx-translate/core": "^11.0.1", "@ionic-native/status-bar": "^5.36.0",
"@ngx-translate/http-loader": "^4.0.0", "@ionic/angular": "^5.5.2",
"cordova-android": "8.0.0", "@ionic/storage-angular": "^3.0.6",
"cordova-browser": "6.0.0", "@ngx-translate/core": "^13.0.0",
"cordova-plugin-android-permissions": "1.0.0", "@ngx-translate/http-loader": "^6.0.0",
"cordova-plugin-datepicker": "0.9.3", "cordova-plugin-android-permissions": "^1.1.2",
"cordova-plugin-email-composer": "0.9.2", "cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-file": "6.0.1", "cordova-plugin-email-composer": "^0.9.2",
"cordova-plugin-file-opener2": "2.2.0", "cordova-plugin-file": "^6.0.2",
"cordova-plugin-inappbrowser": "3.0.0", "cordova-plugin-file-opener2": "^3.0.5",
"cordova-plugin-x-socialsharing": "5.4.7", "cordova-plugin-inappbrowser": "^5.0.0",
"cordova-sqlite-storage": "3.2.0", "cordova-plugin-splashscreen": "^6.0.0",
"cordova-support-google-services": "^1.3.2", "cordova-plugin-statusbar": "^2.4.3",
"core-js": "^2.5.4", "cordova-plugin-x-socialsharing": "^6.0.3",
"es6-promise-plugin": "4.2.2", "es6-promise-plugin": "^4.2.2",
"ionic-angular": "^3.9.5", "ionic-angular": "^3.9.10",
"phonegap-plugin-multidex": "^1.0.0", "phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "^2.3.0", "phonegap-plugin-push": "^2.3.0",
"rxjs": "~6.5.1", "rxjs": "~6.6.0",
"rxjs-compat": "^6.5.2", "rxjs-compat": "^6.6.7",
"tslib": "^1.9.0", "tslib": "^2.2.0",
"zone.js": "~0.8.29" "zone.js": "~0.11.4"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/architect": "~0.13.8", "@angular-devkit/build-angular": "~12.1.1",
"@angular-devkit/build-angular": "~0.13.8", "@angular-eslint/builder": "~12.0.0",
"@angular-devkit/core": "~7.3.8", "@angular-eslint/eslint-plugin": "~12.0.0",
"@angular-devkit/schematics": "~7.3.8", "@angular-eslint/eslint-plugin-template": "~12.0.0",
"@angular/cli": "~7.3.8", "@angular-eslint/template-parser": "~12.0.0",
"@angular/compiler": "~7.2.2", "@angular/cli": "~12.1.1",
"@angular/compiler-cli": "~7.2.2", "@angular/compiler": "~12.1.1",
"@angular/language-service": "~7.2.2", "@angular/compiler-cli": "~12.1.1",
"@ionic/angular-toolkit": "~1.5.1", "@angular/language-service": "~12.0.1",
"@types/jasmine": "~2.8.8", "@capacitor/cli": "3.2.4",
"@ionic/angular-toolkit": "^4.0.0",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "~12.0.0", "@types/node": "^12.11.1",
"codelyzer": "~4.5.0", "@typescript-eslint/eslint-plugin": "4.16.1",
"cordova-plugin-device": "^2.0.2", "@typescript-eslint/parser": "4.16.1",
"cordova-plugin-ionic-keyboard": "^2.1.3", "eslint": "^7.6.0",
"cordova-plugin-ionic-webview": "^4.0.1", "eslint-plugin-import": "2.22.1",
"cordova-plugin-splashscreen": "^5.0.2", "eslint-plugin-jsdoc": "30.7.6",
"cordova-plugin-statusbar": "^2.4.2", "eslint-plugin-prefer-arrow": "1.2.2",
"cordova-plugin-whitelist": "^1.3.3", "jasmine-core": "~3.8.0",
"jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~5.0.0",
"jasmine-spec-reporter": "~4.2.1", "karma": "~6.3.2",
"karma": "~4.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-chrome-launcher": "~2.2.0", "karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "~2.0.1", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~1.1.2", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~5.4.0", "protractor": "~7.0.0",
"ts-node": "~8.1.0", "ts-node": "~8.3.0",
"tslint": "~5.16.0", "typescript": "~4.2.4"
"typescript": "~3.1.6"
}, },
"description": "An Ionic project", "description": "An Ionic project"
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-sqlite-storage": {},
"cordova-plugin-datepicker": {},
"cordova-plugin-file": {},
"cordova-plugin-file-opener2": {},
"cordova-plugin-android-permissions": {},
"cordova-plugin-email-composer": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-x-socialsharing": {
"ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
},
"phonegap-plugin-push": {}
},
"platforms": [
"android",
"browser"
]
}
} }
...@@ -3,11 +3,12 @@ import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; ...@@ -3,11 +3,12 @@ import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [ const routes: Routes = [
{ path: '', redirectTo: 'login', pathMatch: 'full' }, { path: '', redirectTo: 'login', pathMatch: 'full' },
{ path: 'home', loadChildren: '../app/pages/home/home.module#HomePageModule' }, { path: 'home', loadChildren: () => import('../app/pages/home/home.module').then(m => m.HomePageModule) },
{ path: 'login', loadChildren: '../app/auth/pages/login/login.module#LoginPageModule' }, { path: 'login', loadChildren: () => import('../app/auth/pages/login/login.module').then(m => m.LoginPageModule) },
{ path: 'reset', loadChildren: '../app/auth/pages/reset/reset.module#ResetPageModule' }, { path: 'reset', loadChildren: () => import('../app/auth/pages/reset/reset.module').then(m => m.ResetPageModule) },
{ path: 'businesscall', loadChildren: '../app/pages/businesscall/businesscall.module#BusinesscallPageModule' }, { path: 'businesscall', loadChildren: () => import('../app/pages/businesscall/businesscall.module').then(m => m.BusinesscallPageModule) },
{ path: 'privacy', loadChildren: '../app/pages/privacy/privacy.module#PrivacyPageModule' }, { path: 'registrazione', loadChildren: './auth/pages/registrazione/registrazione.module#RegistrazionePageModule' } { path: 'privacy', loadChildren: () => import('../app/pages/privacy/privacy.module').then(m => m.PrivacyPageModule) },
{ path: 'registrazione', loadChildren: () => import('./auth/pages/registrazione/registrazione.module').then(m => m.RegistrazionePageModule) }
......
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Platform, MenuController } from '@ionic/angular'; import { MenuController } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AuthService } from './auth/service/auth.service'; import { AuthService } from './auth/service/auth.service';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { AndroidPermissions } from '@ionic-native/android-permissions/ngx';
import { UtilService } from './service/util.service'; import { UtilService } from './service/util.service';
import { Storage } from '@ionic/storage-angular';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
...@@ -14,20 +12,24 @@ import { UtilService } from './service/util.service'; ...@@ -14,20 +12,24 @@ import { UtilService } from './service/util.service';
}) })
export class AppComponent { export class AppComponent {
constructor( constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private router: Router, private router: Router,
private authService: AuthService, private authService: AuthService,
private utilService: UtilService, private utilService: UtilService,
private androidPermissions: AndroidPermissions, public menuCtrl: MenuController,
public menuCtrl: MenuController private storage: Storage,
) { ) {
this.initializeApp(); this.initializeApp();
} }
created : boolean = false;
async initializeApp() { async initializeApp() {
if(!this.created)
{
await this.storage.create();
this.created = true;
}
this.utilService.loadLingua(); this.utilService.loadLingua();
this.utilService.initConfig(false, 'notifiche'); this.utilService.initConfig(false, 'notifiche');
} }
......
<ion-nav [root]="rootPage"></ion-nav>
...@@ -8,7 +8,6 @@ import { StatusBar } from '@ionic-native/status-bar/ngx'; ...@@ -8,7 +8,6 @@ import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { IonicStorageModule } from '@ionic/storage';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
import { DatePicker } from '@ionic-native/date-picker/ngx'; import { DatePicker } from '@ionic-native/date-picker/ngx';
...@@ -22,6 +21,7 @@ import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; ...@@ -22,6 +21,7 @@ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Push } from '@ionic-native/push/ngx'; import { Push } from '@ionic-native/push/ngx';
import { IonicStorageModule } from '@ionic/storage-angular';
export function createTranslateLoader(http: HttpClient) { export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/', '.json'); return new TranslateHttpLoader(http, './assets/i18n/', '.json');
......
// http://ionicframework.com/docs/theming/
// App Global Sass
// --------------------------------------------------
// Put style rules here that you want to apply globally. These
// styles are for the entire app and not just one component.
// Additionally, this file can be also used as an entry point
// to import other Sass files to be included in the output CSS.
//
// Shared Sass variables, which can be used to adjust Ionic's
// default Sass variables, belong in "theme/variables.scss".
//
// To declare rules for a specific mode, create a child rule
// for the .md, .ios, or .wp mode classes. The mode class is
// automatically applied to the <body> element in the app.
...@@ -6,7 +6,9 @@ import { AuthService } from '../../service/auth.service'; ...@@ -6,7 +6,9 @@ import { AuthService } from '../../service/auth.service';
import { ErrorResponse } from '../../interface/error-response'; import { ErrorResponse } from '../../interface/error-response';
import { UtilService } from '../../../service/util.service'; import { UtilService } from '../../../service/util.service';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Platform, Events } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { EventsService } from 'src/app/service/events.service';
import { environment } from 'src/environments/environment';
@Component({ @Component({
selector: 'app-change-pwd', selector: 'app-change-pwd',
...@@ -20,14 +22,16 @@ export class ChangePwdPage implements OnInit { ...@@ -20,14 +22,16 @@ export class ChangePwdPage implements OnInit {
private router: Router, private router: Router,
public platform: Platform, public platform: Platform,
private utilService: UtilService, private utilService: UtilService,
public translate: TranslateService, public translate: TranslateService) {
public events: Events) { this.eventsIdle();
}
this.events.subscribe('functionCall:linguaCambiata', eventData => {
translate = utilService.translate;
});
translate = utilService.translate;
eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
this.eventsIdle();
}, environment.eventsTime);
} }
change(form){ change(form){
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<ion-row> <ion-row>
<ion-label class="label-border-desktop" style="margin-top: 8px;">{{ 'lingua_selezionata' | translate }}</ion-label> <ion-label class="label-border-desktop" style="margin-top: 8px;">{{ 'lingua_selezionata' | translate }}</ion-label>
<ion-select placeholder="{{linguaSel}}" (ionChange)="cambiaLingua()" interface="popover" title="{{ 'seleziona_lingua' | translate }}"> <ion-select placeholder="{{linguaSel}}" (ionChange)="cambiaLingua()" interface="popover" title="{{ 'seleziona_lingua' | translate }}">
<ion-select-option *ngFor="let lingua of lingue; let i=index;" [value]="lingua.key" [selected]="i === 0">{{lingua.value}}</ion-select-option> <ion-select-option *ngFor="let lingua of lingue; let i=index;" [value]="lingua.key">{{lingua.value}}</ion-select-option>
</ion-select> </ion-select>
</ion-row> </ion-row>
</ion-col> </ion-col>
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<ion-row> <ion-row>
<ion-label class="label-border-desktop" style="margin-top: 8px;">{{ 'lingua_selezionata' | translate }}</ion-label> <ion-label class="label-border-desktop" style="margin-top: 8px;">{{ 'lingua_selezionata' | translate }}</ion-label>
<ion-select placeholder="{{linguaSel}}" (ionChange)="cambiaLingua()" interface="popover" title="{{ 'seleziona_lingua' | translate }}"> <ion-select placeholder="{{linguaSel}}" (ionChange)="cambiaLingua()" interface="popover" title="{{ 'seleziona_lingua' | translate }}">
<ion-select-option *ngFor="let lingua of lingue; let i=index;" [value]="lingua.key" [selected]="i === 0">{{lingua.value}}</ion-select-option> <ion-select-option *ngFor="let lingua of lingue; let i=index;" [value]="lingua.key">{{lingua.value}}</ion-select-option>
</ion-select> </ion-select>
</ion-row> </ion-row>
</ion-col> </ion-col>
......
...@@ -3,9 +3,11 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; ...@@ -3,9 +3,11 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { AuthService } from '../../service/auth.service'; import { AuthService } from '../../service/auth.service';
import { UtilService } from '../../../service/util.service'; import { UtilService } from '../../../service/util.service';
import { Platform, Events } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { Pair } from 'src/app/interface/pair'; import { Pair } from 'src/app/interface/pair';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { environment } from 'src/environments/environment';
import { EventsService } from 'src/app/service/events.service';
@Component({ @Component({
selector: 'app-login', selector: 'app-login',
...@@ -19,14 +21,11 @@ export class LoginPage implements OnInit { ...@@ -19,14 +21,11 @@ export class LoginPage implements OnInit {
private authService: AuthService, private authService: AuthService,
private router: Router, private router: Router,
private utilService: UtilService, private utilService: UtilService,
public events: Events,
public platform: Platform, public platform: Platform,
public translate: TranslateService public translate: TranslateService
) )
{ {
this.events.subscribe('functionCall:linguaCambiata', eventData => { this.eventsIdle();
translate = utilService.translate;
});
this.lingue = utilService.getLanguageList(); this.lingue = utilService.getLanguageList();
if(utilService.getLingua() == "") { if(utilService.getLingua() == "") {
this.linguaSel = this.lingue[0].key; this.linguaSel = this.lingue[0].key;
...@@ -36,7 +35,14 @@ export class LoginPage implements OnInit { ...@@ -36,7 +35,14 @@ export class LoginPage implements OnInit {
} }
else this.linguaSel = utilService.getLingua(); else this.linguaSel = utilService.getLingua();
translate = utilService.translate; translate = utilService.translate;
this.events.publish('functionCall:linguaCambiata', null); }
eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
this.eventsIdle();
}, environment.eventsTime);
} }
linguaSel : string; linguaSel : string;
...@@ -47,7 +53,6 @@ export class LoginPage implements OnInit { ...@@ -47,7 +53,6 @@ export class LoginPage implements OnInit {
this.utilService.setLingua(this.linguaSel); this.utilService.setLingua(this.linguaSel);
this.utilService.translate.setDefaultLang(this.linguaSel); this.utilService.translate.setDefaultLang(this.linguaSel);
this.utilService.translate.use(this.linguaSel); this.utilService.translate.use(this.linguaSel);
this.events.publish('functionCall:linguaCambiata', null);
} }
async login(form){ async login(form){
...@@ -64,8 +69,8 @@ export class LoginPage implements OnInit { ...@@ -64,8 +69,8 @@ export class LoginPage implements OnInit {
else this.utilService.pushNotification(AuthService.idCliente); else this.utilService.pushNotification(AuthService.idCliente);
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.utilService.redirectToFirstPage('notifiche'); this.utilService.redirectToFirstPage('notifiche');
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
this.events.publish('functionCall:updateStrutture', null); EventsService.setUpdateStrutture();
} }
}, },
(error: ErrorResponse) => { (error: ErrorResponse) => {
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { UtilService } from 'src/app/service/util.service'; import { UtilService } from 'src/app/service/util.service';
import { Platform, Events } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { AuthService } from '../../service/auth.service'; import { AuthService } from '../../service/auth.service';
import { ErrorResponse } from '../../interface/error-response'; import { ErrorResponse } from '../../interface/error-response';
import { FormControl, Validators, FormGroup } from '@angular/forms'; import { FormControl, Validators, FormGroup } from '@angular/forms';
import { environment } from 'src/environments/environment';
import { EventsService } from 'src/app/service/events.service';
@Component({ @Component({
selector: 'app-registrazione', selector: 'app-registrazione',
...@@ -17,20 +19,24 @@ export class RegistrazionePage implements OnInit { ...@@ -17,20 +19,24 @@ export class RegistrazionePage implements OnInit {
constructor( constructor(
private authService: AuthService, private authService: AuthService,
private router: Router, private router: Router,
public events: Events,
public platform: Platform, public platform: Platform,
private utilService: UtilService, private utilService: UtilService,
public translate: TranslateService public translate: TranslateService
) { ) {
this.events.subscribe('functionCall:linguaCambiata', eventData => { this.eventsIdle();
translate = utilService.translate;
});
translate = utilService.translate;
} }
ngOnInit() { ngOnInit() {
} }
eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
this.eventsIdle();
}, environment.eventsTime);
}
registra(form){ registra(form){
this.utilService.showLoading(); this.utilService.showLoading();
this.authService.registra(form.value).subscribe((res: ErrorResponse)=>{ this.authService.registra(form.value).subscribe((res: ErrorResponse)=>{
...@@ -45,8 +51,8 @@ export class RegistrazionePage implements OnInit { ...@@ -45,8 +51,8 @@ export class RegistrazionePage implements OnInit {
else this.utilService.pushNotification(AuthService.idCliente); else this.utilService.pushNotification(AuthService.idCliente);
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.utilService.redirectToFirstPage('notifiche'); this.utilService.redirectToFirstPage('notifiche');
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
this.events.publish('functionCall:updateStrutture', null); EventsService.setUpdateStrutture();
} }
}, },
(error: ErrorResponse) => { (error: ErrorResponse) => {
......
...@@ -4,8 +4,9 @@ import { Router } from "@angular/router"; ...@@ -4,8 +4,9 @@ import { Router } from "@angular/router";
import { AuthService } from '../../service/auth.service'; import { AuthService } from '../../service/auth.service';
import { ErrorResponse } from './../../interface/error-response'; import { ErrorResponse } from './../../interface/error-response';
import { UtilService } from '../../../service/util.service'; import { UtilService } from '../../../service/util.service';
import { Events, Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { environment } from 'src/environments/environment';
@Component({ @Component({
selector: 'app-reset', selector: 'app-reset',
...@@ -17,17 +18,21 @@ export class ResetPage implements OnInit { ...@@ -17,17 +18,21 @@ export class ResetPage implements OnInit {
constructor( constructor(
private authService: AuthService, private authService: AuthService,
private router: Router, private router: Router,
public events: Events,
public platform: Platform, public platform: Platform,
private utilService: UtilService, private utilService: UtilService,
public translate: TranslateService public translate: TranslateService
) { ) {
this.events.subscribe('functionCall:linguaCambiata', eventData => { this.eventsIdle();
translate = utilService.translate;
}); }
translate = utilService.translate;
eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
this.eventsIdle();
}, environment.eventsTime);
} }
reset(form){ reset(form){
......
...@@ -4,13 +4,12 @@ import { Injectable } from '@angular/core'; ...@@ -4,13 +4,12 @@ import { Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse} from '@angular/common/http'; import { HttpClient, HttpErrorResponse} from '@angular/common/http';
import { tap, catchError } from 'rxjs/operators'; import { tap, catchError } from 'rxjs/operators';
import { Observable, BehaviorSubject, of} from 'rxjs'; import { Observable, BehaviorSubject, of} from 'rxjs';
import { Storage } from '@ionic/storage';
import { AuthResponse } from '../interface/auth-response'; import { AuthResponse } from '../interface/auth-response';
import { UtilService } from '../../service/util.service'; import { UtilService } from '../../service/util.service';
import { HttpClientDataService } from '../../service/http-client-data.service'; import { HttpClientDataService } from '../../service/http-client-data.service';
import { Platform, Events } from '@ionic/angular'; import { environment } from 'src/environments/environment';
import { environment } from '../../../environments/environment'; import { EventsService } from 'src/app/service/events.service';
import { Storage } from '@ionic/storage-angular';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -23,7 +22,6 @@ export class AuthService { ...@@ -23,7 +22,6 @@ export class AuthService {
private httpClient: HttpClient, private httpClient: HttpClient,
private storage: Storage, private storage: Storage,
private httpClientDataService: HttpClientDataService, private httpClientDataService: HttpClientDataService,
private events: Events,
private utilService: UtilService private utilService: UtilService
) )
{ {
...@@ -179,7 +177,7 @@ export class AuthService { ...@@ -179,7 +177,7 @@ export class AuthService {
this.storage.set("isCliente", res.cliente); this.storage.set("isCliente", res.cliente);
this.storage.set("clienti", res.clienti).then((successData)=>{ this.storage.set("clienti", res.clienti).then((successData)=>{
this.clientiSalvati = true; this.clientiSalvati = true;
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
}); });
this.storage.set("logged",true); this.storage.set("logged",true);
this.errorRespose.error = false; this.errorRespose.error = false;
...@@ -213,7 +211,7 @@ export class AuthService { ...@@ -213,7 +211,7 @@ export class AuthService {
this.storage.set("isCliente", res.cliente); this.storage.set("isCliente", res.cliente);
this.storage.set("clienti", res.clienti).then((successData)=>{ this.storage.set("clienti", res.clienti).then((successData)=>{
this.clientiSalvati = true; this.clientiSalvati = true;
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
}); });
this.storage.set("logged",true); this.storage.set("logged",true);
this.errorRespose.error = false; this.errorRespose.error = false;
...@@ -245,7 +243,8 @@ export class AuthService { ...@@ -245,7 +243,8 @@ export class AuthService {
this.storage.set("logged",false).then((successData)=>{ this.storage.set("logged",false).then((successData)=>{
console.log("Data Stored"); console.log("Data Stored");
console.log(successData); console.log(successData);
}) });
this.storage.clear();
this.authSubject.next(false); this.authSubject.next(false);
this.utilService.sendRegistration(AuthService.idReferente, '', '', !AuthService.isClienteLoggato); this.utilService.sendRegistration(AuthService.idReferente, '', '', !AuthService.isClienteLoggato);
} }
......
<div id="container">
<strong>{{ name }}</strong>
<p>Explore <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
</div>
\ No newline at end of file
#container {
text-align: center;
position: absolute;
left: 0;
right: 0;
top: 50%;
transform: translateY(-50%);
}
#container strong {
font-size: 20px;
line-height: 26px;
}
#container p {
font-size: 16px;
line-height: 22px;
color: #8c8c8c;
margin: 0;
}
#container a {
text-decoration: none;
}
\ No newline at end of file
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { ExploreContainerComponent } from './explore-container.component';
describe('ExploreContainerComponent', () => {
let component: ExploreContainerComponent;
let fixture: ComponentFixture<ExploreContainerComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ExploreContainerComponent ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(ExploreContainerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-explore-container',
templateUrl: './explore-container.component.html',
styleUrls: ['./explore-container.component.scss'],
})
export class ExploreContainerComponent implements OnInit {
@Input() name: string;
constructor() { }
ngOnInit() {}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { ExploreContainerComponent } from './explore-container.component';
@NgModule({
imports: [ CommonModule, FormsModule, IonicModule],
declarations: [ExploreContainerComponent],
exports: [ExploreContainerComponent]
})
export class ExploreContainerComponentModule {}
import { Pair } from "./pair"; import { Pair } from "./pair";
export interface DocumentiRequest { export interface DocumentiRequest {
referente: number;
cliente: number; cliente: number;
limite: number; limite: number;
struttura:number; struttura:number;
......
import { DocumentiRequest } from './documenti-request';
export interface TitoliDocumentiResponse {
cliente: DocumentiRequest;
error: string;
titoli: string[];
}
<ion-header>
<ion-navbar>
<ion-title>
About
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-about',
templateUrl: 'about.html'
})
export class AboutPage {
constructor(public navCtrl: NavController) {
}
}
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Events } from '@ionic/angular';
import { InAppBrowser, InAppBrowserOptions } from '@ionic-native/in-app-browser/ngx'; import { InAppBrowser, InAppBrowserOptions } from '@ionic-native/in-app-browser/ngx';
import { EventsService } from 'src/app/service/events.service';
@Component({ @Component({
selector: 'app-bi', selector: 'app-bi',
...@@ -27,8 +27,8 @@ export class BiPage implements OnInit { ...@@ -27,8 +27,8 @@ export class BiPage implements OnInit {
//fullscreen : 'yes',//Windows only //fullscreen : 'yes',//Windows only
}; };
constructor(public events: Events, private iab: InAppBrowser) { constructor(private iab: InAppBrowser) {
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
const browser = this.iab.create('https://ionicframework.com/', "_blank", this.options); const browser = this.iab.create('https://ionicframework.com/', "_blank", this.options);
} }
......
...@@ -2,8 +2,9 @@ import { Component, OnInit, ElementRef } from '@angular/core'; ...@@ -2,8 +2,9 @@ import { Component, OnInit, ElementRef } from '@angular/core';
import { EmailComposer } from '@ionic-native/email-composer/ngx'; import { EmailComposer } from '@ionic-native/email-composer/ngx';
import { UtilService } from '../../service/util.service'; import { UtilService } from '../../service/util.service';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { Events, Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { environment } from 'src/environments/environment';
@Component({ @Component({
selector: 'app-businesscall', selector: 'app-businesscall',
...@@ -17,17 +18,21 @@ export class BusinesscallPage implements OnInit { ...@@ -17,17 +18,21 @@ export class BusinesscallPage implements OnInit {
private router: Router, private router: Router,
private utilService: UtilService, private utilService: UtilService,
public element:ElementRef, public element:ElementRef,
public events: Events,
public platform: Platform, public platform: Platform,
public translate: TranslateService) { public translate: TranslateService) {
this.events.subscribe('functionCall:linguaCambiata', eventData => { this.eventsIdle();
translate = utilService.translate;
});
translate = utilService.translate;
} }
eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
this.eventsIdle();
}, environment.eventsTime);
}
ngOnInit() { ngOnInit() {
} }
......
<ion-header>
<ion-navbar>
<ion-title>
Contact
</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-list-header>Follow us on Twitter</ion-list-header>
<ion-item>
<ion-icon name="ionic" item-start></ion-icon>
@ionicframework
</ion-item>
</ion-list>
</ion-content>
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-contact',
templateUrl: 'contact.html'
})
export class ContactPage {
constructor(public navCtrl: NavController) {
}
}
...@@ -46,12 +46,25 @@ ...@@ -46,12 +46,25 @@
<ion-row> <ion-row>
<div class="search-date-smart"> <div class="search-date-smart">
<ion-row> <ion-row>
<span class="riga"><strong>{{ 'cerca' | translate }}</strong> {{ 'titolo' | translate }} <input type="text" name="calendar" [(ngModel)]="titolo" title="{{ 'ricerca_titolo' | translate }}" class="cerca-titolo-doc"> <span class="riga"><strong>{{ 'cerca' | translate }}</strong> {{ 'titolo' | translate }}
<input type="text" name="calendar" [(ngModel)]="titolo" title="{{ 'ricerca_titolo' | translate }}" class="cerca-titolo-doc">
</span> </span>
<ion-button (click)="cercaDocumenti()" class="search-arrow" title="{{ 'cerca_documenti' | translate }}"> <ion-button (click)="cercaDocumenti()" class="search-arrow" title="{{ 'cerca_documenti' | translate }}">
<ion-icon class="button-icon-documenti-smart ios-icon" slot="icon-only" name="ios-arrow-dropright-circle" title="{{ 'cerca_documenti' | translate }}"></ion-icon> <ion-icon class="button-icon-documenti-smart ios-icon" slot="icon-only" name="ios-arrow-dropright-circle" title="{{ 'cerca_documenti' | translate }}"></ion-icon>
</ion-button> </ion-button>
</ion-row> </ion-row>
<ion-row class="riga-doc">
<strong>{{ 'cerca' | translate }}</strong>
{{ 'titolo' | translate }}
<!--<input type="text" name="calendar" [(ngModel)]="titolo" title="{{ 'ricerca_titolo' | translate }}" class="cerca-titolo-doc" />-->
<ion-select (ionChange)="cercaDocumenti()" value="titolo" [(ngModel)]="titolo" interface="popover" title="{{ 'ricerca_titolo' | translate }}" class="cerca-titolo-doc">
<ion-select-option value=""></ion-select-option>
<ion-select-option *ngFor="let tit of titoli; let i=index;" value="{{tit}}">{{tit}}</ion-select-option>
</ion-select>
<ion-button (click)="cercaDocumenti()" class="search-arrow" title="{{ 'cerca_documenti' | translate }}">
<ion-icon class="button-icon-documenti ios-icon" slot="icon-only" name="ios-arrow-dropright-circle" title="{{ 'cerca_documenti' | translate }}"></ion-icon>
</ion-button>
</ion-row>
</div> </div>
</ion-row> </ion-row>
<ion-row id="buttonsDoc" style="display: none;"> <ion-row id="buttonsDoc" style="display: none;">
...@@ -120,14 +133,18 @@ ...@@ -120,14 +133,18 @@
<ion-icon class="button-icon-documenti ios-icon" slot="icon-only" name="ios-arrow-dropright-circle" title="{{ 'cerca_documenti' | translate }}"></ion-icon> <ion-icon class="button-icon-documenti ios-icon" slot="icon-only" name="ios-arrow-dropright-circle" title="{{ 'cerca_documenti' | translate }}"></ion-icon>
</ion-button> </ion-button>
</div> </div>
<div class="riga"> <ion-row class="riga-doc">
<strong>{{ 'cerca' | translate }}</strong> <strong>{{ 'cerca' | translate }}</strong>
{{ 'titolo' | translate }} {{ 'titolo' | translate }}
<input type="text" name="calendar" [(ngModel)]="titolo" title="{{ 'ricerca_titolo' | translate }}" class="cerca-titolo-doc" /> <!--<input type="text" name="calendar" [(ngModel)]="titolo" title="{{ 'ricerca_titolo' | translate }}" class="cerca-titolo-doc" />-->
<ion-select (ionChange)="cercaDocumenti()" value="titolo" [(ngModel)]="titolo" interface="popover" title="{{ 'ricerca_titolo' | translate }}" class="cerca-titolo-doc">
<ion-select-option value=""></ion-select-option>
<ion-select-option *ngFor="let tit of titoli; let i=index;" value="{{tit}}">{{tit}}</ion-select-option>
</ion-select>
<ion-button (click)="cercaDocumenti()" class="search-arrow" title="{{ 'cerca_documenti' | translate }}"> <ion-button (click)="cercaDocumenti()" class="search-arrow" title="{{ 'cerca_documenti' | translate }}">
<ion-icon class="button-icon-documenti ios-icon" slot="icon-only" name="ios-arrow-dropright-circle" title="{{ 'cerca_documenti' | translate }}"></ion-icon> <ion-icon class="button-icon-documenti ios-icon" slot="icon-only" name="ios-arrow-dropright-circle" title="{{ 'cerca_documenti' | translate }}"></ion-icon>
</ion-button> </ion-button>
</div> </ion-row>
</ion-row> </ion-row>
</div> </div>
</ion-row> </ion-row>
......
...@@ -9,9 +9,12 @@ import { AuthService } from 'src/app/auth/service/auth.service'; ...@@ -9,9 +9,12 @@ import { AuthService } from 'src/app/auth/service/auth.service';
import { ErrorResponse } from '../../auth/interface/error-response'; import { ErrorResponse } from '../../auth/interface/error-response';
import { DocumentiRequest } from '../../interface/documenti-request'; import { DocumentiRequest } from '../../interface/documenti-request';
import { DatePicker } from '@ionic-native/date-picker/ngx'; import { DatePicker } from '@ionic-native/date-picker/ngx';
import { Platform, Events } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { EventsService } from 'src/app/service/events.service';
import { environment } from 'src/environments/environment';
import { TitoliDocumentiResponse } from 'src/app/interface/titolidocumenti-response';
@Component({ @Component({
selector: 'app-documenti', selector: 'app-documenti',
...@@ -27,7 +30,6 @@ export class DocumentiPage implements OnInit { ...@@ -27,7 +30,6 @@ export class DocumentiPage implements OnInit {
private utilService: UtilService, private utilService: UtilService,
private datePicker: DatePicker, private datePicker: DatePicker,
public platform: Platform, public platform: Platform,
public events: Events,
private router: Router, private router: Router,
public httpClientDataService: HttpClientDataService, public httpClientDataService: HttpClientDataService,
public translate: TranslateService public translate: TranslateService
...@@ -40,15 +42,23 @@ export class DocumentiPage implements OnInit { ...@@ -40,15 +42,23 @@ export class DocumentiPage implements OnInit {
this.date1 = ""; this.date1 = "";
this.date2 = ""; this.date2 = "";
this.titolo = ""; this.titolo = "";
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
if(AuthService.clienteSelezionato.id != null) this.chiediDocumenti("initial"); if(AuthService.clienteSelezionato.id != null) this.chiediDocumenti("initial");
this.events.subscribe('functionCall:clienteCambiato', eventData => { this.recuperaTitoli();
this.eventsIdle();
}
eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
if(EventsService.clienteCambiato)
{
this.chiediDocumenti("initial"); this.chiediDocumenti("initial");
}); this.recuperaTitoli();
this.events.subscribe('functionCall:linguaCambiata', eventData => { }
translate = utilService.translate; this.eventsIdle();
}); }, environment.eventsTime);
translate = utilService.translate;
} }
setDateDa() setDateDa()
...@@ -89,6 +99,7 @@ export class DocumentiPage implements OnInit { ...@@ -89,6 +99,7 @@ export class DocumentiPage implements OnInit {
idSelected: number; idSelected: number;
selection: boolean = false; selection: boolean = false;
clickCheckbox: boolean = false; clickCheckbox: boolean = false;
titoli: string[];
toggleGroup(id : number) toggleGroup(id : number)
{ {
...@@ -194,9 +205,34 @@ export class DocumentiPage implements OnInit { ...@@ -194,9 +205,34 @@ export class DocumentiPage implements OnInit {
//this.utilService.shareDocumento(documento.url, documento.nomeFile); //this.utilService.shareDocumento(documento.url, documento.nomeFile);
} }
chiediDocumenti(fase) recuperaTitoli()
{ {
var request: DocumentiRequest;
this.idCliente = AuthService.clienteSelezionato.id;
var idReferente = AuthService.idReferente;
var strutturaSel = this.utilService.getStrutturaSel();
if(strutturaSel == null) return;
this.utilService.showLoading(); this.utilService.showLoading();
request = this.docService.createTitoloRequest(idReferente, this.idCliente,strutturaSel.id);
this.docService.getTitoli(request).subscribe((res: TitoliDocumentiResponse)=>{
this.utilService.closeLoading();
if(res.error){
this.utilService.presentAlert("Errore", "", res.error, ["OK"]);
}
else
{
this.titoli = res.titoli;
}
},
(error: ErrorResponse) => {
this.utilService.closeLoading();
var text = "Errore durante la richiesta di documenti";
this.utilService.stampaErrore(text, error);
});
}
chiediDocumenti(fase)
{
var dataA = null; var dataA = null;
var dataDa = null; var dataDa = null;
var tit = null; var tit = null;
...@@ -205,9 +241,12 @@ export class DocumentiPage implements OnInit { ...@@ -205,9 +241,12 @@ export class DocumentiPage implements OnInit {
if(this.date2 != null && this.date2 != "") dataA = this.utilService.dateFormatConvert(this.date2); if(this.date2 != null && this.date2 != "") dataA = this.utilService.dateFormatConvert(this.date2);
var request: DocumentiRequest; var request: DocumentiRequest;
this.idCliente = AuthService.clienteSelezionato.id; this.idCliente = AuthService.clienteSelezionato.id;
var idReferente = AuthService.idReferente;
var strutturaSel = this.utilService.getStrutturaSel(); var strutturaSel = this.utilService.getStrutturaSel();
if(fase == "initial") request = this.docService.createInitialRequest(this.idCliente, strutturaSel.id); if(strutturaSel == null) return;
else request = this.docService.createRequest(this.idCliente,null,tit,null,dataDa, dataA, strutturaSel.id); this.utilService.showLoading();
if(fase == "initial") request = this.docService.createInitialRequest(idReferente, this.idCliente, strutturaSel.id);
else request = this.docService.createRequest(idReferente, this.idCliente,null,tit,null,dataDa, dataA, strutturaSel.id);
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){
...@@ -238,9 +277,7 @@ export class DocumentiPage implements OnInit { ...@@ -238,9 +277,7 @@ export class DocumentiPage implements OnInit {
back() back()
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<ion-item (click)="apriPagina('change-password')" tappable class="menu-item">{{ 'menu_change' | translate }}</ion-item> <ion-item (click)="apriPagina('change-password')" tappable class="menu-item">{{ 'menu_change' | translate }}</ion-item>
<div class="menu-buttons"> <div class="menu-buttons">
<div *ngIf="showMenuButton"> <div *ngIf="showMenuButton">
<ion-row class="row-content" *ngIf="consultingService != null && idStrutturaSel == consultingService.id" tappable> <ion-row class="row-content" *ngIf="(consultingService != null && idStrutturaSel == consultingService.id) || strutturaName == 'consulting'" tappable>
<div class="div-Consulting background-white" tappable> <div class="div-Consulting background-white" tappable>
<div tappable class="icon" (click)="selectStruttura('servizi')"> <div tappable class="icon" (click)="selectStruttura('servizi')">
<img src="assets/img/MenuServizi.png" tappable/> <img src="assets/img/MenuServizi.png" tappable/>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" <ion-row class="row-content"
*ngIf="consultingService == null || idStrutturaSel != consultingService.id" *ngIf="(consultingService == null || idStrutturaSel != consultingService.id) && strutturaName != 'consulting'"
tappable> tappable>
<div class="div-Consulting background-transparent" tappable> <div class="div-Consulting background-transparent" tappable>
<div tappable class="icon" (click)="selectStruttura('servizi')"> <div tappable class="icon" (click)="selectStruttura('servizi')">
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" *ngIf="realEstateBrokerage != null && idStrutturaSel == realEstateBrokerage.id" tappable> <ion-row class="row-content" *ngIf="(realEstateBrokerage != null && idStrutturaSel == realEstateBrokerage.id) || strutturaName == 'immobiliare'" tappable>
<div class="div-Consulting background-white" tappable> <div class="div-Consulting background-white" tappable>
<div tappable class="icon" (click)="selectStruttura('immobiliare')"> <div tappable class="icon" (click)="selectStruttura('immobiliare')">
<img src="assets/img/MenuImmobiliare.png" tappable/> <img src="assets/img/MenuImmobiliare.png" tappable/>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" <ion-row class="row-content"
*ngIf="realEstateBrokerage == null || idStrutturaSel != realEstateBrokerage.id" *ngIf="(realEstateBrokerage == null || idStrutturaSel != realEstateBrokerage.id) && strutturaName != 'immobiliare'"
tappable> tappable>
<div class="div-Consulting background-transparent" tappable> <div class="div-Consulting background-transparent" tappable>
<div tappable class="icon" (click)="selectStruttura('immobiliare')"> <div tappable class="icon" (click)="selectStruttura('immobiliare')">
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" *ngIf="mediatoreCreditizio != null && idStrutturaSel == mediatoreCreditizio.id" tappable> <ion-row class="row-content" *ngIf="(mediatoreCreditizio != null && idStrutturaSel == mediatoreCreditizio.id) || strutturaName == 'creditizio'" tappable>
<div class="div-Consulting background-white" tappable> <div class="div-Consulting background-white" tappable>
<div tappable class="icon" (click)="selectStruttura('creditizia')"> <div tappable class="icon" (click)="selectStruttura('creditizia')">
<img src="assets/img/MenuCreditizia.png" tappable/> <img src="assets/img/MenuCreditizia.png" tappable/>
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" <ion-row class="row-content"
*ngIf="mediatoreCreditizio == null || idStrutturaSel != mediatoreCreditizio.id" *ngIf="(mediatoreCreditizio == null || idStrutturaSel != mediatoreCreditizio.id) && strutturaName != 'creditizio'"
tappable> tappable>
<div class="div-Consulting background-transparent" tappable> <div class="div-Consulting background-transparent" tappable>
<div tappable class="icon" (click)="selectStruttura('creditizia')"> <div tappable class="icon" (click)="selectStruttura('creditizia')">
...@@ -182,16 +182,6 @@ ...@@ -182,16 +182,6 @@
</div> </div>
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" tappable>
<div class="div-Consulting background-transparent" tappable>
<div tappable class="icon2" (click)="getBC()">
<img src="assets/img/campanaBianca.png" tappable/>
</div>
<div tappable class="section-title title-bianca" (click)="getBC()">
{{ 'business_call' | translate }}
</div>
</div>
</ion-row>
</div> </div>
<!--<ion-list> <!--<ion-list>
<div> <div>
...@@ -242,8 +232,9 @@ ...@@ -242,8 +232,9 @@
</div> </div>
<div class="menu-buttons"> <div class="menu-buttons">
<div *ngIf="showMenuButton"> <div *ngIf="showMenuButton">
<ion-row class="row-content" *ngIf="consultingService != null && idStrutturaSel == consultingService.id" tappable> <ion-row class="row-content"
<div class="div-Consulting background-white" tappable> *ngIf="(consultingService != null && idStrutturaSel == consultingService.id) || strutturaName == 'consulting'"
tappable><div class="div-Consulting background-white" tappable>
<div tappable class="icon" (click)="selectStruttura('servizi')"> <div tappable class="icon" (click)="selectStruttura('servizi')">
<img src="assets/img/MenuServizi.png" tappable/> <img src="assets/img/MenuServizi.png" tappable/>
</div> </div>
...@@ -253,7 +244,7 @@ ...@@ -253,7 +244,7 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" <ion-row class="row-content"
*ngIf="consultingService == null || idStrutturaSel != consultingService.id" *ngIf="(consultingService == null || idStrutturaSel != consultingService.id) && strutturaName != 'consulting'"
tappable> tappable>
<div class="div-Consulting background-transparent" tappable> <div class="div-Consulting background-transparent" tappable>
<div tappable class="icon" (click)="selectStruttura('servizi')"> <div tappable class="icon" (click)="selectStruttura('servizi')">
...@@ -265,8 +256,9 @@ ...@@ -265,8 +256,9 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" *ngIf="realEstateBrokerage != null && idStrutturaSel == realEstateBrokerage.id" tappable> <ion-row class="row-content"
<div class="div-Consulting background-white" tappable> *ngIf="(realEstateBrokerage != null && idStrutturaSel == realEstateBrokerage.id) || strutturaName == 'immobiliare'"
tappable><div class="div-Consulting background-white" tappable>
<div tappable class="icon" (click)="selectStruttura('immobiliare')"> <div tappable class="icon" (click)="selectStruttura('immobiliare')">
<img src="assets/img/MenuImmobiliare.png" tappable/> <img src="assets/img/MenuImmobiliare.png" tappable/>
</div> </div>
...@@ -276,7 +268,7 @@ ...@@ -276,7 +268,7 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" <ion-row class="row-content"
*ngIf="realEstateBrokerage == null || idStrutturaSel != realEstateBrokerage.id" *ngIf="(realEstateBrokerage == null || idStrutturaSel != realEstateBrokerage.id) && strutturaName != 'immobiliare'"
tappable> tappable>
<div class="div-Consulting background-transparent" tappable> <div class="div-Consulting background-transparent" tappable>
<div tappable class="icon" (click)="selectStruttura('immobiliare')"> <div tappable class="icon" (click)="selectStruttura('immobiliare')">
...@@ -288,7 +280,9 @@ ...@@ -288,7 +280,9 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" *ngIf="mediatoreCreditizio != null && idStrutturaSel == mediatoreCreditizio.id" tappable> <ion-row class="row-content"
*ngIf="(mediatoreCreditizio != null && idStrutturaSel == mediatoreCreditizio.id) || strutturaName == 'creditizio'"
tappable>
<div class="div-Consulting background-white" tappable> <div class="div-Consulting background-white" tappable>
<div tappable class="icon" (click)="selectStruttura('creditizia')"> <div tappable class="icon" (click)="selectStruttura('creditizia')">
<img src="assets/img/MenuCreditizia.png" tappable/> <img src="assets/img/MenuCreditizia.png" tappable/>
...@@ -299,7 +293,7 @@ ...@@ -299,7 +293,7 @@
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" <ion-row class="row-content"
*ngIf="mediatoreCreditizio == null || idStrutturaSel != mediatoreCreditizio.id" *ngIf="(mediatoreCreditizio == null || idStrutturaSel != mediatoreCreditizio.id) && strutturaName != 'creditizio'"
tappable> tappable>
<div class="div-Consulting background-transparent" tappable> <div class="div-Consulting background-transparent" tappable>
<div tappable class="icon" (click)="selectStruttura('creditizia')"> <div tappable class="icon" (click)="selectStruttura('creditizia')">
...@@ -321,16 +315,6 @@ ...@@ -321,16 +315,6 @@
</div> </div>
</div> </div>
</ion-row> </ion-row>
<ion-row class="row-content" tappable>
<div class="div-Consulting background-transparent" tappable>
<div tappable class="icon" (click)="getBC()">
<img src="assets/img/campanaBianca.png" tappable/>
</div>
<div tappable class="section-title title-bianca" (click)="getBC()">
{{ 'business_call' | translate }}
</div>
</div>
</ion-row>
</div> </div>
<ion-row> <ion-row>
<ion-buttons (click)="logout()" title="{{'uscita' | translate}}" class="logout-button"> <ion-buttons (click)="logout()" title="{{'uscita' | translate}}" class="logout-button">
......
import { Cliente } from './../../auth/interface/cliente'; import { Cliente } from './../../auth/interface/cliente';
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { Events, MenuController, Platform } from '@ionic/angular'; import { MenuController, Platform } from '@ionic/angular';
import { AuthService } from '../../auth/service/auth.service'; import { AuthService } from '../../auth/service/auth.service';
import { UtilService } from '../../service/util.service'; import { UtilService } from '../../service/util.service';
import { Pair } from 'src/app/interface/pair'; import { Pair } from 'src/app/interface/pair';
...@@ -12,6 +12,7 @@ import { ErrorResponse } from '../../auth/interface/error-response'; ...@@ -12,6 +12,7 @@ import { ErrorResponse } from '../../auth/interface/error-response';
import { environment } from '../../../environments/environment'; import { environment } from '../../../environments/environment';
import { Struttura } from 'src/app/interface/struttura'; import { Struttura } from 'src/app/interface/struttura';
import { ParereResponse } from 'src/app/interface/parere-response'; import { ParereResponse } from 'src/app/interface/parere-response';
import { EventsService } from 'src/app/service/events.service';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
...@@ -23,7 +24,6 @@ export class HomePage { ...@@ -23,7 +24,6 @@ export class HomePage {
private authService: AuthService, private authService: AuthService,
private segreteriaService: SegreteriaService, private segreteriaService: SegreteriaService,
private router: Router, private router: Router,
public events: Events,
public menuCtrl: MenuController, public menuCtrl: MenuController,
private utilService: UtilService, private utilService: UtilService,
public translate: TranslateService, public translate: TranslateService,
...@@ -46,39 +46,7 @@ export class HomePage { ...@@ -46,39 +46,7 @@ export class HomePage {
this.router.navigate(['login']); this.router.navigate(['login']);
} }
});*/ });*/
if(startUp) this.eventsIdle();
this.events.subscribe('functionCall:caricaDati', async eventData => {
this.caricaDati(false);
});
this.events.subscribe('functionCall:startup', async eventData => {
if(this.clienteSelezionato.id == null) {
if(!this.authService.areClientiSalvati())
{
setTimeout(() => {
this.loadClienti()
}, 3000)
}
else this.loadClienti();
}
});
this.events.subscribe('functionCall:linguaCambiata', eventData => {
this.translate = this.utilService.translate;
});
this.events.subscribe('functionCall:parere', eventData => {
this.router.navigateByUrl('home/parere');
});
this.events.subscribe('functionCall:notifica', eventData => {
this.router.navigateByUrl('home/notifiche');
});
this.events.subscribe('functionCall:interviste', eventData => {
this.router.navigateByUrl('home/interviste');
});
this.events.subscribe('functionCall:strutturaSelected', eventData => {
this.strutturaSelected();
});
this.events.subscribe('functionCall:cambiaTitolo', eventData => {
this.titoloPagina = UtilService.titoloPagina;
});
this.lingue = this.utilService.getLanguageList(); this.lingue = this.utilService.getLanguageList();
if(this.utilService.getLingua() == "") { if(this.utilService.getLingua() == "") {
this.linguaSel = this.lingue[0].key; this.linguaSel = this.lingue[0].key;
...@@ -138,10 +106,54 @@ export class HomePage { ...@@ -138,10 +106,54 @@ export class HomePage {
} }
} }
} }
else this.events.publish('functionCall:manageBackButton', null); else EventsService.setManageBackButton();
}); });
} }
eventsIdle()
{
this.translate = this.utilService.translate;
this.titoloPagina = UtilService.titoloPagina;
setTimeout(() => {
if(EventsService.caricaDati) this.caricaDati(false);
if(EventsService.startup)
if(this.clienteSelezionato.id == null) {
if(!this.authService.areClientiSalvati())
{
setTimeout(() => {
this.loadClienti()
}, 3000)
}
else this.loadClienti();
}
if(EventsService.redirect.length > 0) this.redirectTo();
if(EventsService.strutturaSelected) this.strutturaSelected();
this.eventsIdle();
}, environment.eventsTime);
}
redirectTo()
{
switch(EventsService.redirect)
{
case 'pareri':
{
this.router.navigateByUrl('home/parere');
break;
}
case 'notifiche':
{
this.router.navigateByUrl('home/notifiche');
break;
}
case 'interviste':
{
this.router.navigateByUrl('home/interviste');
break;
}
}
}
isTitolo() isTitolo()
{ {
return this.titoloPagina != ''; return this.titoloPagina != '';
...@@ -162,7 +174,7 @@ export class HomePage { ...@@ -162,7 +174,7 @@ export class HomePage {
this.segreteriaService.getStruttureByReferente(AuthService.idReferente, this.tipoStruttura).subscribe((res: StruttureResponse)=>{ this.segreteriaService.getStruttureByReferente(AuthService.idReferente, this.tipoStruttura).subscribe((res: StruttureResponse)=>{
//this.utilService.closeLoading(); //this.utilService.closeLoading();
UtilService.strutture = this.concat(UtilService.strutture, res.strutture); UtilService.strutture = this.concat(UtilService.strutture, res.strutture);
this.events.publish('functionCall:updateStrutture', null); EventsService.setUpdateStrutture();
this.setStrutture(); this.setStrutture();
this.isClienteLoggato = AuthService.isClienteLoggato; this.isClienteLoggato = AuthService.isClienteLoggato;
if(!AuthService.isClienteLoggato && !UtilService.strutture.includes(this.utilService.getStrutturaSel())) if(!AuthService.isClienteLoggato && !UtilService.strutture.includes(this.utilService.getStrutturaSel()))
...@@ -174,7 +186,7 @@ export class HomePage { ...@@ -174,7 +186,7 @@ export class HomePage {
this.utilService.stampaErrore(text, error); this.utilService.stampaErrore(text, error);
}); });
else{ else{
this.events.publish('functionCall:updateStrutture', null); EventsService.setUpdateStrutture();
this.isClienteLoggato = AuthService.isClienteLoggato; this.isClienteLoggato = AuthService.isClienteLoggato;
this.utilService.apriPagina('notifiche'); this.utilService.apriPagina('notifiche');
} }
...@@ -214,66 +226,52 @@ export class HomePage { ...@@ -214,66 +226,52 @@ export class HomePage {
idStrutturaSel: number; idStrutturaSel: number;
titoloPagina: string; titoloPagina: string;
isClienteLoggato: boolean; isClienteLoggato: boolean;
strutturaName: string;
selectStruttura(struttura:string) selectStruttura(struttura:string)
{ {
let ok = false; let ok = false;
let nostruttura = false;
switch(struttura) switch(struttura)
{ {
case "servizi": case "servizi":
{ {
if(this.consultingService != null)
{
this.utilService.setStrutturaSel(this.consultingService); this.utilService.setStrutturaSel(this.consultingService);
this.utilService.setStrutturaName("consulting");
ok = true; ok = true;
}
break; break;
} }
case "immobiliare": case "immobiliare":
{ {
if(this.realEstateBrokerage != null)
{
this.utilService.setStrutturaSel(this.realEstateBrokerage); this.utilService.setStrutturaSel(this.realEstateBrokerage);
ok = true; ok = true;
}
this.utilService.setStrutturaName("immobiliare");
break; break;
} }
case "creditizia": case "creditizia":
{ {
if(this.mediatoreCreditizio != null)
{
this.utilService.setStrutturaSel(this.mediatoreCreditizio); this.utilService.setStrutturaSel(this.mediatoreCreditizio);
ok = true; ok = true;
}
break; this.utilService.setStrutturaName("creditizio");
}
case "notifiche":
{
nostruttura = true;
this.utilService.apriPagina(struttura);
break; break;
} }
} }
if(ok)
{
this.strutturaSelected(); this.strutturaSelected();
this.events.publish('functionCall:strutturaSelectedHome', null); EventsService.setStrutturaSelectedHome();
} EventsService.setClienteCambiato();
else{
if(!nostruttura) this.utilService.stampaAvviso("Struttura non presente in questo profilo");
else if(!this.platform.is("desktop")) this.closeSideMenu();
}
} }
strutturaSelected() strutturaSelected()
{ {
var struttutaSel = this.utilService.getStrutturaSel(); var struttutaSel = this.utilService.getStrutturaSel();
this.idStrutturaSel = struttutaSel.id; if(struttutaSel != null) this.idStrutturaSel = struttutaSel.id;
else this.idStrutturaSel = 0;
this.showMenuButton = true; this.showMenuButton = true;
if(!this.platform.is("desktop")) this.closeSideMenu(); if(!this.platform.is("desktop")) this.closeSideMenu();
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null); this.strutturaName = this.utilService.getStrutturaName();
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
...@@ -305,7 +303,7 @@ export class HomePage { ...@@ -305,7 +303,7 @@ export class HomePage {
this.clienti = AuthService.clienti; this.clienti = AuthService.clienti;
this.isClienteLoggato = AuthService.isClienteLoggato; this.isClienteLoggato = AuthService.isClienteLoggato;
this.clienteSelezionato = AuthService.clienteSelezionato; this.clienteSelezionato = AuthService.clienteSelezionato;
this.events.publish('functionCall:clienteCambiato', null); EventsService.setClienteCambiato();
this.loadStrutture(); this.loadStrutture();
}); });
return true; return true;
...@@ -315,7 +313,7 @@ export class HomePage { ...@@ -315,7 +313,7 @@ export class HomePage {
{ {
this.authService.setCliente(this.clienteSel); this.authService.setCliente(this.clienteSel);
this.clienteSelezionato = AuthService.clienteSelezionato; this.clienteSelezionato = AuthService.clienteSelezionato;
this.events.publish('functionCall:clienteCambiato', null); EventsService.setClienteCambiato();
this.loadStrutture(); this.loadStrutture();
} }
...@@ -324,7 +322,6 @@ export class HomePage { ...@@ -324,7 +322,6 @@ export class HomePage {
this.utilService.setLingua(this.linguaSel); this.utilService.setLingua(this.linguaSel);
this.utilService.translate.setDefaultLang(this.linguaSel); this.utilService.translate.setDefaultLang(this.linguaSel);
this.utilService.translate.use(this.linguaSel); this.utilService.translate.use(this.linguaSel);
this.events.publish('functionCall:linguaCambiata', null);
} }
logout(){ logout(){
......
...@@ -12,7 +12,7 @@ const routes: Routes = [ ...@@ -12,7 +12,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren:'../preview-home/preview-home.module#PreviewHomePageModule' loadChildren:() => import('../preview-home/preview-home.module').then(m => m.PreviewHomePageModule)
} }
] ]
}, },
...@@ -21,7 +21,7 @@ const routes: Routes = [ ...@@ -21,7 +21,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren: '../index/index.module#IndexPageModule' loadChildren: () => import('../index/index.module').then(m => m.IndexPageModule)
} }
] ]
}, },
...@@ -30,7 +30,7 @@ const routes: Routes = [ ...@@ -30,7 +30,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren: '../bi/bi.module#BiPageModule' loadChildren: () => import('../bi/bi.module').then(m => m.BiPageModule)
} }
] ]
}, },
...@@ -39,7 +39,7 @@ const routes: Routes = [ ...@@ -39,7 +39,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren: '../documenti/documenti.module#DocumentiPageModule' loadChildren: () => import('../documenti/documenti.module').then(m => m.DocumentiPageModule)
} }
] ]
}, },
...@@ -48,7 +48,7 @@ const routes: Routes = [ ...@@ -48,7 +48,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren: '../interviste/interviste.module#IntervistePageModule' loadChildren: () => import('../interviste/interviste.module').then(m => m.IntervistePageModule)
} }
] ]
}, },
...@@ -57,7 +57,7 @@ const routes: Routes = [ ...@@ -57,7 +57,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren: '../parere/parere.module#ParerePageModule' loadChildren: () => import('../parere/parere.module').then(m => m.ParerePageModule)
} }
] ]
}, },
...@@ -66,7 +66,7 @@ const routes: Routes = [ ...@@ -66,7 +66,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren: '../segreteria/segreteria.module#SegreteriaPageModule' loadChildren: () => import('../segreteria/segreteria.module').then(m => m.SegreteriaPageModule)
} }
] ]
}, },
...@@ -75,7 +75,7 @@ const routes: Routes = [ ...@@ -75,7 +75,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren: '../../auth/pages/change-pwd/change-pwd.module#ChangePwdPageModule' loadChildren: () => import('../../auth/pages/change-pwd/change-pwd.module').then(m => m.ChangePwdPageModule)
} }
] ]
}, },
...@@ -84,7 +84,7 @@ const routes: Routes = [ ...@@ -84,7 +84,7 @@ const routes: Routes = [
children: [ children: [
{ {
path: '', path: '',
loadChildren: '../notifiche/notifiche.module#NotifichePageModule' loadChildren: () => import('../notifiche/notifiche.module').then(m => m.NotifichePageModule)
} }
] ]
}, },
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Platform,Events } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { UtilService } from '../../service/util.service'; import { UtilService } from '../../service/util.service';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Struttura } from 'src/app/interface/struttura'; import { Struttura } from 'src/app/interface/struttura';
import { environment } from '../../../environments/environment'; import { environment } from '../../../environments/environment';
import { EventsService } from 'src/app/service/events.service';
@Component({ @Component({
selector: 'app-index', selector: 'app-index',
...@@ -13,56 +14,53 @@ import { environment } from '../../../environments/environment'; ...@@ -13,56 +14,53 @@ import { environment } from '../../../environments/environment';
export class IndexPage implements OnInit { export class IndexPage implements OnInit {
constructor( constructor(
public events: Events,
public platform: Platform, public platform: Platform,
private utilService: UtilService, private utilService: UtilService,
public translate: TranslateService) { public translate: TranslateService) {
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
this.events.subscribe('functionCall:linguaCambiata', eventData => { this.eventsIdle();
translate = utilService.translate;
});
translate = utilService.translate;
this.events.subscribe('functionCall:strutturaSelected', eventData => {
this.strutturaSelected();
});
this.events.subscribe('functionCall:strutturaSelectedHome', eventData => {
this.strutturaSelected();
});
this.events.subscribe('functionCall:updateStrutture', eventData => {
this.setStrutture();
});
this.setStrutture(); this.setStrutture();
this.strutturaSelected(); this.strutturaSelected();
} }
eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
if(EventsService.strutturaSelected || EventsService.strutturaSelectedHome) this.strutturaSelected();
if(EventsService.updateStrutture) this.setStrutture();
this.eventsIdle();
}, environment.eventsTime);
}
idStrutturaSel:number; idStrutturaSel:number;
consultingService: Struttura; consultingService: Struttura;
mediatoreCreditizio: Struttura; mediatoreCreditizio: Struttura;
realEstateBrokerage: Struttura; realEstateBrokerage: Struttura;
strutturaName;
strutturaSelected() strutturaSelected()
{ {
var struttutaSel = this.utilService.getStrutturaSel(); var struttutaSel = this.utilService.getStrutturaSel();
this.idStrutturaSel = struttutaSel.id; if(struttutaSel != null) this.idStrutturaSel = struttutaSel.id;
else this.idStrutturaSel = 0;
this.strutturaName = this.utilService.getStrutturaName();
} }
isServizioSelected():boolean isServizioSelected():boolean
{ {
return this.consultingService != null && this.idStrutturaSel == this.consultingService.id; return (this.consultingService != null && this.idStrutturaSel == this.consultingService.id) || this.strutturaName == "consulting";
} }
isCreditiziaSelected():boolean isCreditiziaSelected():boolean
{ {
return this.mediatoreCreditizio != null && this.idStrutturaSel == this.mediatoreCreditizio.id; return (this.mediatoreCreditizio != null && this.idStrutturaSel == this.mediatoreCreditizio.id) || this.strutturaName == "creditizio";
} }
isImmobiliareSelected():boolean isImmobiliareSelected():boolean
{ {
return this.realEstateBrokerage != null && this.idStrutturaSel == this.realEstateBrokerage.id; return (this.realEstateBrokerage != null && this.idStrutturaSel == this.realEstateBrokerage.id) || this.strutturaName == "immobiliare";
} }
setStrutture() setStrutture()
......
...@@ -8,11 +8,13 @@ import { ErrorResponse } from '../../auth/interface/error-response'; ...@@ -8,11 +8,13 @@ import { ErrorResponse } from '../../auth/interface/error-response';
import {IntervisteService} from '../../service/interviste.service'; import {IntervisteService} from '../../service/interviste.service';
import { NewRichiestaResponse } from 'src/app/interface/new-richiesta-response'; import { NewRichiestaResponse } from 'src/app/interface/new-richiesta-response';
import { DatePicker } from '@ionic-native/date-picker/ngx'; import { DatePicker } from '@ionic-native/date-picker/ngx';
import { Platform, Events } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { ParereService } from 'src/app/service/parere.service'; import { ParereService } from 'src/app/service/parere.service';
import { ArchiviaRichiestaResponse } from 'src/app/interface/archivia-richiesta-response'; import { ArchiviaRichiestaResponse } from 'src/app/interface/archivia-richiesta-response';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { EventsService } from 'src/app/service/events.service';
import { environment } from 'src/environments/environment';
@Component({ @Component({
selector: 'app-interviste', selector: 'app-interviste',
...@@ -31,46 +33,44 @@ export class IntervistePage implements OnInit { ...@@ -31,46 +33,44 @@ export class IntervistePage implements OnInit {
private datePicker: DatePicker, private datePicker: DatePicker,
private intervisteService: IntervisteService, private intervisteService: IntervisteService,
public platform: Platform, public platform: Platform,
public events: Events,
public parereService: ParereService, public parereService: ParereService,
public translate: TranslateService, public translate: TranslateService,
public router: Router public router: Router
) { ) {
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
this.initPage(); this.initPage();
if(AuthService.clienteSelezionato.id != null) this.loadTopics("initial"); if(AuthService.clienteSelezionato.id != null) this.loadTopics("initial");
this.events.subscribe('functionCall:clienteCambiato', eventData => { this.eventsIdle();
this.loadTopics("initial"); setTimeout(() => {
}); this.refreshDomande();
this.events.subscribe('functionCall:linguaCambiata', eventData => { }, 60000);
translate = utilService.translate; }
});
translate = utilService.translate;
this.events.subscribe('functionCall:manageBackButton', eventData => { eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
if(EventsService.clienteCambiato) this.loadTopics("initial");
if(EventsService.manageBackButton)
{
if(this.router.url == "/home/interviste") if(this.router.url == "/home/interviste")
{ {
if(this.intervista == "lista") if(this.intervista == "lista")
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
else else
{ {
this.apriLista(); this.apriLista();
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
setTimeout(() => { EventsService.setRedirect('interviste');
this.events.publish('functionCall:interviste', null);
}, 500);
} }
} }
}); }
translate = utilService.translate; this.eventsIdle();
setTimeout(() => { }, environment.eventsTime);
this.refreshDomande();
}, 60000);
} }
topicAttivo: Richiesta; topicAttivo: Richiesta;
...@@ -558,7 +558,6 @@ export class IntervistePage implements OnInit { ...@@ -558,7 +558,6 @@ export class IntervistePage implements OnInit {
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
......
...@@ -3,7 +3,7 @@ import { HttpClientDataService } from './../../service/http-client-data.service' ...@@ -3,7 +3,7 @@ import { HttpClientDataService } from './../../service/http-client-data.service'
import { UtilService } from '../../service/util.service'; import { UtilService } from '../../service/util.service';
import { AuthService } from 'src/app/auth/service/auth.service'; import { AuthService } from 'src/app/auth/service/auth.service';
import { ErrorResponse } from '../../auth/interface/error-response'; import { ErrorResponse } from '../../auth/interface/error-response';
import { Platform, Events, MenuController } from '@ionic/angular'; import { Platform, MenuController } from '@ionic/angular';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { Notifica } from 'src/app/interface/notifica'; import { Notifica } from 'src/app/interface/notifica';
...@@ -13,6 +13,7 @@ import { ArchiviaNotificaResponse } from 'src/app/interface/archivia-notifica-re ...@@ -13,6 +13,7 @@ import { ArchiviaNotificaResponse } from 'src/app/interface/archivia-notifica-re
import { environment } from '../../../environments/environment'; import { environment } from '../../../environments/environment';
import { Cliente } from 'src/app/auth/interface/cliente'; import { Cliente } from 'src/app/auth/interface/cliente';
import { Struttura } from 'src/app/interface/struttura'; import { Struttura } from 'src/app/interface/struttura';
import { EventsService } from 'src/app/service/events.service';
@Component({ @Component({
selector: 'app-notifiche', selector: 'app-notifiche',
...@@ -25,27 +26,35 @@ export class NotifichePage implements OnInit { ...@@ -25,27 +26,35 @@ export class NotifichePage implements OnInit {
public menuCtrl: MenuController, public menuCtrl: MenuController,
private utilService: UtilService, private utilService: UtilService,
public platform: Platform, public platform: Platform,
public events: Events,
private notificheService: NotificheService, private notificheService: NotificheService,
public httpClientDataService: HttpClientDataService, public httpClientDataService: HttpClientDataService,
public translate: TranslateService, public translate: TranslateService,
public router: Router, public router: Router,
public authService: AuthService, public authService: AuthService,
) { ) {
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
this.initPage(); this.initPage();
setTimeout(() => { setTimeout(() => {
this.loadNotifiche(); this.loadNotifiche();
}, 3000); }, 3000);
this.isClienteLoggato = AuthService.isClienteLoggato; this.isClienteLoggato = AuthService.isClienteLoggato;
this.events.subscribe('functionCall:clienteCambiato', eventData => { this.eventsIdle();
setTimeout(() => {
this.refreshNotifiche();
}, 60000);
}
eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
if(EventsService.clienteCambiato)
{
this.isClienteLoggato = AuthService.isClienteLoggato; this.isClienteLoggato = AuthService.isClienteLoggato;
this.loadNotifiche(); this.loadNotifiche();
}); }
this.events.subscribe('functionCall:linguaCambiata', eventData => { if(EventsService.manageBackButton)
translate = utilService.translate; {
});
this.events.subscribe('functionCall:manageBackButton', eventData => {
if(this.router.url == "/home/parere") if(this.router.url == "/home/parere")
{ {
if(this.notifica == "lista") if(this.notifica == "lista")
...@@ -53,7 +62,6 @@ export class NotifichePage implements OnInit { ...@@ -53,7 +62,6 @@ export class NotifichePage implements OnInit {
if(!AuthService.isClienteLoggato) if(!AuthService.isClienteLoggato)
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
} }
...@@ -61,16 +69,12 @@ export class NotifichePage implements OnInit { ...@@ -61,16 +69,12 @@ export class NotifichePage implements OnInit {
{ {
this.apriLista(); this.apriLista();
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
setTimeout(() => { EventsService.setRedirect('notifiche');
this.events.publish('functionCall:notifica', null);
}, 500);
} }
} }
}); }
translate = utilService.translate; this.eventsIdle();
setTimeout(() => { }, environment.eventsTime);
this.refreshNotifiche();
}, 60000);
} }
refreshNotifiche() refreshNotifiche()
...@@ -352,7 +356,6 @@ export class NotifichePage implements OnInit { ...@@ -352,7 +356,6 @@ export class NotifichePage implements OnInit {
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
......
...@@ -11,10 +11,12 @@ import { Richiesta } from 'src/app/interface/richiesta'; ...@@ -11,10 +11,12 @@ import { Richiesta } from 'src/app/interface/richiesta';
import { ParereService } from 'src/app/service/parere.service'; import { ParereService } from 'src/app/service/parere.service';
import { ErrorResponse } from '../../auth/interface/error-response'; import { ErrorResponse } from '../../auth/interface/error-response';
import { NewRichiestaResponse } from 'src/app/interface/new-richiesta-response'; import { NewRichiestaResponse } from 'src/app/interface/new-richiesta-response';
import { Platform, Events, MenuController } from '@ionic/angular'; import { Platform, MenuController } from '@ionic/angular';
import { DataWithFileUploaded } from './../../interface/data-with-file-uploaded'; import { DataWithFileUploaded } from './../../interface/data-with-file-uploaded';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { EventsService } from 'src/app/service/events.service';
import { environment } from 'src/environments/environment';
@Component({ @Component({
selector: 'app-parere', selector: 'app-parere',
...@@ -29,44 +31,44 @@ export class ParerePage implements OnInit { ...@@ -29,44 +31,44 @@ export class ParerePage implements OnInit {
public modalController: ModalController, public modalController: ModalController,
private parereService: ParereService, private parereService: ParereService,
public platform: Platform, public platform: Platform,
public events: Events,
public httpClientDataService: HttpClientDataService, public httpClientDataService: HttpClientDataService,
public translate: TranslateService, public translate: TranslateService,
public router: Router public router: Router
) { ) {
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
this.initPage(); this.initPage();
if(AuthService.clienteSelezionato.id != null) this.loadPareri("initial"); if(AuthService.clienteSelezionato.id != null) this.loadPareri("initial");
this.events.subscribe('functionCall:clienteCambiato', eventData => { this.eventsIdle();
this.loadPareri("initial"); setTimeout(() => {
}); this.refreshPareri();
this.events.subscribe('functionCall:linguaCambiata', eventData => { }, 60000);
translate = utilService.translate; }
});
this.events.subscribe('functionCall:manageBackButton', eventData => { eventsIdle()
{
this.translate = this.utilService.translate;
setTimeout(() => {
if(EventsService.clienteCambiato) this.loadPareri("initial");
if(EventsService.manageBackButton)
{
if(this.router.url == "/home/parere") if(this.router.url == "/home/parere")
{ {
if(this.parere == "lista") if(this.parere == "lista")
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
else else
{ {
this.apriLista(); this.apriLista();
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
setTimeout(() => { EventsService.setRedirect('pareri');
this.events.publish('functionCall:parere', null);
}, 500);
} }
} }
}); }
translate = utilService.translate; this.eventsIdle();
setTimeout(() => { }, environment.eventsTime);
this.refreshPareri();
}, 60000);
} }
refreshPareri() refreshPareri()
...@@ -454,7 +456,6 @@ upload(str:any) ...@@ -454,7 +456,6 @@ upload(str:any)
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Platform, Events } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { AuthService } from 'src/app/auth/service/auth.service'; import { AuthService } from 'src/app/auth/service/auth.service';
import { UtilService } from './../../service/util.service'; import { UtilService } from './../../service/util.service';
import { environment } from '../../../environments/environment'; import { environment } from '../../../environments/environment';
import { Struttura } from 'src/app/interface/struttura'; import { Struttura } from 'src/app/interface/struttura';
import { EventsService } from 'src/app/service/events.service';
@Component({ @Component({
selector: 'app-preview-home', selector: 'app-preview-home',
...@@ -16,19 +17,21 @@ export class PreviewHomePage implements OnInit { ...@@ -16,19 +17,21 @@ export class PreviewHomePage implements OnInit {
constructor( constructor(
private utilService: UtilService, private utilService: UtilService,
public platform: Platform, public platform: Platform,
public events: Events,
public translate: TranslateService, public translate: TranslateService,
public authService:AuthService public authService:AuthService
) )
{ {
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
this.events.subscribe('functionCall:clienteCambiato', eventData => { this.eventsIdle();
this.setStrutture(); }
});
this.events.subscribe('functionCall:linguaCambiata', eventData => { eventsIdle()
translate = utilService.translate; {
}); this.translate = this.utilService.translate;
this.events.subscribe('functionCall:updateStrutture', eventData => { setTimeout(() => {
if(EventsService.clienteCambiato) this.setStrutture();
if(EventsService.updateStrutture)
{
this.setStrutture(); this.setStrutture();
if(this.startup) if(this.startup)
if(UtilService.redirectToNotifiche) if(UtilService.redirectToNotifiche)
...@@ -36,8 +39,9 @@ export class PreviewHomePage implements OnInit { ...@@ -36,8 +39,9 @@ export class PreviewHomePage implements OnInit {
UtilService.redirectToNotifiche = false; UtilService.redirectToNotifiche = false;
this.utilService.apriPagina("notifiche"); this.utilService.apriPagina("notifiche");
} }
}); }
translate = utilService.translate; this.eventsIdle();
}, environment.eventsTime);
} }
consultingService: Struttura; consultingService: Struttura;
...@@ -78,36 +82,30 @@ export class PreviewHomePage implements OnInit { ...@@ -78,36 +82,30 @@ export class PreviewHomePage implements OnInit {
{ {
case "servizi": case "servizi":
{ {
if(this.consultingService != null)
{
this.utilService.setStrutturaSel(this.consultingService); this.utilService.setStrutturaSel(this.consultingService);
ok = true; ok = true;
}
this.utilService.setStrutturaName("consulting");
break; break;
} }
case "immobiliare": case "immobiliare":
{ {
if(this.realEstateBrokerage != null)
{
this.utilService.setStrutturaSel(this.realEstateBrokerage); this.utilService.setStrutturaSel(this.realEstateBrokerage);
ok = true; ok = true;
}
this.utilService.setStrutturaName("immobiliare");
break; break;
} }
case "creditizia": case "creditizia":
{ {
if(this.mediatoreCreditizio != null)
{
this.utilService.setStrutturaSel(this.mediatoreCreditizio); this.utilService.setStrutturaSel(this.mediatoreCreditizio);
ok = true; ok = true;
}
this.utilService.setStrutturaName("creditizio");
break; break;
} }
} }
if(ok) this.events.publish('functionCall:strutturaSelected', null); EventsService.setStrutturaSelected();
else{
this.utilService.stampaAvviso("Struttura non presente in questo profilo");
}
} }
} }
...@@ -10,12 +10,13 @@ import { UtilService } from './../../service/util.service'; ...@@ -10,12 +10,13 @@ import { UtilService } from './../../service/util.service';
import { AuthService } from 'src/app/auth/service/auth.service'; import { AuthService } from 'src/app/auth/service/auth.service';
import { SegreteriaService } from './../../service/segreteria.service'; import { SegreteriaService } from './../../service/segreteria.service';
import { ErrorResponse } from '../../auth/interface/error-response'; import { ErrorResponse } from '../../auth/interface/error-response';
import { Platform, Events } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { DatePicker } from '@ionic-native/date-picker/ngx'; import { DatePicker } from '@ionic-native/date-picker/ngx';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { environment } from '../../../environments/environment'; import { environment } from '../../../environments/environment';
import { InAppBrowser, InAppBrowserOptions } from '@ionic-native/in-app-browser/ngx'; import { InAppBrowser, InAppBrowserOptions } from '@ionic-native/in-app-browser/ngx';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { EventsService } from 'src/app/service/events.service';
@Component({ @Component({
selector: 'app-segreteria', selector: 'app-segreteria',
...@@ -31,28 +32,28 @@ export class SegreteriaPage implements OnInit { ...@@ -31,28 +32,28 @@ export class SegreteriaPage implements OnInit {
public platform: Platform, public platform: Platform,
private datePicker: DatePicker, private datePicker: DatePicker,
public httpClientDataService: HttpClientDataService, public httpClientDataService: HttpClientDataService,
public events: Events,
private router: Router, private router: Router,
public translate: TranslateService, public translate: TranslateService,
private iab: InAppBrowser private iab: InAppBrowser
) )
{ {
this.events.publish('functionCall:startup', null); EventsService.setStartUp();
this.initPage(); this.initPage();
if(AuthService.clienteSelezionato.id != null) if(AuthService.clienteSelezionato.id != null)
{ {
this.loadData(); this.loadData();
} }
this.events.subscribe('functionCall:clienteCambiato', eventData => { this.eventsIdle();
this.loadData(); }
});
this.events.subscribe('functionCall:strutturaSelected', eventData => { eventsIdle()
this.loadStrutture(); {
}); this.translate = this.utilService.translate;
this.events.subscribe('functionCall:linguaCambiata', eventData => { setTimeout(() => {
translate = utilService.translate; if(EventsService.clienteCambiato) this.loadData();
}); if(EventsService.strutturaSelected) this.loadStrutture();
translate = utilService.translate; this.eventsIdle();
}, environment.eventsTime);
} }
loadData() loadData()
...@@ -385,7 +386,6 @@ export class SegreteriaPage implements OnInit { ...@@ -385,7 +386,6 @@ export class SegreteriaPage implements OnInit {
loadFatture(fase) loadFatture(fase)
{ {
this.utilService.showLoading();
var dataA = null; var dataA = null;
var dataDa = null; var dataDa = null;
var numeroN = null; var numeroN = null;
...@@ -399,6 +399,8 @@ export class SegreteriaPage implements OnInit { ...@@ -399,6 +399,8 @@ 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;
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);
this.segreteriaService.getFatture(request).subscribe((res: FattureResponse)=>{ this.segreteriaService.getFatture(request).subscribe((res: FattureResponse)=>{
...@@ -422,7 +424,6 @@ export class SegreteriaPage implements OnInit { ...@@ -422,7 +424,6 @@ export class SegreteriaPage implements OnInit {
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
} }
......
...@@ -8,6 +8,7 @@ import { Observable, of} from 'rxjs'; ...@@ -8,6 +8,7 @@ import { Observable, of} from 'rxjs';
import { HttpClientDataService } from '../service/http-client-data.service'; import { HttpClientDataService } from '../service/http-client-data.service';
import { ErrorResponse } from '../auth/interface/error-response'; import { ErrorResponse } from '../auth/interface/error-response';
import { tap, catchError } from 'rxjs/operators'; import { tap, catchError } from 'rxjs/operators';
import { TitoliDocumentiResponse } from '../interface/titolidocumenti-response';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -22,6 +23,12 @@ export class DocumentiService { ...@@ -22,6 +23,12 @@ export class DocumentiService {
}; };
} }
encodeBodyTitoliDocumenti(params: DocumentiRequest) {
var request = "{\"referente\" : "+params.referente+",\"cliente\" : "+params.cliente+",\"limite\" : "+params.limite+
",\"struttura\" : "+params.struttura+",\"filtri\" : {}}";
return request;
}
encodeBodyDocumenti(params: DocumentiRequest) { encodeBodyDocumenti(params: DocumentiRequest) {
var request = "{\"cliente\" : "+params.cliente+",\"limite\" : "+params.limite+ var request = "{\"cliente\" : "+params.cliente+",\"limite\" : "+params.limite+
",\"struttura\" : "+params.struttura+",\"filtri\" : {"; ",\"struttura\" : "+params.struttura+",\"filtri\" : {";
...@@ -41,7 +48,23 @@ export class DocumentiService { ...@@ -41,7 +48,23 @@ export class DocumentiService {
return request; return request;
} }
createRequest(id, limite, titolo, tipo, daData, aData, strutturaSel): DocumentiRequest createTitoloRequest(idReferente, id: any, strutturaSel: number) {
var request:DocumentiRequest;
var pairs: Pair[] = new Array();
request = {
referente: idReferente,
cliente: id,
limite: null,
struttura: strutturaSel,
filtri: pairs
};
return request;
}
createRequest(idReferente, id, limite, titolo, tipo, daData, aData, strutturaSel): DocumentiRequest
{ {
var request:DocumentiRequest; var request:DocumentiRequest;
var pair:Pair; var pair:Pair;
...@@ -88,6 +111,7 @@ export class DocumentiService { ...@@ -88,6 +111,7 @@ export class DocumentiService {
} }
request = { request = {
referente: idReferente,
cliente: id, cliente: id,
limite: limite, limite: limite,
struttura: strutturaSel, struttura: strutturaSel,
...@@ -97,9 +121,28 @@ export class DocumentiService { ...@@ -97,9 +121,28 @@ export class DocumentiService {
return request; return request;
} }
createInitialRequest(id, strutturaSel): DocumentiRequest createInitialRequest(idReferente, id, strutturaSel): DocumentiRequest
{ {
return this.createRequest(id, 10, null, null, null, null, strutturaSel); return this.createRequest(idReferente, id, 10, null, null, null, null, strutturaSel);
}
getTitoli(value: DocumentiRequest) : Observable<TitoliDocumentiResponse>{
var param = this.encodeBodyTitoliDocumenti(value);
return this.httpClient.post<TitoliDocumentiResponse>(this.httpClientDataService.BASE_ADDRESS+'/intranet/getTitoliDocumenti.do', param, this.httpClientDataService.httpOptionsJson)
.pipe(
catchError(this.handleError),
tap( (res: TitoliDocumentiResponse ) => {
if (!res.error) {
this.errorRespose.error = false;
return res;
}
else{
this.errorRespose.error = true;
this.errorRespose.errorMsg = res.error;
}
})
);
} }
getDocumenti(value: DocumentiRequest): Observable<DocumentiResponse>{ getDocumenti(value: DocumentiRequest): Observable<DocumentiResponse>{
......
import { TestBed } from '@angular/core/testing';
import { EventsService } from './events.service';
describe('UtilService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: EventsService = TestBed.get(EventsService);
expect(service).toBeTruthy();
});
});
import { Injectable } from "@angular/core";
import { environment } from "src/environments/environment";
@Injectable({
providedIn: 'root'
})
export class EventsService {
constructor() {
}
static startup : boolean = false;
static updateStrutture : boolean = false;
static caricaDati : boolean = false;
static strutturaSelected : boolean = false;
static strutturaSelectedHome : boolean = false;
static manageBackButton : boolean = false;
static clienteCambiato : boolean = false;
static redirect : string = '';
static setStartUp()
{
EventsService.startup = true;
setTimeout(() => {
EventsService.startup = false;
}, environment.eventsTime);
}
static setUpdateStrutture()
{
EventsService.updateStrutture = true;
setTimeout(() => {
EventsService.updateStrutture = false;
}, environment.eventsTime);
}
static setCaricaDati()
{
EventsService.caricaDati = true;
setTimeout(() => {
EventsService.caricaDati = false;
}, environment.eventsTime);
}
static setStrutturaSelected()
{
EventsService.strutturaSelected = true;
setTimeout(() => {
EventsService.strutturaSelected = false;
}, environment.eventsTime);
}
static setStrutturaSelectedHome()
{
EventsService.strutturaSelectedHome = true;
setTimeout(() => {
EventsService.strutturaSelectedHome = false;
}, environment.eventsTime);
}
static setManageBackButton()
{
EventsService.manageBackButton = true;
setTimeout(() => {
EventsService.manageBackButton = false;
}, environment.eventsTime);
}
static setClienteCambiato()
{
EventsService.clienteCambiato = true;
setTimeout(() => {
EventsService.clienteCambiato = false;
}, environment.eventsTime);
}
static setRedirect(page: string)
{
EventsService.redirect = page;
setTimeout(() => {
EventsService.redirect = '';
}, environment.eventsTime);
}
}
\ No newline at end of file
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpHeaders} from '@angular/common/http'; import { HttpHeaders} from '@angular/common/http';
import { environment } from '../../environments/environment'; import { environment } from 'src/environments/environment';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
......
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable, of} from 'rxjs'; import { Observable, of } from 'rxjs';
import { Pair } from './../interface/pair'; import { Pair } from './../interface/pair';
import { NotificheRequest } from '../interface/notifiche-request'; import { NotificheRequest } from '../interface/notifiche-request';
import { tap, catchError } from 'rxjs/operators'; import { tap, catchError } from 'rxjs/operators';
......
...@@ -5,25 +5,24 @@ import { UtilService } from '../service/util.service'; ...@@ -5,25 +5,24 @@ import { UtilService } from '../service/util.service';
import { HttpClient, HttpErrorResponse } from '@angular/common/http'; import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { HttpClientDataService } from '../service/http-client-data.service'; import { HttpClientDataService } from '../service/http-client-data.service';
import { RichiesteResponse } from '../interface/richieste-response'; import { RichiesteResponse } from '../interface/richieste-response';
import { ArchiviaRichiestaResponse } from 'src/app/interface/archivia-richiesta-response'; import { Observable, of } from 'rxjs';
import { Observable, of} from 'rxjs';
import { RichiesteRequest } from '../interface/richieste-request'; import { RichiesteRequest } from '../interface/richieste-request';
import { Pair } from './../interface/pair'; import { Pair } from './../interface/pair';
import { tap, catchError } from 'rxjs/operators'; import { tap, catchError } from 'rxjs/operators';
import { ErrorResponse } from '../auth/interface/error-response'; import { ErrorResponse } from '../auth/interface/error-response';
import { NewRichiestaRequest } from '../interface/new-richiesta-request'; import { NewRichiestaRequest } from '../interface/new-richiesta-request';
import { NewRichiestaResponse } from '../interface/new-richiesta-response'; import { NewRichiestaResponse } from '../interface/new-richiesta-response';
import { Platform } from '@ionic/angular'; import { ArchiviaRichiestaResponse } from '../interface/archivia-richiesta-response';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class ParereService { export class ParereService {
constructor( constructor(
private httpClient: HttpClient, private httpClient: HttpClient,
private httpClientDataService: HttpClientDataService, private httpClientDataService: HttpClientDataService,) {
private platform: Platform) {
this.initService(); this.initService();
} }
......
...@@ -8,14 +8,14 @@ import { tap, catchError } from 'rxjs/operators'; ...@@ -8,14 +8,14 @@ import { tap, catchError } from 'rxjs/operators';
import { HttpClient, HttpErrorResponse } from '@angular/common/http'; import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { HttpClientDataService } from '../service/http-client-data.service'; import { HttpClientDataService } from '../service/http-client-data.service';
import { ErrorResponse } from '../auth/interface/error-response'; import { ErrorResponse } from '../auth/interface/error-response';
import { Observable, of} from 'rxjs';
import { UtilService } from './util.service'; import { UtilService } from './util.service';
import { AuthResponse } from '../auth/interface/auth-response'; import { of } from 'rxjs/observable/of';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class SegreteriaService { export class SegreteriaService {
constructor( constructor(
......
import { Pair } from './../interface/pair'; import { Pair } from './../interface/pair';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { LoadingController, AlertController, Platform, Events } from '@ionic/angular'; import { LoadingController, AlertController, Platform } from '@ionic/angular';
import { HttpClient, HttpErrorResponse } from '@angular/common/http'; import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { File} from '@ionic-native/file/ngx'; import { File, FileEntry} from '@ionic-native/file/ngx';
import { FileOpener } from '@ionic-native/file-opener/ngx'; import { FileOpener } from '@ionic-native/file-opener/ngx';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Storage } from '@ionic/storage';
import { BehaviorSubject, of} from 'rxjs'; import { BehaviorSubject, of} from 'rxjs';
import { Struttura } from '../interface/struttura'; import { Struttura } from '../interface/struttura';
import { ParereResponse } from '../interface/parere-response'; import { ParereResponse } from '../interface/parere-response';
...@@ -21,6 +20,8 @@ import { StatusBar } from '@ionic-native/status-bar/ngx'; ...@@ -21,6 +20,8 @@ import { StatusBar } from '@ionic-native/status-bar/ngx';
import { NotificheService } from './notifiche.service'; import { NotificheService } from './notifiche.service';
import { environment } from '../../environments/environment'; import { environment } from '../../environments/environment';
import { AuthService } from '../auth/service/auth.service'; import { AuthService } from '../auth/service/auth.service';
import { EventsService } from './events.service';
import { Storage } from '@ionic/storage-angular';
const delay = ms => new Promise(res => setTimeout(res, ms)); const delay = ms => new Promise(res => setTimeout(res, ms));
...@@ -46,7 +47,6 @@ export class UtilService { ...@@ -46,7 +47,6 @@ export class UtilService {
private storage: Storage, private storage: Storage,
public translate: TranslateService, public translate: TranslateService,
private httpClientDataService: HttpClientDataService, private httpClientDataService: HttpClientDataService,
public events: Events,
public push: Push, public push: Push,
private splashScreen: SplashScreen, private splashScreen: SplashScreen,
private statusBar: StatusBar, private statusBar: StatusBar,
...@@ -91,6 +91,7 @@ export class UtilService { ...@@ -91,6 +91,7 @@ export class UtilService {
authSubject = new BehaviorSubject(false); authSubject = new BehaviorSubject(false);
async logoutUser() { async logoutUser() {
this.storage.clear();
this.storage.set("logged",false).then((successData)=>{ this.storage.set("logged",false).then((successData)=>{
console.log("Data Stored"); console.log("Data Stored");
console.log(successData); console.log(successData);
...@@ -114,8 +115,10 @@ export class UtilService { ...@@ -114,8 +115,10 @@ export class UtilService {
loaders: Array<any>; loaders: Array<any>;
private languageSelected:string; private languageSelected:string;
private static strutturaSel:Struttura; private static strutturaSel:Struttura;
private static strutturaName:string;
public static strutture: Struttura[]; public static strutture: Struttura[];
public static titoloPagina:string = ""; public static titoloPagina:string = "";
public static newpage;
public static strutturaSegreteria:Struttura; public static strutturaSegreteria:Struttura;
public static pushRegistrationId:string; public static pushRegistrationId:string;
public static redirectToNotifiche:boolean = false; public static redirectToNotifiche:boolean = false;
...@@ -147,6 +150,16 @@ export class UtilService { ...@@ -147,6 +150,16 @@ export class UtilService {
} }
} }
getStrutturaName()
{
return UtilService.strutturaName;
}
setStrutturaName(s: string)
{
UtilService.strutturaName = s;
}
getStrutturaSel() getStrutturaSel()
{ {
return UtilService.strutturaSel; return UtilService.strutturaSel;
...@@ -165,7 +178,6 @@ export class UtilService { ...@@ -165,7 +178,6 @@ export class UtilService {
this.languageSelected = data; this.languageSelected = data;
this.translate.setDefaultLang(data); this.translate.setDefaultLang(data);
this.translate.use(data); this.translate.use(data);
this.events.publish('functionCall:linguaCambiata', null);
} }
}); });
} }
...@@ -485,7 +497,6 @@ export class UtilService { ...@@ -485,7 +497,6 @@ export class UtilService {
case "preview-home": case "preview-home":
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/preview-home'); this.router.navigateByUrl('home/preview-home');
break; break;
} }
...@@ -493,7 +504,6 @@ export class UtilService { ...@@ -493,7 +504,6 @@ export class UtilService {
{ {
UtilService.titoloPagina = ''; UtilService.titoloPagina = '';
this.events.publish('functionCall:cambiaTitolo', null);
this.router.navigateByUrl('home/index'); this.router.navigateByUrl('home/index');
break; break;
} }
...@@ -502,7 +512,6 @@ export class UtilService { ...@@ -502,7 +512,6 @@ export class UtilService {
this.translate.get('titolo_documenti').subscribe( this.translate.get('titolo_documenti').subscribe(
value => { value => {
UtilService.titoloPagina = value; UtilService.titoloPagina = value;
this.events.publish('functionCall:cambiaTitolo', null);
}); });
this.router.navigateByUrl('home/documenti'); this.router.navigateByUrl('home/documenti');
break; break;
...@@ -512,7 +521,6 @@ export class UtilService { ...@@ -512,7 +521,6 @@ export class UtilService {
this.translate.get('interviste_titolo').subscribe( this.translate.get('interviste_titolo').subscribe(
value => { value => {
UtilService.titoloPagina = value; UtilService.titoloPagina = value;
this.events.publish('functionCall:cambiaTitolo', null);
}); });
this.router.navigateByUrl('home/interviste'); this.router.navigateByUrl('home/interviste');
break; break;
...@@ -522,7 +530,6 @@ export class UtilService { ...@@ -522,7 +530,6 @@ export class UtilService {
this.translate.get('parere_titolo').subscribe( this.translate.get('parere_titolo').subscribe(
value => { value => {
UtilService.titoloPagina = value; UtilService.titoloPagina = value;
this.events.publish('functionCall:cambiaTitolo', null);
}); });
this.router.navigateByUrl('home/parere'); this.router.navigateByUrl('home/parere');
break; break;
...@@ -532,7 +539,6 @@ export class UtilService { ...@@ -532,7 +539,6 @@ export class UtilService {
this.translate.get('segreteria_titolo').subscribe( this.translate.get('segreteria_titolo').subscribe(
value => { value => {
UtilService.titoloPagina = value; UtilService.titoloPagina = value;
this.events.publish('functionCall:cambiaTitolo', null);
}); });
this.router.navigateByUrl('home/segreteria'); this.router.navigateByUrl('home/segreteria');
break; break;
...@@ -547,7 +553,6 @@ export class UtilService { ...@@ -547,7 +553,6 @@ export class UtilService {
this.translate.get('change_password').subscribe( this.translate.get('change_password').subscribe(
value => { value => {
UtilService.titoloPagina = value; UtilService.titoloPagina = value;
this.events.publish('functionCall:cambiaTitolo', null);
}); });
this.router.navigateByUrl('home/change-pwd'); this.router.navigateByUrl('home/change-pwd');
break; break;
...@@ -558,7 +563,6 @@ export class UtilService { ...@@ -558,7 +563,6 @@ export class UtilService {
this.translate.get('notifiche_titolo').subscribe( this.translate.get('notifiche_titolo').subscribe(
value => { value => {
UtilService.titoloPagina = value; UtilService.titoloPagina = value;
this.events.publish('functionCall:cambiaTitolo', null);
}); });
this.router.navigateByUrl('home/notifiche'); this.router.navigateByUrl('home/notifiche');
break; break;
...@@ -568,7 +572,6 @@ export class UtilService { ...@@ -568,7 +572,6 @@ export class UtilService {
this.translate.get('calendario_corsi_titolo').subscribe( this.translate.get('calendario_corsi_titolo').subscribe(
value => { value => {
UtilService.titoloPagina = value; UtilService.titoloPagina = value;
this.events.publish('functionCall:cambiaTitolo', null);
}); });
this.router.navigateByUrl('home/calendario-corsi'); this.router.navigateByUrl('home/calendario-corsi');
break; break;
...@@ -578,7 +581,6 @@ export class UtilService { ...@@ -578,7 +581,6 @@ export class UtilService {
this.translate.get('miei_corsi_titolo').subscribe( this.translate.get('miei_corsi_titolo').subscribe(
value => { value => {
UtilService.titoloPagina = value; UtilService.titoloPagina = value;
this.events.publish('functionCall:cambiaTitolo', null);
}); });
this.router.navigateByUrl('home/miei-corsi'); this.router.navigateByUrl('home/miei-corsi');
break; break;
...@@ -710,6 +712,7 @@ export class UtilService { ...@@ -710,6 +712,7 @@ export class UtilService {
onResumeSubscription; onResumeSubscription;
firstResume : boolean = true; firstResume : boolean = true;
firstPause : boolean = true; firstPause : boolean = true;
primaRestart: boolean = true;
setResume() { setResume() {
this.onResumeSubscription = this.platform.resume.subscribe(async () => { this.onResumeSubscription = this.platform.resume.subscribe(async () => {
...@@ -794,29 +797,30 @@ export class UtilService { ...@@ -794,29 +797,30 @@ export class UtilService {
this.notificheService.isNotificheNonViste(idReferente, environment.struttura).subscribe((res: ParereResponse)=>{ this.notificheService.isNotificheNonViste(idReferente, environment.struttura).subscribe((res: ParereResponse)=>{
if(res.error){ if(res.error){
this.router.navigate(['home']); this.router.navigate(['home']);
this.events.publish('functionCall:caricaDati', null); EventsService.setCaricaDati();
} }
else else
{ {
if(res.autorizzato && !UtilService.startup) this.apriPagina(nextPage); if(res.autorizzato && !UtilService.startup) this.apriPagina(nextPage);
else{ else{
if(res.autorizzato && UtilService.startup) if(res.autorizzato && UtilService.startup && this.primaRestart)
{ {
this.primaRestart = false;
UtilService.startup = false; UtilService.startup = false;
UtilService.redirectToNotifiche = true; UtilService.redirectToNotifiche = true;
this.router.navigate(['home']); this.router.navigate(['home']);
this.events.publish('functionCall:caricaDati', null); EventsService.setCaricaDati();
} }
else{ else{
this.router.navigate(['home']); this.router.navigate(['home']);
this.events.publish('functionCall:caricaDati', null); EventsService.setCaricaDati();
} }
} }
} }
}, },
(error: ErrorResponse) => { (error: ErrorResponse) => {
this.router.navigate(['home']); this.router.navigate(['home']);
this.events.publish('functionCall:caricaDati', null); EventsService.setCaricaDati();
}); });
} }
......
...@@ -1659,7 +1659,7 @@ ion-menu{ ...@@ -1659,7 +1659,7 @@ ion-menu{
height: 20px; height: 20px;
border-right: 20px solid $celeste; border-right: 20px solid $celeste;
border-bottom-left-radius: 16px 14px; border-bottom-left-radius: 16px 14px;
-webkit-transform: translate(30, -2px); //-webkit-transform: translate(30, -2px);
} }
&:after { &:after {
content: ""; content: "";
...@@ -1671,7 +1671,7 @@ ion-menu{ ...@@ -1671,7 +1671,7 @@ ion-menu{
height: 20px; height: 20px;
background: white; background: white;
border-bottom-left-radius: 10px; border-bottom-left-radius: 10px;
-webkit-transform: translate(-30px, -2px); //-webkit-transform: translate(-30px, -2px);
} }
p { p {
margin: 0px; margin: 0px;
...@@ -1701,7 +1701,7 @@ ion-menu{ ...@@ -1701,7 +1701,7 @@ ion-menu{
height: 20px; height: 20px;
border-left: 20px solid $grigio-superlite; border-left: 20px solid $grigio-superlite;
border-bottom-right-radius: 16px 14px; border-bottom-right-radius: 16px 14px;
-webkit-transform: translate(0, -2px); //-webkit-transform: translate(0, -2px);
} }
&:after { &:after {
content: ""; content: "";
...@@ -1713,7 +1713,7 @@ ion-menu{ ...@@ -1713,7 +1713,7 @@ ion-menu{
height: 20px; height: 20px;
background: white; background: white;
border-bottom-right-radius: 10px; border-bottom-right-radius: 10px;
-webkit-transform: translate(-30px, -2px); //-webkit-transform: translate(-30px, -2px);
} }
p { p {
margin: 0px; margin: 0px;
...@@ -1933,10 +1933,35 @@ ion-menu{ ...@@ -1933,10 +1933,35 @@ ion-menu{
color: $celeste; color: $celeste;
} }
} }
.riga-doc{
width: 36%;
border: 1px solid $grigio-lite;
border-radius: 45px;
margin-right: 10px;
padding-left: 5px;
padding-top: 5px;
padding-right: 5px;
color: $grigio-lite;
margin-top: 10px;
box-shadow: 0px 0px 10px #00000029;
input{
color: $celeste;
}
}
.riga > * .riga > *
{ {
border: 0px; border: 0px;
} }
.riga-doc > *
{
border: 0px;
padding: 0px;
margin-left: 5px;
margin-right: 5px;
.cerca-titolo-doc{
width: 60%;
}
}
ion-button ion-button
{ {
border-radius: 90px; border-radius: 90px;
......
...@@ -3,6 +3,7 @@ export const environment = { ...@@ -3,6 +3,7 @@ export const environment = {
BASE_ADDRESS: 'https://gestionale2.2p2.it/stman', BASE_ADDRESS: 'https://gestionale2.2p2.it/stman',
P2PTokenUrl: "https://www.2p2.it/auth-request", P2PTokenUrl: "https://www.2p2.it/auth-request",
P2PSingleSignOnUrl: "https://www.2p2.it/?token=", P2PSingleSignOnUrl: "https://www.2p2.it/?token=",
eventsTime:3000,
struttura:'2p2', struttura:'2p2',
ConsultingServiceId:6, ConsultingServiceId:6,
RealEstateBrokerageId:8, RealEstateBrokerageId:8,
......
...@@ -7,6 +7,7 @@ export const environment = { ...@@ -7,6 +7,7 @@ export const environment = {
BASE_ADDRESS: 'https://gestionale2.2p2.it/stman', BASE_ADDRESS: 'https://gestionale2.2p2.it/stman',
//BASE_ADDRESS: "http://localhost:8080/stman", //BASE_ADDRESS: "http://localhost:8080/stman",
//BASE_ADDRESS: "http://192.168.1.126:8080/stman", //BASE_ADDRESS: "http://192.168.1.126:8080/stman",
eventsTime:3000,
P2PTokenUrl: "https://www.2p2.it/auth-request", P2PTokenUrl: "https://www.2p2.it/auth-request",
P2PSingleSignOnUrl: "https://www.2p2.it/?token=", P2PSingleSignOnUrl: "https://www.2p2.it/?token=",
struttura:'2p2', struttura:'2p2',
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="it"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>2P2 App</title> <title>2P2 App</title>
<!--Non funziona con il deploy desktop ma permette di ripartire da qualsiasi pagina, non solo dalla home--> <base href="/" />
<!--<base href="/" />-->
<!--In caso di deploy per Desktop-->
<!--<base href="/2p2-app/" />-->
<!--In tutti i casi-->
<base href="." />
<!--<link href="css/awesome.scss" rel="stylesheet">
<link href="css/styles.scss" rel="stylesheet">
<link rel="stylesheet" href="css/aos.scss">s
<link rel="stylesheet" href="css/jfc1hds.scss">
<link rel="stylesheet" href="css/owl.carousel.min.scss">
<link rel="stylesheet" href="css/owl.theme.default.min.scss">-->
<meta name="color-scheme" content="light dark" />
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" /> <meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" /> <meta name="msapplication-tap-highlight" content="no" />
...@@ -34,7 +20,6 @@ ...@@ -34,7 +20,6 @@
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>
</body> </body>
......
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
import { enableProdMode } from '@angular/core'; import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment'; import { environment } from './environments/environment';
import { AppModule } from './app/app.module';
if (environment.production) { if (environment.production) {
enableProdMode(); enableProdMode();
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* BROWSER POLYFILLS * BROWSER POLYFILLS
*/ */
/** IE10 and IE11 requires the following for NgClass support on SVG elements */ /** IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`. // import 'classlist.js'; // Run `npm install --save classlist.js`.
/** /**
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
* will put import in the top of bundle, so user need to create a separate file * will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags * in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js. * into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts'; * import './zone-flags';
* *
* The flags allowed in zone-flags.ts are listed here. * The flags allowed in zone-flags.ts are listed here.
* *
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
* *
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
* *
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge * with the following flag, it will bypass `zone.js` patch for IE/Edge
...@@ -52,12 +52,11 @@ ...@@ -52,12 +52,11 @@
* *
*/ */
import './zone-flags.ts'; import './zone-flags';
/*************************************************************************************************** /***************************************************************************************************
* Zone JS is required by default for Angular itself. * Zone JS is required by default for Angular itself.
*/ */
import 'zone.js/dist/zone'; // Included with Angular CLI. import 'zone.js/dist/zone'; // Included with Angular CLI.
......
...@@ -598,10 +598,35 @@ $grigio-superlite: #e5e5ea; ...@@ -598,10 +598,35 @@ $grigio-superlite: #e5e5ea;
float:left; float:left;
} }
} }
.riga-doc{
width: 83%;
border: 1px solid $grigio-lite;
border-radius: 45px;
margin-right: 10px;
padding-left: 5px;
padding-top: 5px;
padding-right: 5px;
color: $grigio-lite;
margin-top: 10px;
box-shadow: 0px 0px 10px #00000029;
input{
color: $celeste;
}
}
.riga > * .riga > *
{ {
border: 0px; border: 0px;
} }
.riga-doc > *
{
border: 0px;
padding: 0px;
margin-left: 5px;
margin-right: 5px;
.cerca-titolo-doc{
width: 60%;
}
}
ion-button ion-button
{ {
border-radius: 90px; border-radius: 90px;
......
...@@ -7,7 +7,12 @@ import { ...@@ -7,7 +7,12 @@ import {
platformBrowserDynamicTesting platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing'; } from '@angular/platform-browser-dynamic/testing';
declare const require: any; declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment. // First, initialize the Angular testing environment.
getTestBed().initTestEnvironment( getTestBed().initTestEnvironment(
......
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": [
"cordova",
"cordova-plugin-file"
]
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"page",
"kebab-case"
]
}
}
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
* Prevents Angular change detection from * Prevents Angular change detection from
* running with certain Web Component callbacks * running with certain Web Component callbacks
*/ */
// eslint-disable-next-line no-underscore-dangle
(window as any).__Zone_disable_customElements = true; (window as any).__Zone_disable_customElements = true;
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
...@@ -5,18 +6,19 @@ ...@@ -5,18 +6,19 @@
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"module": "es2015", "downlevelIteration": true,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true, "importHelpers": true,
"target": "es5", "target": "es2015",
"typeRoots": [ "module": "es2020",
"node_modules/@types" "lib": ["es2018", "dom"]
], },
"lib": [ "angularCompilerOptions": {
"es2018", "enableI18nLegacyMessageIdFormat": false,
"dom" "strictInjectionParameters": true,
] "strictInputAccessModifiers": true,
"strictTemplates": true,
"experimentalDecorators": true
} }
} }
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "../tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/spec", "outDir": "./out-tsc/spec",
"types": [ "types": [
"jasmine", "jasmine"
"node"
] ]
}, },
"files": [ "files": [
"test.ts", "src/test.ts",
"zone-flags.ts", "src/polyfills.ts"
"polyfills.ts"
], ],
"include": [ "include": [
"**/*.spec.ts", "src/**/*.spec.ts",
"**/*.d.ts" "src/**/*.d.ts"
] ]
} }
{
"extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"rules": {
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warn"
},
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-use-before-declare": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": [
true,
"single"
],
"trailing-comma": false,
"no-output-on-prefix": true,
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"one-variable-per-declaration": false,
"component-class-suffix": [true, "Page", "Component"],
"directive-class-suffix": true
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment