├── .watchmanconfig
├── shared
├── state
│ ├── GlobalState.js
│ ├── colors.js
│ ├── task_statuses.js
│ ├── urls.js
│ └── styles.js
└── components
│ ├── ImageUploader.js
│ ├── Hr.js
│ ├── Loading.js
│ ├── InputErrorMessage.js
│ ├── StatedInput.js
│ ├── Button.js
│ └── ButtonWithIcon.js
├── android
├── .gradle
│ ├── 5.5
│ │ ├── gc.properties
│ │ ├── fileChanges
│ │ │ └── last-build.bin
│ │ ├── fileHashes
│ │ │ ├── fileHashes.bin
│ │ │ ├── fileHashes.lock
│ │ │ └── resourceHashesCache.bin
│ │ ├── fileContent
│ │ │ └── fileContent.lock
│ │ ├── javaCompile
│ │ │ ├── jarAnalysis.bin
│ │ │ ├── javaCompile.lock
│ │ │ ├── taskHistory.bin
│ │ │ └── classAnalysis.bin
│ │ └── executionHistory
│ │ │ ├── executionHistory.bin
│ │ │ └── executionHistory.lock
│ ├── vcs-1
│ │ └── gc.properties
│ └── buildOutputCleanup
│ │ ├── cache.properties
│ │ ├── outputFiles.bin
│ │ └── buildOutputCleanup.lock
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── raw
│ │ │ │ │ ├── app.json
│ │ │ │ │ ├── node_modules_entities_maps_xml.json
│ │ │ │ │ ├── node_modules_domserializer_node_modules_entities_lib_maps_xml.json
│ │ │ │ │ ├── node_modules_entities_maps_decode.json
│ │ │ │ │ ├── node_modules_domserializer_node_modules_entities_lib_maps_decode.json
│ │ │ │ │ ├── node_modules_entities_maps_legacy.json
│ │ │ │ │ ├── node_modules_domserializer_node_modules_entities_lib_maps_legacy.json
│ │ │ │ │ └── node_modules_domserializer_foreignnames.json
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ │ ├── assets_img_logo.png
│ │ │ │ │ ├── assets_img_plus.png
│ │ │ │ │ ├── assets_img_2x_exit.png
│ │ │ │ │ ├── assets_img_logoicon.png
│ │ │ │ │ ├── assets_img_menu_corp.png
│ │ │ │ │ ├── assets_img_menu_exit.png
│ │ │ │ │ ├── assets_img_menu_news.png
│ │ │ │ │ ├── assets_img_2x_success.png
│ │ │ │ │ ├── assets_img_2x_warning.png
│ │ │ │ │ ├── assets_img_documenticon.png
│ │ │ │ │ ├── assets_img_logoconture.png
│ │ │ │ │ ├── assets_img_maleavatar.png
│ │ │ │ │ ├── assets_img_menu_about.png
│ │ │ │ │ ├── assets_img_menu_support.png
│ │ │ │ │ ├── assets_img_2x_arrow_right.png
│ │ │ │ │ ├── assets_img_maleavatarbig.png
│ │ │ │ │ ├── assets_img_menu_transform.png
│ │ │ │ │ ├── assets_img_2x_radio_checked.png
│ │ │ │ │ ├── assets_img_avatarplaceholder.png
│ │ │ │ │ ├── assets_img_menu_compliance.png
│ │ │ │ │ ├── assets_img_2x_radio_unchecked.png
│ │ │ │ │ ├── node_modules_reactnativeratings_src_images_bell.png
│ │ │ │ │ ├── node_modules_reactnativeratings_src_images_heart.png
│ │ │ │ │ ├── node_modules_reactnativeratings_src_images_star.png
│ │ │ │ │ ├── node_modules_reactnativeratings_src_images_rocket.png
│ │ │ │ │ ├── node_modules_reactnativeratings_src_images_airbnbstar.png
│ │ │ │ │ ├── node_modules_reactnativeratings_src_images_airbnbstarselected.png
│ │ │ │ │ ├── node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
│ │ │ │ │ └── node_modules_reactnavigationstack_lib_module_views_assets_backiconmask.png
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ └── node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ └── node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ └── node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ └── node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
│ │ │ │ └── xml
│ │ │ │ │ └── network_security_config.xml
│ │ │ ├── java
│ │ │ │ └── kz
│ │ │ │ │ └── samrukenergy
│ │ │ │ │ └── portal
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ └── AndroidManifest.xml
│ │ └── debug
│ │ │ └── AndroidManifest.xml
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── debug.keystore
│ ├── fabric.properties
│ ├── .classpath
│ ├── proguard-rules.pro
│ ├── .project
│ ├── build_defs.bzl
│ ├── BUCK
│ └── google-services.json
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── keystores
│ ├── debug.keystore.properties
│ └── BUCK
├── settings.gradle
├── .project
├── gradle.properties
├── build.gradle
├── gradlew.bat
└── gradlew
├── app.json
├── .eslintrc.js
├── babel.config.js
├── assets
└── img
│ ├── logo.png
│ ├── plus.png
│ ├── 2x
│ ├── exit.png
│ ├── success.png
│ ├── warning.png
│ ├── arrow_right.png
│ ├── radio_checked.png
│ └── radio_unchecked.png
│ ├── logo-icon.png
│ ├── male-avatar.png
│ ├── menu
│ ├── about.png
│ ├── corp.png
│ ├── exit.png
│ ├── news.png
│ ├── support.png
│ ├── compliance.png
│ └── transform.png
│ ├── test_icon.png
│ ├── document-icon.png
│ ├── female-avatar.png
│ ├── logo-conture.png
│ ├── male-avatar-big.png
│ ├── avatar-placeholder.png
│ ├── 1x
│ └── baseline_keyboard_arrow_right_black_18dp.png
│ ├── plus.svg
│ ├── warning.svg
│ ├── exit.svg
│ ├── success.svg
│ ├── test_icon.svg
│ ├── logo-icon.svg
│ └── logo-conture.svg
├── ios
├── SamrukEnergy
│ ├── Images.xcassets
│ │ ├── Contents.json
│ │ ├── logo.imageset
│ │ │ ├── logo.png
│ │ │ ├── logo@2x.png
│ │ │ ├── logo@3x.png
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── 40.png
│ │ │ ├── 58.png
│ │ │ ├── 60.png
│ │ │ ├── 80.png
│ │ │ ├── 87.png
│ │ │ ├── 1024.png
│ │ │ ├── 120.png
│ │ │ ├── 180.png
│ │ │ ├── 120 copy.png
│ │ │ └── Contents.json
│ ├── MaterialIcons.ttf
│ ├── AppDelegate.h
│ ├── main.m
│ ├── GoogleService-Info.plist
│ ├── AppDelegate.m
│ ├── Info.plist
│ └── Base.lproj
│ │ └── LaunchScreen.xib
├── SamrukEnergy.xcodeproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
├── SamrukEnergy.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── SamrukEnergyTests
│ ├── Info.plist
│ └── SamrukEnergyTests.m
├── SamrukEnergy-tvOSTests
│ └── Info.plist
├── SamrukEnergy-tvOS
│ └── Info.plist
└── Podfile
├── .buckconfig
├── helper.txt
├── screens
├── Project
│ ├── ProjectData.js
│ ├── ProjectsScreen.js
│ └── ProcessOwnersScreen.js
├── Menu
│ ├── ChildMenuItem.js
│ └── MenuItem.js
├── Compliance
│ ├── VideosScreen.js
│ ├── EducationalScreen.js
│ ├── FaqScreen.js
│ └── FaqsScreen.js
├── Task
│ ├── TaskCommentScreen.js
│ ├── TasksTabsScreen.js
│ ├── TaskActions.js
│ └── TasksScreen.js
├── About
│ ├── StructureScreen.js
│ ├── SearchUserScreen.js
│ ├── DepartmentScreen.js
│ ├── EmployeesScreen.js
│ └── DepartmentsScreen.js
├── CorporateGovernance
│ └── CorporateGovernanceScreen.js
├── Splash
│ └── SplashScreen.js
├── Success
│ └── SuccessScreen.js
├── ListScreen.js
├── DocumentListScreen.js
├── UsersScreen.js
├── VideoListScreen.js
└── News
│ ├── NewsTabScreen.js
│ ├── NewsListScreen.js
│ └── NewsScreen.js
├── index.js
├── __tests__
└── App-test.js
├── metro.config.js
├── utils
└── i18n.js
├── .editorconfig
├── package.json
├── plugins
└── axios.js
├── .flowconfig
├── App.js
└── locales
└── ru.js
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/shared/state/GlobalState.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/.gradle/5.5/gc.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/.gradle/5.5/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SamrukEnergy",
3 | "displayName": "SamrukEnergy"
4 | }
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/android/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Sat Nov 02 10:59:19 CST 2019
2 | gradle.version=5.5
3 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SamrukEnergy",
3 | "displayName": "SamrukEnergy"
4 | }
--------------------------------------------------------------------------------
/android/app/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/assets/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/logo.png
--------------------------------------------------------------------------------
/assets/img/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/plus.png
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_entities_maps_xml.json:
--------------------------------------------------------------------------------
1 | {"amp":"&","apos":"'","gt":">","lt":"<","quot":"\""}
2 |
--------------------------------------------------------------------------------
/assets/img/2x/exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/2x/exit.png
--------------------------------------------------------------------------------
/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/debug.keystore
--------------------------------------------------------------------------------
/assets/img/2x/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/2x/success.png
--------------------------------------------------------------------------------
/assets/img/2x/warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/2x/warning.png
--------------------------------------------------------------------------------
/assets/img/logo-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/logo-icon.png
--------------------------------------------------------------------------------
/assets/img/male-avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/male-avatar.png
--------------------------------------------------------------------------------
/assets/img/menu/about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/menu/about.png
--------------------------------------------------------------------------------
/assets/img/menu/corp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/menu/corp.png
--------------------------------------------------------------------------------
/assets/img/menu/exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/menu/exit.png
--------------------------------------------------------------------------------
/assets/img/menu/news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/menu/news.png
--------------------------------------------------------------------------------
/assets/img/test_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/test_icon.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | EnergySolutions
3 |
4 |
--------------------------------------------------------------------------------
/assets/img/document-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/document-icon.png
--------------------------------------------------------------------------------
/assets/img/female-avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/female-avatar.png
--------------------------------------------------------------------------------
/assets/img/logo-conture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/logo-conture.png
--------------------------------------------------------------------------------
/assets/img/menu/support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/menu/support.png
--------------------------------------------------------------------------------
/assets/img/2x/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/2x/arrow_right.png
--------------------------------------------------------------------------------
/assets/img/2x/radio_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/2x/radio_checked.png
--------------------------------------------------------------------------------
/assets/img/male-avatar-big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/male-avatar-big.png
--------------------------------------------------------------------------------
/assets/img/menu/compliance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/menu/compliance.png
--------------------------------------------------------------------------------
/assets/img/menu/transform.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/menu/transform.png
--------------------------------------------------------------------------------
/assets/img/2x/radio_unchecked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/2x/radio_unchecked.png
--------------------------------------------------------------------------------
/assets/img/avatar-placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/avatar-placeholder.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/MaterialIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/MaterialIcons.ttf
--------------------------------------------------------------------------------
/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_domserializer_node_modules_entities_lib_maps_xml.json:
--------------------------------------------------------------------------------
1 | { "amp": "&", "apos": "'", "gt": ">", "lt": "<", "quot": "\"" }
2 |
--------------------------------------------------------------------------------
/android/.gradle/5.5/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/android/.gradle/5.5/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #00528D
4 |
5 |
--------------------------------------------------------------------------------
/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/android/.gradle/5.5/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/android/.gradle/5.5/javaCompile/jarAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/javaCompile/jarAnalysis.bin
--------------------------------------------------------------------------------
/android/.gradle/5.5/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/android/.gradle/5.5/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/android/.gradle/5.5/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/android/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/.gradle/5.5/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/logo.imageset/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/logo.imageset/logo.png
--------------------------------------------------------------------------------
/android/.gradle/5.5/executionHistory/executionHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/executionHistory/executionHistory.bin
--------------------------------------------------------------------------------
/android/.gradle/5.5/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/5.5/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_logo.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_plus.png
--------------------------------------------------------------------------------
/assets/img/1x/baseline_keyboard_arrow_right_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/assets/img/1x/baseline_keyboard_arrow_right_black_18dp.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/40.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/58.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/60.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/80.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/87.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/logo.imageset/logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/logo.imageset/logo@2x.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/logo.imageset/logo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/logo.imageset/logo@3x.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_2x_exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_2x_exit.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/1024.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/120.png
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/180.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_logoicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_logoicon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_menu_corp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_menu_corp.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_menu_exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_menu_exit.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_menu_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_menu_news.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_2x_success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_2x_success.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_2x_warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_2x_warning.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_documenticon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_documenticon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_logoconture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_logoconture.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_maleavatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_maleavatar.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_menu_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_menu_about.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_menu_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_menu_support.png
--------------------------------------------------------------------------------
/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/120 copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/120 copy.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_2x_arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_2x_arrow_right.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_maleavatarbig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_maleavatarbig.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_menu_transform.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_menu_transform.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_2x_radio_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_2x_radio_checked.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_avatarplaceholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_avatarplaceholder.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_menu_compliance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_menu_compliance.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/assets_img_2x_radio_unchecked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/assets_img_2x_radio_unchecked.png
--------------------------------------------------------------------------------
/shared/state/colors.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | gray: "#979797",
3 | blue: "#0065AE",
4 | red: "#E9552F",
5 | grayDA: "#dadada",
6 | white: "#ffffff",
7 | gray97: "#979797",
8 | grayC4: "#C4C4C4"
9 | };
10 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'SamrukEnergy'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/assets/img/plus.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_bell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_bell.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_heart.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_star.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_rocket.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_rocket.png
--------------------------------------------------------------------------------
/android/app/fabric.properties:
--------------------------------------------------------------------------------
1 | #Contains API Secret used to validate your application. Commit to internal source control; avoid making secret public.
2 | #Mon Jul 29 23:51:14 ALMT 2019
3 | apiSecret=10f518c33bbd47142553a38a0f272eb0756696c7e6e78e129c440cec932bd7d5
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_airbnbstar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_airbnbstar.png
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/assets/img/warning.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_airbnbstarselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/node_modules_reactnativeratings_src_images_airbnbstarselected.png
--------------------------------------------------------------------------------
/shared/components/ImageUploader.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { View } from 'react-native';
3 |
4 | export default class ImageUploader extends Component {
5 | render() {
6 | return (
7 |
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-hdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigationstack_lib_module_views_assets_backiconmask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigationstack_lib_module_views_assets_backiconmask.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/starmastar1126/Samruk_Energy_ReactNative/HEAD/android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigationstack_lib_module_views_assets_backicon.png
--------------------------------------------------------------------------------
/helper.txt:
--------------------------------------------------------------------------------
1 | mkdir -p android/app/src/main/assets
2 | rm -rf android/app/build
3 | react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
4 | cd android
5 | ./gradlew clean assembleRelease
6 | cd ../
7 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/screens/Project/ProjectData.js:
--------------------------------------------------------------------------------
1 | import React, { PureComponent } from "react";
2 | import { View } from "react-native";
3 | import HTMLView from "react-native-htmlview";
4 |
5 | export default class ProjectData extends PureComponent {
6 | render() {
7 | return ;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import { AppRegistry } from "react-native";
6 | import App from "./shared/components/Navigation";
7 | import { name as appName } from "./app.json";
8 | import { enableScreens } from "react-native-screens";
9 |
10 | enableScreens();
11 | AppRegistry.registerComponent(appName, () => App);
12 |
--------------------------------------------------------------------------------
/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_entities_maps_decode.json:
--------------------------------------------------------------------------------
1 | {"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}
--------------------------------------------------------------------------------
/android/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: false,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | samruk-energy.kz
5 | localhost
6 | 10.0.2.2
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_domserializer_node_modules_entities_lib_maps_decode.json:
--------------------------------------------------------------------------------
1 | { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240, "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212, "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 }
2 |
--------------------------------------------------------------------------------
/shared/components/Hr.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View } from "react-native";
3 | import colors from "../state/colors";
4 |
5 | export default class Hr extends Component {
6 | componentDidMount() {}
7 | render() {
8 | return ;
9 | }
10 |
11 | styles = {
12 | width: "100%",
13 | borderBottomWidth: 1,
14 | borderBottomColor: colors.gray
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/utils/i18n.js:
--------------------------------------------------------------------------------
1 | import I18n from "i18n-js";
2 | import * as RNLocalize from "react-native-localize";
3 |
4 | import ru from "../locales/ru";
5 |
6 | // const locales = RNLocalize.getLocales();
7 |
8 | // if (Array.isArray(locales)) {
9 | // I18n.locale = locales[0].languageTag;
10 | // }
11 |
12 | I18n.defaultLocale = "ru";
13 | I18n.fallbacks = true;
14 | I18n.locale = "ru";
15 | I18n.translations = {
16 | ru
17 | };
18 |
19 | export default I18n;
20 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (nonatomic, strong) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | SamrukEnergy
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/logo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "logo.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "logo@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "logo@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 |
9 | # Change these settings to your own preference
10 | indent_style = space
11 | indent_size = 2
12 |
13 | # We recommend you to keep these unchanged
14 | end_of_line = lf
15 | charset = utf-8
16 | trim_trailing_whitespace = true
17 | insert_final_newline = true
18 |
19 | [*.md]
20 | trim_trailing_whitespace = false
21 |
22 | quote_type = double
23 |
--------------------------------------------------------------------------------
/shared/components/Loading.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, ActivityIndicator } from "react-native";
3 |
4 | export default class Loading extends Component {
5 | render() {
6 | return (
7 |
21 |
22 |
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/android/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/assets/img/exit.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/screens/Menu/ChildMenuItem.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Text, TouchableOpacity } from "react-native";
3 |
4 | export default class ChildMenuItem extends Component {
5 | render() {
6 | return (
7 |
17 |
22 | {this.props.title}
23 |
24 |
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/shared/state/task_statuses.js:
--------------------------------------------------------------------------------
1 | import i18n from "../../utils/i18n";
2 |
3 | module.exports = {
4 | 1: {
5 | name: i18n.t("task_status.new"),
6 | color: "#139CFF"
7 | },
8 | 2: {
9 | name: i18n.t("task_status.assigned"),
10 | color: "#dddddd"
11 | },
12 | 3: {
13 | name: i18n.t("task_status.planned"),
14 | color: "#abccba"
15 | },
16 | 4: {
17 | name: i18n.t("task_status.waiting"),
18 | color: "#FF9901"
19 | },
20 | 5: {
21 | name: i18n.t("task_status.solved"),
22 | color: "#52CD26"
23 | },
24 | 6: {
25 | name: i18n.t("task_status.closed"),
26 | color: "#0065AE"
27 | },
28 | 7: {
29 | name: i18n.t("task_status.unsolved"),
30 | color: "#dabbad"
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/ios/SamrukEnergyTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/screens/Compliance/VideosScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, TouchableOpacity } from "react-native";
3 | import Icon from "react-native-vector-icons/MaterialIcons";
4 | import VideoListScreen from "../VideoListScreen";
5 | import i18n from "../../utils/i18n";
6 | import urls from "../../shared/state/urls";
7 |
8 | export default class VideosScreen extends Component {
9 | static navigationOptions = ({ navigation, navigationOptions }) => {
10 | return {
11 | title: i18n.t("menu.videos"),
12 | headerLeft: (
13 |
17 |
18 |
19 | )
20 | };
21 | };
22 | render() {
23 | return (
24 |
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useAndroidX=true
21 | android.enableJetifier=true
22 |
--------------------------------------------------------------------------------
/screens/Compliance/EducationalScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, TouchableOpacity } from "react-native";
3 | import Icon from "react-native-vector-icons/MaterialIcons";
4 | import i18n from "../../utils/i18n";
5 | import urls from "../../shared/state/urls";
6 | import DocumentListScreen from "../DocumentListScreen";
7 |
8 | export default class EducationalScreen extends Component {
9 | static navigationOptions = ({ navigation, navigationOptions }) => {
10 | return {
11 | title: i18n.t("menu.training_materials"),
12 | headerLeft: (
13 |
17 |
18 |
19 | )
20 | };
21 | };
22 | constructor(props) {
23 | super(props);
24 | }
25 | render() {
26 | return ;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/android/app/src/main/java/kz/samrukenergy/portal/MainActivity.java:
--------------------------------------------------------------------------------
1 | package kz.samrukenergy.portal;
2 |
3 | import com.facebook.react.ReactActivity;
4 | import com.facebook.react.ReactActivityDelegate;
5 | import com.facebook.react.ReactRootView;
6 | import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
7 |
8 |
9 |
10 | public class MainActivity extends ReactActivity {
11 |
12 | /**
13 | * Returns the name of the main component registered from JavaScript. This is used to schedule
14 | * rendering of the component.
15 | */
16 | @Override
17 | protected String getMainComponentName() {
18 | return "SamrukEnergy";
19 | }
20 |
21 | @Override
22 | protected ReactActivityDelegate createReactActivityDelegate() {
23 | return new ReactActivityDelegate(this, getMainComponentName()) {
24 | @Override
25 | protected ReactRootView createRootView() {
26 | return new RNGestureHandlerEnabledRootView(MainActivity.this);
27 | }
28 | };
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/shared/components/InputErrorMessage.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, Text, Image } from "react-native";
3 | import colors from "../state/colors";
4 | import styles from "../state/styles";
5 |
6 | export default class InputErrorMessage extends Component {
7 | componentDidMount() {}
8 | render() {
9 | return (
10 |
16 |
27 | {this.props.errorMessage}
28 |
29 |
33 |
34 | );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/shared/state/urls.js:
--------------------------------------------------------------------------------
1 | let data = {
2 | organizations: "/api/organizations",
3 | login: "/api/login",
4 | categories: "/api/categories",
5 | subcategories: "/api/categories/{:id}/subcategories",
6 | new_ticket: "/api/ticket",
7 | employees: "/api/users",
8 | my_tasks: "/api/my-tickets",
9 | assigned_tasks: "/api/assigned-tickets",
10 | departments: "/api/departments",
11 | department: "/api/department/",
12 | task_help_video: "/api/help_video",
13 | task: "/api/ticket/",
14 | structure: "/api/orgstuct",
15 | compliance_faq: "/api/komplaens/faq?page=",
16 | projects: "/api/projects",
17 | project: "/api/project/",
18 | news_categories: "/api/news/categories",
19 | category_news: "/api/news/category/",
20 | news: "/api/news/",
21 | take_task: "/api/ticket/accept-ticket/",
22 | task_close: "/api/ticket/close/",
23 | task_comment: "/api/ticket/comment/",
24 | educational_materials: "/api/komplaens/posts",
25 | compliance_videos: "/api/komplaens/videos",
26 | process_owners: "/api/buisnessprocess"
27 | };
28 | module.exports = data;
29 |
--------------------------------------------------------------------------------
/screens/Task/TaskCommentScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Image,
4 | View,
5 | Text,
6 | TextInput,
7 | ScrollView,
8 | TouchableOpacity
9 | } from "react-native";
10 | import i18n from "../../utils/i18n";
11 | import ImageUploader from "../../shared/components/ImageUploader";
12 | import styles from "../../shared/state/styles";
13 |
14 | export default class TaskCommentScreen extends Component {
15 | constructor(props) {}
16 | render() {
17 | return (
18 |
19 |
27 | {i18n.t("task.comment")}
28 |
29 |
33 |
34 |
40 | {i18n.t("action")}
41 |
42 |
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "28.0.3"
6 | minSdkVersion = 16
7 | compileSdkVersion = 28
8 | targetSdkVersion = 28
9 | supportLibVersion = "28.0.0"
10 | }
11 | repositories {
12 | google()
13 | jcenter()
14 | maven {
15 | url 'https://maven.fabric.io/public'
16 | }
17 | }
18 | dependencies {
19 | classpath('com.android.tools.build:gradle:3.5.1')
20 | classpath 'com.google.gms:google-services:4.3.2'
21 | classpath 'io.fabric.tools:gradle:1.31.0'
22 |
23 | // NOTE: Do not place your application dependencies here; they belong
24 | // in the individual module build.gradle files
25 | }
26 | }
27 |
28 | allprojects {
29 | repositories {
30 | mavenLocal()
31 | maven {
32 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
33 | url("$rootDir/../node_modules/react-native/android")
34 | }
35 | maven {
36 | // Android JSC is installed from npm
37 | url("$rootDir/../node_modules/jsc-android/dist")
38 | }
39 |
40 | google()
41 | jcenter()
42 |
43 | maven { url 'https://jitpack.io' }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/screens/About/StructureScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Image, View, Text, TouchableOpacity, FlatList } from "react-native";
3 | import Loading from "../../shared/components/Loading";
4 | import axios from "../../plugins/axios";
5 | import urls from "../../shared/state/urls";
6 |
7 | export default class StructureScreen extends Component {
8 | constructor(props) {
9 | super(props);
10 | this.state = {
11 | nextPage: null,
12 | data: [],
13 | loading: false
14 | };
15 |
16 | this.fetchData = this.fetchData.bind(this);
17 | }
18 | componentDidMount() {
19 | this.fetchData();
20 | }
21 | async fetchData() {
22 | this.setState({ loading: true });
23 |
24 | try {
25 | let instance = await axios.instance();
26 |
27 | let response = await instance.get(urls.structure);
28 | console.log(response);
29 |
30 | this.setState({
31 | data: response.orgstruct,
32 | loading: false
33 | });
34 | } catch (error) {
35 | console.log(error);
36 | this.setState({
37 | loading: false
38 | });
39 | }
40 | }
41 | render() {
42 | return (
43 |
50 | {this.state.loading && }
51 |
52 | );
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "40.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "60.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "58.png",
19 | "scale" : "2x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "87.png",
25 | "scale" : "3x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "80.png",
31 | "scale" : "2x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "120.png",
37 | "scale" : "3x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "120 copy.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "180.png",
49 | "scale" : "3x"
50 | },
51 | {
52 | "size" : "1024x1024",
53 | "idiom" : "ios-marketing",
54 | "filename" : "1024.png",
55 | "scale" : "1x"
56 | }
57 | ],
58 | "info" : {
59 | "version" : 1,
60 | "author" : "xcode"
61 | }
62 | }
--------------------------------------------------------------------------------
/assets/img/success.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 279624001966-2v1d1kcmo6058nirsh1dl6nhfks608tl.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.279624001966-2v1d1kcmo6058nirsh1dl6nhfks608tl
9 | ANDROID_CLIENT_ID
10 | 279624001966-pft645pflfuqr717umnqe62pli3pshoh.apps.googleusercontent.com
11 | API_KEY
12 | AIzaSyAPknmf3Tiano0vnmeSr_9KADpoVFvXRaQ
13 | GCM_SENDER_ID
14 | 279624001966
15 | PLIST_VERSION
16 | 1
17 | BUNDLE_ID
18 | kz.samrukenergy.portal
19 | PROJECT_ID
20 | samruk-energy-app
21 | STORAGE_BUCKET
22 | samruk-energy-app.appspot.com
23 | IS_ADS_ENABLED
24 |
25 | IS_ANALYTICS_ENABLED
26 |
27 | IS_APPINVITE_ENABLED
28 |
29 | IS_GCM_ENABLED
30 |
31 | IS_SIGNIN_ENABLED
32 |
33 | GOOGLE_APP_ID
34 | 1:279624001966:ios:7694b735a89c7e46
35 | DATABASE_URL
36 | https://samruk-energy-app.firebaseio.com
37 |
38 |
--------------------------------------------------------------------------------
/assets/img/test_icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "kz.samrukenergy.portal",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "kz.samrukenergy.portal",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SamrukEnergy",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "@react-native-community/async-storage": "^1.6.2",
14 | "axios": "^0.19.0",
15 | "axios-logger": "^2.2.1",
16 | "i18n-js": "^3.3.0",
17 | "react": "16.11.0",
18 | "react-native": "0.61.2",
19 | "react-native-gesture-handler": "^1.4.1",
20 | "react-native-htmlview": "^0.15.0",
21 | "react-native-image-header-scroll-view": "^0.10.3",
22 | "react-native-keyboard-spacer": "^0.4.1",
23 | "react-native-localize": "^1.3.1",
24 | "react-native-modalbox": "^2.0.0",
25 | "react-native-ratings": "^6.5.0",
26 | "react-native-reanimated": "^1.3.0",
27 | "react-native-root-toast": "^3.2.0",
28 | "react-native-screens": "^2.0.0-alpha.6",
29 | "react-native-tab-view": "^2.10.0",
30 | "react-native-vector-icons": "^6.6.0",
31 | "react-native-webview": "^7.4.3",
32 | "react-navigation": "^4.0.10",
33 | "react-navigation-drawer": "^2.3.1",
34 | "react-navigation-stack": "^1.10.3"
35 | },
36 | "devDependencies": {
37 | "@babel/core": "^7.6.4",
38 | "@babel/runtime": "^7.6.3",
39 | "@react-native-community/eslint-config": "^0.0.5",
40 | "babel-jest": "^24.9.0",
41 | "eslint": "^6.6.0",
42 | "jest": "^24.9.0",
43 | "metro-react-native-babel-preset": "^0.56.3",
44 | "react-test-renderer": "16.11.0"
45 | },
46 | "jest": {
47 | "preset": "react-native"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/plugins/axios.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import * as AxiosLogger from "axios-logger";
3 | import AsyncStorage from "@react-native-community/async-storage";
4 |
5 | let base = "http://testportal.samruk-energy.kz";
6 | if (__DEV__) base = "http://testportal.samruk-energy.kz";
7 |
8 | export default {
9 | instance: async function() {
10 | const headers = {};
11 | const token = await AsyncStorage.getItem("token");
12 | if (token) {
13 | headers["api-token"] = token;
14 | }
15 | let inst = axios.create({
16 | baseURL: base,
17 | headers: headers
18 | });
19 | inst.interceptors.request.use(
20 | AxiosLogger.requestLogger,
21 | AxiosLogger.errorLogger
22 | );
23 | inst.interceptors.response.use(
24 | async function(response) {
25 | console.log(
26 | "======================================================================================================"
27 | );
28 | console.log(response);
29 | console.log(
30 | "======================================================================================================"
31 | );
32 | if (response.data.status) {
33 | if (response.data.content && response.data.content.api_token) {
34 | await AsyncStorage.setItem(
35 | "token",
36 | response.data.content.api_token
37 | );
38 | }
39 | return response.data.content;
40 | } else {
41 | return Promise.reject(response);
42 | }
43 | },
44 | async function(error) {
45 | return Promise.reject({ ...error });
46 | }
47 | );
48 |
49 | return inst;
50 | }
51 | };
52 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import "AppDelegate.h"
9 |
10 | #import
11 | #import
12 | #import
13 | #import
14 | #import
15 |
16 | @implementation AppDelegate
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
19 | {
20 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
21 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
22 | moduleName:@"SamrukEnergy"
23 | initialProperties:nil];
24 |
25 | [Fabric with:@[[Crashlytics class]]];
26 |
27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 |
29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 | UIViewController *rootViewController = [UIViewController new];
31 | rootViewController.view = rootView;
32 | self.window.rootViewController = rootViewController;
33 | [self.window makeKeyAndVisible];
34 | return YES;
35 | }
36 |
37 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
38 | {
39 | #if DEBUG
40 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
41 | #else
42 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
43 | #endif
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSExceptionDomains
28 |
29 | localhost
30 |
31 | NSExceptionAllowsInsecureHTTPLoads
32 |
33 |
34 |
35 |
36 | NSLocationWhenInUseUsageDescription
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | armv7
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | UIViewControllerBasedStatusBarAppearance
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/shared/components/StatedInput.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, TextInput, Text, Image } from "react-native";
3 | import InputErrorMessage from "./InputErrorMessage";
4 | import colors from "../state/colors";
5 | import styles from "../state/styles";
6 |
7 | export default class StatedInput extends Component {
8 | componentDidMount() {}
9 | render() {
10 | return (
11 |
12 | {
17 | return this.props.error === true
18 | ? { borderBottomColor: colors.red }
19 | : null;
20 | })(),
21 | (() => {
22 | return this.props.multiline === true
23 | ? { textAlignVertical: "top" }
24 | : null;
25 | })()
26 | ]}
27 | autoCompleteType={this.props.autoCompleteType}
28 | autoCorrect={false}
29 | ref={this.props.refProp}
30 | returnKeyType={this.props.returnKeyType}
31 | onChangeText={this.props.onChangeText}
32 | onSubmitEditing={this.props.onSubmitEditing}
33 | blurOnSubmit={false}
34 | multiline={this.props.multiline}
35 | placeholder={this.props.placeholder}
36 | editable={this.props.editable}
37 | value={this.props.value}
38 | numberOfLines={this.props.numberOfLines}
39 | />
40 | {(() => {
41 | return this.props.error === true ? (
42 |
43 | ) : null;
44 | })()}
45 |
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_entities_maps_legacy.json:
--------------------------------------------------------------------------------
1 | {"Aacute":"\u00C1","aacute":"\u00E1","Acirc":"\u00C2","acirc":"\u00E2","acute":"\u00B4","AElig":"\u00C6","aelig":"\u00E6","Agrave":"\u00C0","agrave":"\u00E0","amp":"&","AMP":"&","Aring":"\u00C5","aring":"\u00E5","Atilde":"\u00C3","atilde":"\u00E3","Auml":"\u00C4","auml":"\u00E4","brvbar":"\u00A6","Ccedil":"\u00C7","ccedil":"\u00E7","cedil":"\u00B8","cent":"\u00A2","copy":"\u00A9","COPY":"\u00A9","curren":"\u00A4","deg":"\u00B0","divide":"\u00F7","Eacute":"\u00C9","eacute":"\u00E9","Ecirc":"\u00CA","ecirc":"\u00EA","Egrave":"\u00C8","egrave":"\u00E8","ETH":"\u00D0","eth":"\u00F0","Euml":"\u00CB","euml":"\u00EB","frac12":"\u00BD","frac14":"\u00BC","frac34":"\u00BE","gt":">","GT":">","Iacute":"\u00CD","iacute":"\u00ED","Icirc":"\u00CE","icirc":"\u00EE","iexcl":"\u00A1","Igrave":"\u00CC","igrave":"\u00EC","iquest":"\u00BF","Iuml":"\u00CF","iuml":"\u00EF","laquo":"\u00AB","lt":"<","LT":"<","macr":"\u00AF","micro":"\u00B5","middot":"\u00B7","nbsp":"\u00A0","not":"\u00AC","Ntilde":"\u00D1","ntilde":"\u00F1","Oacute":"\u00D3","oacute":"\u00F3","Ocirc":"\u00D4","ocirc":"\u00F4","Ograve":"\u00D2","ograve":"\u00F2","ordf":"\u00AA","ordm":"\u00BA","Oslash":"\u00D8","oslash":"\u00F8","Otilde":"\u00D5","otilde":"\u00F5","Ouml":"\u00D6","ouml":"\u00F6","para":"\u00B6","plusmn":"\u00B1","pound":"\u00A3","quot":"\"","QUOT":"\"","raquo":"\u00BB","reg":"\u00AE","REG":"\u00AE","sect":"\u00A7","shy":"\u00AD","sup1":"\u00B9","sup2":"\u00B2","sup3":"\u00B3","szlig":"\u00DF","THORN":"\u00DE","thorn":"\u00FE","times":"\u00D7","Uacute":"\u00DA","uacute":"\u00FA","Ucirc":"\u00DB","ucirc":"\u00FB","Ugrave":"\u00D9","ugrave":"\u00F9","uml":"\u00A8","Uuml":"\u00DC","uuml":"\u00FC","Yacute":"\u00DD","yacute":"\u00FD","yen":"\u00A5","yuml":"\u00FF"}
--------------------------------------------------------------------------------
/screens/CorporateGovernance/CorporateGovernanceScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { TouchableOpacity } from "react-native";
3 | import Icon from "react-native-vector-icons/MaterialIcons";
4 | import DocumentListScreen from "../DocumentListScreen";
5 | import i18n from "../../utils/i18n";
6 |
7 | export default class CorporateGovernanceScreen extends Component {
8 | static navigationOptions = ({ navigation, navigationOptions }) => {
9 | return {
10 | title: i18n.t("corporate_governance"),
11 | headerLeft: (
12 |
16 |
17 |
18 | )
19 | };
20 | };
21 | constructor(props) {
22 | super(props);
23 | this.state = {
24 | data: [
25 | {
26 | name: "Инструкций по подаче заявки в техническую поддержку",
27 | url: "https://www.dopdf.com/download/pdf/dopdf-eula.pdf",
28 | date_mod: "16-10-2018 14:47"
29 | },
30 | {
31 | name:
32 | "Годовой отчет как инструмент коммуникации с заинтересованными сторонами",
33 | url: "https://www.dopdf.com/download/pdf/dopdf-eula.pdf",
34 | date_mod: "16-10-2018 14:47"
35 | },
36 | {
37 | name:
38 | "Презентация/обучающий семинар на тему: «Внедрение системы устойчивого развития в Группе Компаний АО «Самрук-Энерго»",
39 | url: "https://www.dopdf.com/download/pdf/dopdf-eula.pdf",
40 | date_mod: "16-10-2018 14:47"
41 | }
42 | ]
43 | };
44 | }
45 | render() {
46 | return ;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/screens/Splash/SplashScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, Image, ActivityIndicator, StatusBar } from "react-native";
3 | import AsyncStorage from "@react-native-community/async-storage";
4 | // import GlobalState from "../../shared/state/GlobalState";
5 |
6 | export default class SplashScreen extends Component {
7 | constructor() {
8 | super();
9 | this._bootstrapAsync = this._bootstrapAsync.bind(this);
10 | setTimeout(this._bootstrapAsync, 1000);
11 | }
12 | _bootstrapAsync = async () => {
13 | // await AsyncStorage.removeItem("me");
14 | // await AsyncStorage.removeItem("token");
15 | let user = await AsyncStorage.getItem("me");
16 | user = JSON.parse(user);
17 | if (user && !user.glpi_id) {
18 | console.log("---------------------------SPLASH--- REMOVING USER DATA");
19 | await AsyncStorage.removeItem("token");
20 | await AsyncStorage.removeItem("me");
21 | }
22 | // console.log(userToken);
23 | // GlobalState.token = userToken;
24 | // This will switch to the App screen or Auth screen and this loading
25 | // screen will be unmounted and thrown away.
26 |
27 | this.props.navigation.navigate(user && user.glpi_id ? "Main" : "Auth");
28 | };
29 | render() {
30 | return (
31 |
39 |
47 |
48 |
49 |
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/screens/Compliance/FaqScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, TouchableOpacity, Text, ScrollView } from "react-native";
3 | import Icon from "react-native-vector-icons/MaterialIcons";
4 | import i18n from "../../utils/i18n";
5 |
6 | export default class FaqScreen extends Component {
7 | // static navigationOptions = ({ navigation, navigationOptions }) => {
8 | // return {
9 | // title: i18n.t("menu.faq"),
10 | // headerLeft: (
11 | //
15 | //
16 | //
17 | // )
18 | // };
19 | // };
20 | static navigationOptions = ({ navigation, navigationOptions }) => {
21 | return {
22 | headerStyle: {
23 | backgroundColor: "#FFFFFF"
24 | },
25 | headerTintColor: "#000000"
26 | };
27 | };
28 | constructor(props) {
29 | super(props);
30 | this.state = {
31 | title: this.props.navigation.getParam("title"),
32 | text: this.props.navigation.getParam("text")
33 | };
34 | }
35 | render() {
36 | return (
37 |
45 |
52 | {this.state.title}
53 |
54 |
61 | {this.state.text}
62 |
63 |
64 | );
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/shared/state/styles.js:
--------------------------------------------------------------------------------
1 | import { StyleSheet } from "react-native";
2 | import colors from "./colors";
3 |
4 | module.exports = StyleSheet.create({
5 | whiteBotton: {
6 | width: "100%",
7 | paddingTop: 13,
8 | fontWeight: "300",
9 | lineHeight: 24,
10 | fontSize: 16,
11 | paddingBottom: 13,
12 | backgroundColor: "#ffffff"
13 | },
14 | icon: {
15 | height: 16,
16 | width: 16,
17 | position: "absolute",
18 | right: 0,
19 | top: "50%",
20 | marginTop: -8
21 | },
22 | screenTitles: {
23 | fontSize: 18,
24 | fontWeight: "500"
25 | },
26 | alert: {
27 | justifyContent: "center",
28 | alignItems: "center",
29 | width: 280,
30 | paddingTop: 21,
31 | paddingLeft: 24,
32 | height: "auto",
33 | paddingRight: 21,
34 | paddingBottom: 52,
35 | position: "relative"
36 | },
37 | alertActions: {
38 | position: "absolute",
39 | bottom: 8,
40 | display: "flex",
41 | flexDirection: "row",
42 | justifyContent: "flex-end",
43 | right: 8
44 | },
45 | alertTitle: {
46 | width: "100%",
47 | alignSelf: "flex-start",
48 | fontWeight: "500",
49 | fontSize: 20,
50 | marginBottom: 12,
51 | color: "#000000",
52 | opacity: 0.87
53 | },
54 | alertDescription: {
55 | fontSize: 16,
56 | color: "#000000",
57 | opacity: 0.54
58 | },
59 | alertButton: {
60 | lineHeight: 36,
61 | textTransform: "uppercase",
62 | paddingLeft: 11,
63 | paddingRight: 11,
64 | fontSize: 14,
65 | fontWeight: "500"
66 | },
67 | input: {
68 | width: "100%",
69 | fontSize: 16,
70 | fontWeight: "400",
71 | paddingTop: 13,
72 | paddingBottom: 11,
73 | borderBottomColor: colors.gray,
74 | borderBottomWidth: 1
75 | },
76 | toolbar: {
77 | backgroundColor: colors.blue,
78 | color: "#ffffff"
79 | }
80 | });
81 |
82 | const text_sizes = {
83 | sm: 14,
84 | normal: 16
85 | };
86 |
87 | const spaces = {};
88 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_domserializer_node_modules_entities_lib_maps_legacy.json:
--------------------------------------------------------------------------------
1 | { "Aacute": "\u00C1", "aacute": "\u00E1", "Acirc": "\u00C2", "acirc": "\u00E2", "acute": "\u00B4", "AElig": "\u00C6", "aelig": "\u00E6", "Agrave": "\u00C0", "agrave": "\u00E0", "amp": "&", "AMP": "&", "Aring": "\u00C5", "aring": "\u00E5", "Atilde": "\u00C3", "atilde": "\u00E3", "Auml": "\u00C4", "auml": "\u00E4", "brvbar": "\u00A6", "Ccedil": "\u00C7", "ccedil": "\u00E7", "cedil": "\u00B8", "cent": "\u00A2", "copy": "\u00A9", "COPY": "\u00A9", "curren": "\u00A4", "deg": "\u00B0", "divide": "\u00F7", "Eacute": "\u00C9", "eacute": "\u00E9", "Ecirc": "\u00CA", "ecirc": "\u00EA", "Egrave": "\u00C8", "egrave": "\u00E8", "ETH": "\u00D0", "eth": "\u00F0", "Euml": "\u00CB", "euml": "\u00EB", "frac12": "\u00BD", "frac14": "\u00BC", "frac34": "\u00BE", "gt": ">", "GT": ">", "Iacute": "\u00CD", "iacute": "\u00ED", "Icirc": "\u00CE", "icirc": "\u00EE", "iexcl": "\u00A1", "Igrave": "\u00CC", "igrave": "\u00EC", "iquest": "\u00BF", "Iuml": "\u00CF", "iuml": "\u00EF", "laquo": "\u00AB", "lt": "<", "LT": "<", "macr": "\u00AF", "micro": "\u00B5", "middot": "\u00B7", "nbsp": "\u00A0", "not": "\u00AC", "Ntilde": "\u00D1", "ntilde": "\u00F1", "Oacute": "\u00D3", "oacute": "\u00F3", "Ocirc": "\u00D4", "ocirc": "\u00F4", "Ograve": "\u00D2", "ograve": "\u00F2", "ordf": "\u00AA", "ordm": "\u00BA", "Oslash": "\u00D8", "oslash": "\u00F8", "Otilde": "\u00D5", "otilde": "\u00F5", "Ouml": "\u00D6", "ouml": "\u00F6", "para": "\u00B6", "plusmn": "\u00B1", "pound": "\u00A3", "quot": "\"", "QUOT": "\"", "raquo": "\u00BB", "reg": "\u00AE", "REG": "\u00AE", "sect": "\u00A7", "shy": "\u00AD", "sup1": "\u00B9", "sup2": "\u00B2", "sup3": "\u00B3", "szlig": "\u00DF", "THORN": "\u00DE", "thorn": "\u00FE", "times": "\u00D7", "Uacute": "\u00DA", "uacute": "\u00FA", "Ucirc": "\u00DB", "ucirc": "\u00FB", "Ugrave": "\u00D9", "ugrave": "\u00F9", "uml": "\u00A8", "Uuml": "\u00DC", "uuml": "\u00FC", "Yacute": "\u00DD", "yacute": "\u00FD", "yen": "\u00A5", "yuml": "\u00FF" }
2 |
--------------------------------------------------------------------------------
/assets/img/logo-icon.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/screens/Menu/MenuItem.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Image, TouchableOpacity, Text, StyleSheet } from "react-native";
3 | import Icon from "react-native-vector-icons/MaterialIcons";
4 |
5 | export default class MenuItem extends Component {
6 | constructor(props) {
7 | super(props);
8 | }
9 |
10 | render() {
11 | return (
12 |
13 |
14 | {this.props.title}
15 | {this.props.hasChildren && (
16 |
26 | )}
27 |
28 | );
29 | }
30 |
31 | styles = StyleSheet.create({
32 | leftIcon: {
33 | width: 20,
34 | marginRight: 11,
35 | flexBasis: 20,
36 | flexShrink: 0,
37 | flexGrow: 0
38 | // flex: "0 0 auto"
39 | },
40 | rightIcon: {
41 | marginLeft: 23,
42 | marginRight: 23,
43 | flexBasis: 20,
44 | flexShrink: 0,
45 | // position: "absolute",
46 | // right: 23,
47 | flexGrow: 0
48 | // flex: "0 0 auto"
49 | },
50 | text: {
51 | fontSize: 14,
52 | color: "#232323",
53 | flexGrow: 1
54 | // flex: "1 0 auto"
55 | },
56 | button: {
57 | paddingRight: 0,
58 | paddingLeft: 20,
59 | width: "100%",
60 | display: "flex",
61 | alignItems: "center",
62 | position: "relative",
63 | flexDirection: "row",
64 | justifyContent: "space-between",
65 | height: 48,
66 | backgroundColor: "#ffffff",
67 | borderBottomWidth: 1,
68 | borderBottomColor: "#c4c4c4"
69 | }
70 | });
71 | }
72 |
--------------------------------------------------------------------------------
/screens/Success/SuccessScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Image, View, Text } from "react-native";
3 | import { StackActions } from "react-navigation";
4 | import i18n from "../../utils/i18n";
5 | import Button from "../../shared/components/Button";
6 | import styles from "../../shared/state/styles";
7 |
8 | export default class SuccessScreen extends Component {
9 | static navigationOptions = {
10 | title: i18n.t("ticket_sent"),
11 | headerTitleStyle: {
12 | textAlign: "center",
13 | width: "100%",
14 | paddingRight: 86
15 | }
16 | };
17 | constructor(props) {
18 | super(props);
19 | this.state = {
20 | message: this.props.navigation.getParam("message")
21 | };
22 | this.closeMe = this.closeMe.bind(this);
23 | }
24 | render() {
25 | return (
26 |
34 |
41 |
50 |
59 | {this.state.message}
60 |
61 |
62 |
67 |
68 | );
69 | }
70 |
71 | closeMe() {
72 | this.props.navigation.goBack(null);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/assets/img/logo-conture.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/screens/About/SearchUserScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, TouchableOpacity, TextInput } from "react-native";
3 | import Icon from "react-native-vector-icons/MaterialIcons";
4 | import { i18n } from "../../utils/i18n";
5 | import UsersScreen from "../UsersScreen";
6 |
7 | export default class SearchUserScreen extends Component {
8 | constructor(props) {
9 | super(props);
10 | this.state = {
11 | query: ""
12 | };
13 | }
14 | render() {
15 | return (
16 |
22 |
30 | {
42 | this.props.navigation.goBack();
43 | }}
44 | >
45 |
46 |
47 |
55 |
56 |
72 |
73 | );
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "279624001966",
4 | "firebase_url": "https://samruk-energy-app.firebaseio.com",
5 | "project_id": "samruk-energy-app",
6 | "storage_bucket": "samruk-energy-app.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:279624001966:android:7694b735a89c7e46",
12 | "android_client_info": {
13 | "package_name": "kz.samrukenergy.portal"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "279624001966-pft645pflfuqr717umnqe62pli3pshoh.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "kz.samrukenergy.portal",
22 | "certificate_hash": "2958f03a2bb598af47a080f6def6e8d218d1995a"
23 | }
24 | },
25 | {
26 | "client_id": "279624001966-u4kvc7a2lhtfu8d2uf8iuua3200k7api.apps.googleusercontent.com",
27 | "client_type": 1,
28 | "android_info": {
29 | "package_name": "kz.samrukenergy.portal",
30 | "certificate_hash": "bfc4795a4f38cc2f40ac9af46c395060cb163e61"
31 | }
32 | },
33 | {
34 | "client_id": "279624001966-p647vdabcqjaf56l7ho7ost6q5onlno1.apps.googleusercontent.com",
35 | "client_type": 1,
36 | "android_info": {
37 | "package_name": "kz.samrukenergy.portal",
38 | "certificate_hash": "9afca77474cc78d894b80c04009646d0c5be73a8"
39 | }
40 | },
41 | {
42 | "client_id": "279624001966-dm2t45qbc0aumpeeaduj7eo9dj9ga9j2.apps.googleusercontent.com",
43 | "client_type": 3
44 | }
45 | ],
46 | "api_key": [
47 | {
48 | "current_key": "AIzaSyA7n7wDPtL68JWVlKzOC2D2uJTnPTP4ENI"
49 | }
50 | ],
51 | "services": {
52 | "appinvite_service": {
53 | "other_platform_oauth_client": [
54 | {
55 | "client_id": "279624001966-dm2t45qbc0aumpeeaduj7eo9dj9ga9j2.apps.googleusercontent.com",
56 | "client_type": 3
57 | }
58 | ]
59 | }
60 | }
61 | }
62 | ],
63 | "configuration_version": "1"
64 | }
--------------------------------------------------------------------------------
/ios/SamrukEnergyTests/SamrukEnergyTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | #import
12 | #import
13 |
14 | #define TIMEOUT_SECONDS 600
15 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
16 |
17 | @interface SamrukEnergyTests : XCTestCase
18 |
19 | @end
20 |
21 | @implementation SamrukEnergyTests
22 |
23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
24 | {
25 | if (test(view)) {
26 | return YES;
27 | }
28 | for (UIView *subview in [view subviews]) {
29 | if ([self findSubviewInView:subview matching:test]) {
30 | return YES;
31 | }
32 | }
33 | return NO;
34 | }
35 |
36 | - (void)testRendersWelcomeScreen
37 | {
38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
40 | BOOL foundElement = NO;
41 |
42 | __block NSString *redboxError = nil;
43 | #ifdef DEBUG
44 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
45 | if (level >= RCTLogLevelError) {
46 | redboxError = message;
47 | }
48 | });
49 | #endif
50 |
51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
54 |
55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
57 | return YES;
58 | }
59 | return NO;
60 | }];
61 | }
62 |
63 | #ifdef DEBUG
64 | RCTSetLogFunction(RCTDefaultLogFunction);
65 | #endif
66 |
67 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
68 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
69 | }
70 |
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | SamrukEnergy
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 2.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | Fabric
26 |
27 | APIKey
28 | c8a640777b9d2ee750e04984a9cedb11a06249c9
29 | Kits
30 |
31 |
32 | KitInfo
33 |
34 | KitName
35 | Crashlytics
36 |
37 |
38 |
39 | LSRequiresIPhoneOS
40 |
41 | NSAppTransportSecurity
42 |
43 | NSAllowsArbitraryLoads
44 |
45 | NSExceptionDomains
46 |
47 | localhost
48 |
49 | NSExceptionAllowsInsecureHTTPLoads
50 |
51 |
52 | testportal.samruk-energy.kz
53 |
54 | NSExceptionAllowsInsecureHTTPLoads
55 |
56 |
57 |
58 |
59 | NSLocationWhenInUseUsageDescription
60 |
61 | UIAppFonts
62 |
63 | MaterialIcons.ttf
64 |
65 | UILaunchStoryboardName
66 | LaunchScreen
67 | UIRequiredDeviceCapabilities
68 |
69 | armv7
70 |
71 | UISupportedInterfaceOrientations
72 |
73 | UIInterfaceOrientationPortrait
74 | UIInterfaceOrientationLandscapeLeft
75 | UIInterfaceOrientationLandscapeRight
76 |
77 | UIViewControllerBasedStatusBarAppearance
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; These should not be required directly
12 | ; require from fbjs/lib instead: require('fbjs/lib/warning')
13 | node_modules/warning/.*
14 |
15 | ; Flow doesn't support platforms
16 | .*/Libraries/Utilities/LoadingView.js
17 |
18 | [untyped]
19 | .*/node_modules/@react-native-community/cli/.*/.*
20 |
21 | [include]
22 |
23 | [libs]
24 | node_modules/react-native/Libraries/react-native/react-native-interface.js
25 | node_modules/react-native/flow/
26 |
27 | [options]
28 | emoji=true
29 |
30 | esproposal.optional_chaining=enable
31 | esproposal.nullish_coalescing=enable
32 |
33 | module.file_ext=.js
34 | module.file_ext=.json
35 | module.file_ext=.ios.js
36 |
37 | munge_underscores=true
38 |
39 | module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation'
40 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
41 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
42 |
43 | suppress_type=$FlowIssue
44 | suppress_type=$FlowFixMe
45 | suppress_type=$FlowFixMeProps
46 | suppress_type=$FlowFixMeState
47 |
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
50 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
51 |
52 | [lints]
53 | sketchy-null-number=warn
54 | sketchy-null-mixed=warn
55 | sketchy-number=warn
56 | untyped-type-import=warn
57 | nonstrict-import=warn
58 | deprecated-type=warn
59 | unsafe-getters-setters=warn
60 | inexact-spread=warn
61 | unnecessary-invariant=warn
62 | signature-verification-failure=warn
63 | deprecated-utility=error
64 |
65 | [strict]
66 | deprecated-type
67 | nonstrict-import
68 | sketchy-null
69 | unclear-type
70 | unsafe-getters-setters
71 | untyped-import
72 | untyped-type-import
73 |
74 | [version]
75 | ^0.105.0
76 |
--------------------------------------------------------------------------------
/screens/ListScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { FlatList, View, SafeAreaView } from "react-native";
3 | import AsyncStorage from "@react-native-community/async-storage";
4 | import i18n from "../utils/i18n";
5 | import ButtonWithIcon from "../shared/components/ButtonWithIcon";
6 | import Hr from "../shared/components/Hr";
7 |
8 | export default class ListScreen extends Component {
9 | static navigationOptions = ({ navigation }) => {
10 | return {
11 | title: navigation.getParam("title"),
12 | headerStyle: {
13 | backgroundColor: "#FFFFFF"
14 | },
15 | headerTintColor: "#000000"
16 | };
17 | };
18 | checkedIcon = require("../assets/img/2x/radio_checked.png");
19 | uncheckedIcon = require("../assets/img/2x/radio_unchecked.png");
20 |
21 | constructor(props) {
22 | super(props);
23 |
24 | this.state = {
25 | selectedItem: this.props.navigation.getParam("selectedItem"),
26 | data: this.props.navigation.getParam("data"),
27 | key: this.props.navigation.getParam("persistingKey"),
28 | callback: this.props.navigation.getParam("callback")
29 | };
30 |
31 | this.select = this.select.bind(this);
32 | }
33 | render() {
34 | return (
35 | {
45 | let icon = false;
46 | return (
47 |
48 | {
52 | this.select(item);
53 | }}
54 | />
55 |
56 |
57 | );
58 | }}
59 | keyExtractor={(item, index) => `${item.id}`}
60 | />
61 | );
62 | }
63 | async select(item) {
64 | try {
65 | await AsyncStorage.setItem(this.state.key, JSON.stringify(item));
66 | if (
67 | this.state.callback != null &&
68 | typeof this.state.callback === "function"
69 | ) {
70 | this.state.callback(this.state.key, item);
71 | }
72 | } catch (error) {
73 | if (__DEV__) {
74 | alert(error);
75 | }
76 | }
77 |
78 | this.props.navigation.goBack(null);
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/ios/SamrukEnergy/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/screens/About/DepartmentScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Image, View, Text, TouchableOpacity, FlatList } from "react-native";
3 | import Icon from "react-native-vector-icons/MaterialIcons";
4 | import UsersScreen from "../UsersScreen";
5 | import i18n from "../../utils/i18n";
6 | import axios from "../../plugins/axios";
7 | import urls from "../../shared/state/urls";
8 | import Loading from "../../shared/components/Loading";
9 |
10 | export default class DepartmentScreen extends Component {
11 | static navigationOptions = ({ navigation, navigationOptions }) => {
12 | return {
13 | title: navigation.getParam("title")
14 | };
15 | };
16 | constructor(props) {
17 | super(props);
18 | console.log("Current screen: DepartmentsScreen");
19 |
20 | this.state = {
21 | data: [],
22 | id: this.props.navigation.getParam("id"),
23 | loading: false
24 | };
25 |
26 | this.fetchData = this.fetchData.bind(this);
27 | }
28 | componentDidMount() {
29 | this.fetchData();
30 | }
31 | async fetchData() {
32 | this.setState({ loading: true });
33 |
34 | try {
35 | let instance = await axios.instance();
36 | let response = await instance.get(`${urls.department}${this.state.id}`);
37 | console.log(
38 | "====================departments================================"
39 | );
40 | console.log(response);
41 | console.log(
42 | "==============================================================="
43 | );
44 | // if (response.users.current_page === 1) {
45 | // this.setState({
46 | // nextPage: response.users.next_page_url,
47 | // data: response.users.data,
48 | // loading: false
49 | // });
50 | // } else {
51 | let data = this.state.data.concat(response.department.users);
52 | this.setState({
53 | data: data,
54 | loading: false
55 | });
56 | // }
57 | } catch (error) {
58 | console.log(error);
59 | this.setState({
60 | loading: false
61 | });
62 | }
63 | }
64 | render() {
65 | return (
66 |
73 | {this.state.loading && }
74 |
84 |
85 | );
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/android/app/src/main/java/kz/samrukenergy/portal/MainApplication.java:
--------------------------------------------------------------------------------
1 | package kz.samrukenergy.portal;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 |
6 | import com.facebook.react.PackageList;
7 | import com.facebook.react.ReactApplication;
8 | import com.facebook.react.ReactNativeHost;
9 | import com.facebook.react.ReactPackage;
10 | import com.facebook.soloader.SoLoader;
11 |
12 | import java.lang.reflect.InvocationTargetException;
13 | import java.util.List;
14 |
15 | import io.fabric.sdk.android.Fabric;
16 |
17 | import com.crashlytics.android.Crashlytics;
18 |
19 | public class MainApplication extends Application implements ReactApplication {
20 |
21 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
22 | @Override
23 | public boolean getUseDeveloperSupport() {
24 | return BuildConfig.DEBUG;
25 | }
26 |
27 | @Override
28 | protected List getPackages() {
29 | @SuppressWarnings("UnnecessaryLocalVariable")
30 | List packages = new PackageList(this).getPackages();
31 | // Packages that cannot be autolinked yet can be added manually here, for
32 | // example:
33 | // packages.add(new MyReactNativePackage());
34 | return packages;
35 | }
36 |
37 | @Override
38 | protected String getJSMainModuleName() {
39 | return "index";
40 | }
41 | };
42 |
43 | @Override
44 | public ReactNativeHost getReactNativeHost() {
45 | return mReactNativeHost;
46 | }
47 |
48 | @Override
49 | public void onCreate() {
50 | super.onCreate();
51 | Fabric.with(this, new Crashlytics());
52 | SoLoader.init(this, /* native exopackage */ false);
53 | initializeFlipper(this); // Remove this line if you don't want Flipper enabled
54 | }
55 |
56 | /**
57 | * Loads Flipper in React Native templates.
58 | *
59 | * @param context
60 | */
61 | private static void initializeFlipper(Context context) {
62 | if (BuildConfig.DEBUG) {
63 | try {
64 | /*
65 | * We use reflection here to pick up the class that initializes Flipper, since
66 | * Flipper library is not available in release mode
67 | */
68 | Class> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
69 | aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
70 | } catch (ClassNotFoundException e) {
71 | e.printStackTrace();
72 | } catch (NoSuchMethodException e) {
73 | e.printStackTrace();
74 | } catch (IllegalAccessException e) {
75 | e.printStackTrace();
76 | } catch (InvocationTargetException e) {
77 | e.printStackTrace();
78 | }
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/screens/Task/TasksTabsScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { TouchableOpacity, Dimensions } from "react-native";
3 | import { TabView, TabBar } from "react-native-tab-view";
4 | import Icon from "react-native-vector-icons/MaterialIcons";
5 | import i18n from "../../utils/i18n";
6 | import TasksScreen from "./TasksScreen";
7 | import VideoListScreen from "../VideoListScreen";
8 | import colors from "../../shared/state/colors";
9 | import urls from "../../shared/state/urls";
10 |
11 | export default class TasksTabsScreen extends Component {
12 | static navigationOptions = ({ navigation, navigationOptions }) => {
13 | return {
14 | title: i18n.t("technical_support"),
15 | headerLeft: (
16 |
20 |
21 |
22 | )
23 | };
24 | };
25 |
26 | constructor(props) {
27 | super(props);
28 | this.state = {
29 | index: 0,
30 | routes: [
31 | { key: "own_tasks", title: i18n.t("own_tasks") },
32 | { key: "working_tasks", title: i18n.t("working_tasks") },
33 | { key: "video_tutorials", title: i18n.t("video_tutorials") }
34 | ]
35 | };
36 | }
37 |
38 | render() {
39 | return (
40 | {
44 | switch (route.key) {
45 | case "own_tasks":
46 | return (
47 |
52 | );
53 | case "working_tasks":
54 | return (
55 |
60 | );
61 | case "video_tutorials":
62 | return ;
63 | }
64 | }}
65 | renderTabBar={props => (
66 |
81 | )}
82 | onIndexChange={index => this.setState({ index })}
83 | initialLayout={{ width: Dimensions.get("window").width }}
84 | />
85 | );
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/screens/DocumentListScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Image, FlatList, TouchableOpacity, Text, View } from "react-native";
3 | import axios from "../plugins/axios";
4 | import Loading from "../shared/components/Loading";
5 |
6 | export default class DocumentListScreen extends Component {
7 | constructor(props) {
8 | super(props);
9 | this.state = {
10 | loading: false,
11 | data: []
12 | };
13 |
14 | this.fetchDocuments = this.fetchDocuments.bind(this);
15 | }
16 | componentDidMount() {
17 | this.fetchDocuments();
18 | }
19 | async fetchDocuments() {
20 | this.setState({ loading: true });
21 | try {
22 | let instance = await axios.instance();
23 | let response = await instance.get(this.props.fetchUrl);
24 | this.setState({ data: response.posts });
25 | } catch (error) {
26 | console.log(error);
27 | }
28 |
29 | this.setState({ loading: false });
30 | }
31 | render() {
32 | return (
33 |
40 | {this.state.loading && }
41 | {
50 | return (
51 |
62 |
72 |
79 | {item.title}
80 |
81 |
88 | {item.publish_date}
89 |
90 |
91 | );
92 | }}
93 | keyExtractor={(item, index) => `${item.id}`}
94 | />
95 |
96 | );
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '9.0'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | target 'SamrukEnergy' do
5 | # Pods for SamrukEnergy
6 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
7 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
8 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
9 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
10 | pod 'React', :path => '../node_modules/react-native/'
11 | pod 'React-Core', :path => '../node_modules/react-native/'
12 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
13 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
14 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
15 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
16 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
17 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
18 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
19 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
20 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
21 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
22 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
23 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
24 |
25 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
26 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
27 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
28 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
29 | pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
30 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
31 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
32 |
33 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
34 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
35 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
36 | pod 'Fabric', '~> 1.10.2'
37 | pod 'Crashlytics', '~> 3.14.0'
38 | pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
39 |
40 | target 'SamrukEnergyTests' do
41 | inherit! :search_paths
42 | # Pods for testing
43 | end
44 |
45 | use_native_modules!
46 | end
47 |
48 | target 'SamrukEnergy-tvOS' do
49 | # Pods for SamrukEnergy-tvOS
50 |
51 | target 'SamrukEnergy-tvOSTests' do
52 | inherit! :search_paths
53 | # Pods for testing
54 | end
55 |
56 | end
57 |
--------------------------------------------------------------------------------
/screens/About/EmployeesScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, TouchableOpacity } from "react-native";
3 | import Icon from "react-native-vector-icons/MaterialIcons";
4 | import UsersScreen from "../UsersScreen";
5 | import i18n from "../../utils/i18n";
6 | import axios from "../../plugins/axios";
7 | import urls from "../../shared/state/urls";
8 | import Loading from "../../shared/components/Loading";
9 |
10 | export default class EmployeesScreen extends Component {
11 | static navigationOptions = ({ navigation, navigationOptions }) => {
12 | return {
13 | title: i18n.t("menu.employees"),
14 | headerLeft: (
15 |
19 |
20 |
21 | )
22 | };
23 | };
24 | constructor(props) {
25 | super(props);
26 | console.log("Current screen: EmployeesScreen");
27 |
28 | this.state = {
29 | nextPage: null,
30 | data: [],
31 | refreshing: false
32 | };
33 |
34 | this.fetchData = this.fetchData.bind(this);
35 | }
36 | componentDidMount() {
37 | this.fetchData();
38 | }
39 | async fetchData() {
40 | this.setState({ loading: true });
41 | if (this.state.nextPage === urls.employees) {
42 | this.setState({
43 | refreshing: true
44 | });
45 | }
46 | try {
47 | let instance = await axios.instance();
48 | let url = this.state.nextPage;
49 | if (!url && this.state.data.length > 0) {
50 | console.log(url);
51 | console.log(this.state.data);
52 | return;
53 | }
54 | if (!url) {
55 | url = urls.employees;
56 | }
57 | let response = await instance.get(url);
58 | console.log(response);
59 |
60 | // if (response.users.current_page === 1) {
61 | // this.setState({
62 | // nextPage: response.users.next_page_url,
63 | // data: response.users.data,
64 | // loading: false
65 | // });
66 | // } else {
67 | let data = this.state.data.concat(response.users.data);
68 | this.setState({
69 | nextPage: response.users.next_page_url,
70 | data: data
71 | });
72 | // }
73 | } catch (error) {
74 | console.log(error);
75 | }
76 | this.setState({
77 | refreshing: false
78 | });
79 | }
80 | render() {
81 | return (
82 |
89 | {
100 | this.setState({ nextPage: urls.employees });
101 | this.fetchData();
102 | }}
103 | />
104 |
105 | );
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/App.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | * @flow
7 | */
8 |
9 | import React from "react";
10 | import {
11 | SafeAreaView,
12 | StyleSheet,
13 | ScrollView,
14 | View,
15 | Text,
16 | StatusBar
17 | } from "react-native";
18 |
19 | import {
20 | Header,
21 | LearnMoreLinks,
22 | Colors,
23 | DebugInstructions,
24 | ReloadInstructions
25 | } from "react-native/Libraries/NewAppScreen";
26 |
27 | const App: () => React$Node = () => {
28 | return (
29 | <>
30 |
31 |
32 |
36 |
37 | {global.HermesInternal == null ? null : (
38 |
39 | Engine: Hermes
40 |
41 | )}
42 |
43 |
44 | Step One
45 |
46 | Edit App.js to change this
47 | screen and then come back to see your edits.
48 |
49 |
50 |
51 | See Your Changes
52 |
53 |
54 |
55 |
56 |
57 | Debug
58 |
59 |
60 |
61 |
62 |
63 | Learn More
64 |
65 | Read the docs to discover what to do next:
66 |
67 |
68 |
69 |
70 |
71 |
72 | >
73 | );
74 | };
75 |
76 | const styles = StyleSheet.create({
77 | scrollView: {
78 | backgroundColor: Colors.lighter
79 | },
80 | engine: {
81 | position: "absolute",
82 | right: 0
83 | },
84 | body: {
85 | backgroundColor: Colors.white
86 | },
87 | sectionContainer: {
88 | marginTop: 32,
89 | paddingHorizontal: 24
90 | },
91 | sectionTitle: {
92 | fontSize: 24,
93 | fontWeight: "600",
94 | color: Colors.black
95 | },
96 | sectionDescription: {
97 | marginTop: 8,
98 | fontSize: 18,
99 | fontWeight: "400",
100 | color: Colors.dark
101 | },
102 | highlight: {
103 | fontWeight: "700"
104 | },
105 | footer: {
106 | color: Colors.dark,
107 | fontSize: 12,
108 | fontWeight: "600",
109 | padding: 4,
110 | paddingRight: 12,
111 | textAlign: "right"
112 | }
113 | });
114 |
115 | export default App;
116 |
--------------------------------------------------------------------------------
/shared/components/Button.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, TouchableOpacity, StyleSheet } from 'react-native';
3 | import colors from '../state/colors';
4 |
5 |
6 | export default class Button extends Component {
7 | constructor(props) {
8 | super(props)
9 |
10 | let state = {
11 | color: "#FFFFFF",
12 | backgroundColor: colors.blue
13 | }
14 |
15 | if (props.disabled) {
16 | state.backgroundColor = "#dadada"
17 | }
18 |
19 | if (props.style) {
20 | let positionStyles = {}
21 | let positionalStylesList = ['position', 'top', 'left', 'bottom', 'right', 'height', 'width', 'overflow', 'float', 'margin', 'marginTop', 'marginBottom', 'marginLeft', 'marginRight']
22 | for (let i = 0; i < positionalStylesList.length; i++) {
23 | if (props.style.hasOwnProperty(positionalStylesList[i])) {
24 | positionStyles[positionalStylesList[i]] = props.style[positionalStylesList[i]]
25 | }
26 | }
27 |
28 | state.positionStyles = positionStyles
29 |
30 | let presentationStyles = {}
31 | let presentationsStylesList = ['font-size', 'fontSize', 'color', 'background-color', 'backgroundColor', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'border', 'borderColor', 'borderWidth', 'borderRadius', 'borderTopWidth', 'borderTopColor', 'borderBottomWidth', 'borderBottomColor', 'borderLeftWidth', 'borderLeftColor', , 'borderRightWidth', 'borderRightColor']
32 | for (let i = 0; i < presentationsStylesList.length; i++) {
33 | if (props.style.hasOwnProperty(presentationsStylesList[i])) {
34 | presentationStyles[presentationsStylesList[i]] = props.style[presentationsStylesList[i]]
35 | }
36 | }
37 |
38 | state.presentationStyles = presentationStyles
39 | }
40 |
41 | this.state = state;
42 | this.pressedIn = this.pressedIn.bind(this)
43 |
44 | this.pressedOut = this.pressedOut.bind(this)
45 |
46 | }
47 | componentDidUpdate(nextProps, nextState) {
48 | if (this.state.backgroundColor != colors.blue && nextProps.disabled === false) {
49 | this.setState({ backgroundColor: colors.blue })
50 | } else if (this.state.backgroundColor != "#dadada" && nextProps.disabled === true) {
51 | this.setState({ backgroundColor: '#dadada' })
52 | }
53 | }
54 | render() {
55 | return (
56 |
66 | {this.props.title}
67 |
68 | );
69 | }
70 | pressedIn() {
71 | this.setState({ color: colors.blue })
72 | }
73 | pressedOut() {
74 | this.setState({ color: "#ffffff" })
75 | }
76 |
77 | style = StyleSheet.create({
78 | button: {
79 | backgroundColor: colors.blue,
80 | width: '100%',
81 | lineHeight: 24,
82 | paddingTop: 13,
83 | paddingBottom: 13,
84 | textAlign: 'center',
85 | color: '#ffffff',
86 | fontSize: 16
87 | }
88 | })
89 | }
90 |
--------------------------------------------------------------------------------
/shared/components/ButtonWithIcon.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Text, TouchableOpacity, Image } from "react-native";
3 | import styles from "../state/styles";
4 |
5 | export default class ButtonWithIcon extends Component {
6 | constructor(props) {
7 | super(props);
8 |
9 | let state = {
10 | backgroundColor: "transparent",
11 | iconHidden: props.icon === false,
12 | icon: props.icon || require("../../assets/img/2x/arrow_right.png")
13 | };
14 |
15 | if (props.style) {
16 | let positionStyles = {};
17 | let positionalStylesList = [
18 | "position",
19 | "top",
20 | "left",
21 | "bottom",
22 | "right",
23 | "height",
24 | "width",
25 | "overflow",
26 | "float",
27 | "margin",
28 | "marginTop",
29 | "marginBottom",
30 | "marginLeft",
31 | "marginRight"
32 | ];
33 | for (let i = 0; i < positionalStylesList.length; i++) {
34 | if (props.style.hasOwnProperty(positionalStylesList[i])) {
35 | positionStyles[positionalStylesList[i]] =
36 | props.style[positionalStylesList[i]];
37 | }
38 | }
39 |
40 | state.positionStyles = positionStyles;
41 |
42 | let presentationStyles = {};
43 | let presentationsStylesList = [
44 | "font-size",
45 | "fontSize",
46 | "color",
47 | "background-color",
48 | "backgroundColor",
49 | "padding",
50 | "paddingTop",
51 | "paddingRight",
52 | "paddingBottom",
53 | "paddingLeft",
54 | "border",
55 | "borderColor",
56 | "borderWidth",
57 | "borderRadius",
58 | "borderTopWidth",
59 | "borderTopColor",
60 | "borderBottomWidth",
61 | "borderBottomColor",
62 | "borderLeftWidth",
63 | "borderLeftColor",
64 | ,
65 | "borderRightWidth",
66 | "borderRightColor"
67 | ];
68 | for (let i = 0; i < presentationsStylesList.length; i++) {
69 | if (props.style.hasOwnProperty(presentationsStylesList[i])) {
70 | presentationStyles[presentationsStylesList[i]] =
71 | props.style[presentationsStylesList[i]];
72 | }
73 | }
74 |
75 | state.presentationStyles = presentationStyles;
76 | }
77 |
78 | this.state = state;
79 | }
80 | shown = false;
81 | render() {
82 | let icon = (() => {
83 | if (this.state.iconHidden) return null;
84 | return (
85 |
90 | );
91 | })();
92 | return (
93 |
104 |
111 | {this.props.title}
112 |
113 | {icon}
114 |
115 | );
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/node_modules_domserializer_foreignnames.json:
--------------------------------------------------------------------------------
1 | {
2 | "elementNames" : {
3 | "altglyph" : "altGlyph",
4 | "altglyphdef" : "altGlyphDef",
5 | "altglyphitem" : "altGlyphItem",
6 | "animatecolor" : "animateColor",
7 | "animatemotion" : "animateMotion",
8 | "animatetransform" : "animateTransform",
9 | "clippath" : "clipPath",
10 | "feblend" : "feBlend",
11 | "fecolormatrix" : "feColorMatrix",
12 | "fecomponenttransfer" : "feComponentTransfer",
13 | "fecomposite" : "feComposite",
14 | "feconvolvematrix" : "feConvolveMatrix",
15 | "fediffuselighting" : "feDiffuseLighting",
16 | "fedisplacementmap" : "feDisplacementMap",
17 | "fedistantlight" : "feDistantLight",
18 | "fedropshadow" : "feDropShadow",
19 | "feflood" : "feFlood",
20 | "fefunca" : "feFuncA",
21 | "fefuncb" : "feFuncB",
22 | "fefuncg" : "feFuncG",
23 | "fefuncr" : "feFuncR",
24 | "fegaussianblur" : "feGaussianBlur",
25 | "feimage" : "feImage",
26 | "femerge" : "feMerge",
27 | "femergenode" : "feMergeNode",
28 | "femorphology" : "feMorphology",
29 | "feoffset" : "feOffset",
30 | "fepointlight" : "fePointLight",
31 | "fespecularlighting" : "feSpecularLighting",
32 | "fespotlight" : "feSpotLight",
33 | "fetile" : "feTile",
34 | "feturbulence" : "feTurbulence",
35 | "foreignobject" : "foreignObject",
36 | "glyphref" : "glyphRef",
37 | "lineargradient" : "linearGradient",
38 | "radialgradient" : "radialGradient",
39 | "textpath" : "textPath"
40 | },
41 | "attributeNames" : {
42 | "definitionurl" : "definitionURL",
43 | "attributename" : "attributeName",
44 | "attributetype" : "attributeType",
45 | "basefrequency" : "baseFrequency",
46 | "baseprofile" : "baseProfile",
47 | "calcmode" : "calcMode",
48 | "clippathunits" : "clipPathUnits",
49 | "diffuseconstant" : "diffuseConstant",
50 | "edgemode" : "edgeMode",
51 | "filterunits" : "filterUnits",
52 | "glyphref" : "glyphRef",
53 | "gradienttransform" : "gradientTransform",
54 | "gradientunits" : "gradientUnits",
55 | "kernelmatrix" : "kernelMatrix",
56 | "kernelunitlength" : "kernelUnitLength",
57 | "keypoints" : "keyPoints",
58 | "keysplines" : "keySplines",
59 | "keytimes" : "keyTimes",
60 | "lengthadjust" : "lengthAdjust",
61 | "limitingconeangle" : "limitingConeAngle",
62 | "markerheight" : "markerHeight",
63 | "markerunits" : "markerUnits",
64 | "markerwidth" : "markerWidth",
65 | "maskcontentunits" : "maskContentUnits",
66 | "maskunits" : "maskUnits",
67 | "numoctaves" : "numOctaves",
68 | "pathlength" : "pathLength",
69 | "patterncontentunits" : "patternContentUnits",
70 | "patterntransform" : "patternTransform",
71 | "patternunits" : "patternUnits",
72 | "pointsatx" : "pointsAtX",
73 | "pointsaty" : "pointsAtY",
74 | "pointsatz" : "pointsAtZ",
75 | "preservealpha" : "preserveAlpha",
76 | "preserveaspectratio" : "preserveAspectRatio",
77 | "primitiveunits" : "primitiveUnits",
78 | "refx" : "refX",
79 | "refy" : "refY",
80 | "repeatcount" : "repeatCount",
81 | "repeatdur" : "repeatDur",
82 | "requiredextensions" : "requiredExtensions",
83 | "requiredfeatures" : "requiredFeatures",
84 | "specularconstant" : "specularConstant",
85 | "specularexponent" : "specularExponent",
86 | "spreadmethod" : "spreadMethod",
87 | "startoffset" : "startOffset",
88 | "stddeviation" : "stdDeviation",
89 | "stitchtiles" : "stitchTiles",
90 | "surfacescale" : "surfaceScale",
91 | "systemlanguage" : "systemLanguage",
92 | "tablevalues" : "tableValues",
93 | "targetx" : "targetX",
94 | "targety" : "targetY",
95 | "textlength" : "textLength",
96 | "viewbox" : "viewBox",
97 | "viewtarget" : "viewTarget",
98 | "xchannelselector" : "xChannelSelector",
99 | "ychannelselector" : "yChannelSelector",
100 | "zoomandpan" : "zoomAndPan"
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/screens/UsersScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Image,
4 | View,
5 | Text,
6 | TouchableOpacity,
7 | FlatList,
8 | RefreshControl
9 | } from "react-native";
10 | import colors from "../shared/state/colors";
11 |
12 | export default class UsersScreen extends Component {
13 | constructor(props) {
14 | super(props);
15 | }
16 |
17 | render() {
18 | return (
19 |
37 | }
38 | onEndReached={this.props.nextPage && this.props.nextPage}
39 | onEndReachedThreshold={400}
40 | renderItem={({ item }) => {
41 | return (
42 | {
44 | this.props.navigation.push(this.props.nextNavigation, {
45 | id: item.id,
46 | title: item.name
47 | });
48 | }}
49 | style={{
50 | display: "flex",
51 | borderWidth: 1,
52 | flexDirection: "row",
53 | borderColor: "#c4c4c4",
54 | marginTop: 10,
55 | borderRadius: 3,
56 | padding: 16
57 | }}
58 | >
59 |
60 | {
70 | if (item.avatar)
71 | return {
72 | uri: item.avatar
73 | };
74 | return require("../assets/img/male-avatar.png");
75 | })()}
76 | />
77 |
84 |
91 | {item.fullname}
92 |
93 |
100 | {item.title}
101 |
102 | {item.company_name &&
109 | {item.company_name}
110 | }
111 |
112 |
113 | );
114 | }}
115 | keyExtractor={(item, index) => `${item.id}`}
116 | />
117 | );
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/screens/Task/TaskActions.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
3 | import i18n from "../../utils/i18n";
4 | import colors from "../../shared/state/colors";
5 | import styles from "../../shared/state/styles";
6 | import Hr from "../../shared/components/Hr";
7 |
8 | export default class NewTaskScreen extends Component {
9 | constructor(props) {
10 | super(props);
11 | }
12 | render() {
13 | return (
14 |
15 | {this.props.status === 5 && this.props.isOwner && (
16 | {
18 | this.props.onAction("solved");
19 | }}
20 | style={this.styles.actionButtons}
21 | >
22 |
23 | {i18n.t("task.approve_solution")}
24 |
25 |
26 | )}
27 | {this.props.status === 5 && this.props.isOwner && (
28 | {
30 | this.props.onAction("reject_solution");
31 | }}
32 | style={[
33 | this.styles.actionButtons,
34 | {
35 | borderColor: colors.red
36 | }
37 | ]}
38 | >
39 |
47 | {i18n.t("task.reject_solution")}
48 |
49 |
50 | )}
51 | {(this.props.status === 3 || this.props.status === 4) &&
52 | this.props.assignedUser && (
53 | {
55 | this.props.onAction("solution");
56 | }}
57 | style={this.styles.actionButtons}
58 | >
59 |
60 | {i18n.t("task.it_is_solution")}
61 |
62 |
63 | )}
64 | {(this.props.status === 3 || this.props.status === 4) &&
65 | this.props.assignedUser && (
66 | {
69 | this.props.onAction("reject_ticket");
70 | }}
71 | >
72 |
73 | {i18n.t("task.pass_on")}
74 |
75 |
76 | )}
77 | {this.props.status === 3 && this.props.assignedUser && (
78 | {
80 | this.props.onAction("waiting_solution");
81 | }}
82 | style={[this.styles.actionButtons]}
83 | >
84 |
85 | {i18n.t("task.waiting_for_solution")}
86 |
87 |
88 | )}
89 | {this.props.status === 3 && this.props.assignedUser &&
}
90 |
91 | );
92 | }
93 |
94 | styles = StyleSheet.create({
95 | actionButtons: {
96 | borderWidth: 1,
97 | borderColor: colors.blue,
98 | marginBottom: 10
99 | },
100 | actionButtonText: {
101 | color: colors.blue,
102 | fontSize: 16,
103 | lineHeight: 43,
104 | width: "100%",
105 | textAlign: "center"
106 | }
107 | });
108 | }
109 |
--------------------------------------------------------------------------------
/screens/VideoListScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | View,
4 | FlatList,
5 | TouchableOpacity,
6 | Image,
7 | Text,
8 | Linking,
9 | RefreshControl
10 | } from "react-native";
11 | import Icon from "react-native-vector-icons/MaterialIcons";
12 | import i18n from "../utils/i18n";
13 | import axios from "../plugins/axios";
14 |
15 | export default class VideoListScreen extends Component {
16 | _isMounted = false;
17 | constructor(props) {
18 | super(props);
19 | this.state = {
20 | refreshing: false,
21 | data: []
22 | };
23 |
24 | this.fetchData = this.fetchData.bind(this);
25 | }
26 | componentDidMount() {
27 | this._isMounted = true;
28 | this.fetchData();
29 | }
30 | async fetchData() {
31 | this._isMounted && this.setState({ refreshing: true });
32 | try {
33 | let instance = await axios.instance();
34 | let response = await instance.get(this.props.requestUrl);
35 | if (this.props.dataKey) {
36 | this._isMounted &&
37 | this.setState({ data: response[this.props.dataKey] });
38 | } else {
39 | this._isMounted && this.setState({ data: response });
40 | }
41 | console.log(response);
42 | } catch (error) {
43 | console.log(error);
44 | }
45 |
46 | this._isMounted && this.setState({ refreshing: false });
47 | }
48 | componentWillUnmount() {
49 | this._isMounted = false;
50 | }
51 | listEmpty() {
52 | return (
53 |
61 | {i18n.t("tasks.no_videos")}
62 |
63 | );
64 | }
65 | render() {
66 | return (
67 |
80 | }
81 | ListEmptyComponent={this.listEmpty}
82 | renderItem={({ item }) => {
83 | return (
84 | {
86 | Linking.canOpenURL(item.link).then(supported => {
87 | if (supported) {
88 | Linking.openURL(item.link);
89 | } else {
90 | console.log("Don't know how to open URI: " + item.link);
91 | }
92 | });
93 | }}
94 | style={{
95 | borderBottomWidth: 1,
96 | borderColor: "#EBEBEB",
97 | position: "relative",
98 | marginBottom: 15,
99 | paddingBottom: 13,
100 | paddingLeft: 20,
101 | paddingRight: 20
102 | }}
103 | >
104 |
111 | {item.name}
112 |
113 | {item.created_at &&
117 | {item.created_at}
118 | }
119 |
120 | );
121 | }}
122 | keyExtractor={(item, index) => `${index}`}
123 | />
124 | );
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/screens/News/NewsTabScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { TouchableOpacity, Dimensions, View, Text } from "react-native";
3 | import { TabView, TabBar } from "react-native-tab-view";
4 | import Icon from "react-native-vector-icons/MaterialIcons";
5 | import i18n from "../../utils/i18n";
6 | import colors from "../../shared/state/colors";
7 | import urls from "../../shared/state/urls";
8 | import axios from "../../plugins/axios";
9 | import Loading from "../../shared/components/Loading";
10 | import NewsListScreen from "./NewsListScreen";
11 | const Header_Maximum_Height = 231;
12 |
13 | const Header_Minimum_Height = 56;
14 | export default class NewsTabScreen extends Component {
15 | _isMounted = false;
16 | static navigationOptions = ({ navigation, navigationOptions }) => {
17 | return {
18 | title: i18n.t("news.title"),
19 | headerLeft: (
20 |
24 |
25 |
26 | )
27 | };
28 | };
29 | componentWillUnmount() {
30 | this._isMounted = false;
31 | }
32 | constructor(props) {
33 | super(props);
34 | this.state = {
35 | categories: [],
36 | loading: false,
37 | index: 0,
38 | routes: []
39 | };
40 |
41 | this.fetchCategories = this.fetchCategories.bind(this);
42 | }
43 | componentDidMount() {
44 | this._isMounted = true;
45 | this.fetchCategories();
46 | }
47 | async fetchCategories() {
48 | this._isMounted && this.setState({ loading: true });
49 | try {
50 | let instance = await axios.instance();
51 | let response = await instance.get(urls.news_categories);
52 | // this._isMounted &&
53 | // this.setState({
54 | // categories: response.categories
55 | // });
56 | let routes = [];
57 | for (let i = 0; i < response.categories.length; i++) {
58 | if (response.categories[i].active !== "1") continue;
59 | routes.push({
60 | key: response.categories[i].id,
61 | title: response.categories[i].name
62 | });
63 | }
64 | this._isMounted && this.setState({ routes: routes });
65 | } catch (error) {
66 | console.log(error);
67 | }
68 | this._isMounted && this.setState({ loading: false });
69 | }
70 |
71 | render() {
72 | return (
73 |
80 | {this.state.loading && }
81 | {this.state.routes.length > 0 && (
82 | {
86 | return (
87 |
91 | );
92 | }}
93 | renderTabBar={props => (
94 |
109 | )}
110 | onIndexChange={index => this._isMounted && this.setState({ index })}
111 | initialLayout={{ width: Dimensions.get("window").width }}
112 | />
113 | )}
114 |
115 | );
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/screens/Compliance/FaqsScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | View,
4 | TouchableOpacity,
5 | FlatList,
6 | Text,
7 | RefreshControl
8 | } from "react-native";
9 | import Icon from "react-native-vector-icons/MaterialIcons";
10 | import Loading from "../../shared/components/Loading";
11 | import i18n from "../../utils/i18n";
12 | import axios from "../../plugins/axios";
13 | import urls from "../../shared/state/urls";
14 |
15 | export default class FaqsScreen extends Component {
16 | static navigationOptions = ({ navigation, navigationOptions }) => {
17 | return {
18 | title: i18n.t("menu.faq"),
19 | headerLeft: (
20 |
24 |
25 |
26 | )
27 | };
28 | };
29 | constructor(props) {
30 | super(props);
31 | this.state = {
32 | loading: false,
33 | data: [],
34 | page: 1
35 | };
36 | }
37 | componentDidMount() {
38 | this.fetchData();
39 | }
40 | async fetchData() {
41 | if (this.state.page == null) return;
42 | this.setState({ loading: true });
43 | try {
44 | let instance = await axios.instance();
45 | let response = await instance.get(
46 | `${urls.compliance_faq}${this.state.page}`
47 | );
48 | let data = response.faqs.data;
49 | if (this.state.page > 1) {
50 | data = data.concat(this.state.data);
51 | }
52 | let page =
53 | this.state.page > response.faqs.last_page ? this.state.page + 1 : null;
54 | this.setState({
55 | data: data,
56 | page: page
57 | });
58 | } catch (error) {
59 | console.log(error);
60 | }
61 | this.setState({ loading: false });
62 | }
63 | render() {
64 | return (
65 |
70 | {this.state.loading && }
71 | {
76 | this.setState({ page: 1 });
77 | this.getData();
78 | }}
79 | />
80 | }
81 | data={this.state.data}
82 | extraData={this.state}
83 | style={{
84 | width: "100%",
85 | height: "100%"
86 | }}
87 | onEndReached={() => {
88 | this.state.page && this.fetchData();
89 | }}
90 | onEndReachedThreshold={400}
91 | renderItem={({ item }) => {
92 | return (
93 | {
95 | this.props.navigation.push("Faq", {
96 | title: item.title,
97 | text: item.answer
98 | });
99 | }}
100 | style={{
101 | position: "relative",
102 | borderBottomWidth: 1,
103 | borderBottomColor: "#E0E0E0",
104 | borderBottomStyle: "solid"
105 | }}
106 | >
107 |
118 | {item.questions}
119 |
120 |
131 |
132 | );
133 | }}
134 | keyExtractor={(item, index) => `${item.id}`}
135 | />
136 |
137 | );
138 | }
139 | }
140 |
--------------------------------------------------------------------------------
/screens/News/NewsListScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | View,
4 | TouchableOpacity,
5 | FlatList,
6 | Image,
7 | Text,
8 | RefreshControl
9 | } from "react-native";
10 | import axios from "../../plugins/axios";
11 | import urls from "../../shared/state/urls";
12 | import i18n from "../../utils/i18n";
13 |
14 | export default class NewsListScreen extends Component {
15 | constructor(props) {
16 | super(props);
17 | this.fetchNews = this.fetchNews.bind(this);
18 | this.listEmpty = this.listEmpty.bind(this);
19 | this.state = {
20 | loading: false,
21 | data: [],
22 | page: 1
23 | };
24 | }
25 | componentDidMount() {
26 | this.fetchNews();
27 | }
28 | async fetchNews() {
29 | if (!this.state.page) return;
30 | this.setState({ loading: true });
31 | try {
32 | let instance = await axios.instance();
33 | let response = await instance.get(
34 | `${urls.category_news}${this.props.categoryId}?page=${this.state.page}`
35 | );
36 | let page = this.state.page + 1;
37 | this.setState({
38 | data: response.news.data,
39 | page: page >= response.news.last_page ? null : page
40 | });
41 | } catch (error) {
42 | console.log(error);
43 | }
44 | this.setState({ loading: false });
45 | }
46 | listEmpty() {
47 | return (
48 |
56 | {i18n.t("news.no_news")}
57 |
58 | );
59 | }
60 | render() {
61 | return (
62 |
67 | {
74 | this.setState({ page: 1 });
75 | this.fetchNews();
76 | }}
77 | />
78 | }
79 | ListEmptyComponent={this.listEmpty}
80 | style={{
81 | width: "100%",
82 | height: "100%",
83 | paddingLeft: 20,
84 | paddingRight: 20
85 | }}
86 | onEndReached={() => {
87 | this.state.page && this.fetchNews();
88 | }}
89 | onEndReachedThreshold={400}
90 | renderItem={({ item }) => {
91 | return (
92 | {
94 | this.props.navigation.push("News", {
95 | id: item.id,
96 | title: item.name
97 | });
98 | }}
99 | style={{
100 | marginTop: 20,
101 | borderColor: "#C4C4C4",
102 | borderWidth: 1,
103 | borderStyle: "solid",
104 | borderRadius: 3,
105 | overflow: "hidden",
106 | paddingBottom: 19
107 | }}
108 | >
109 |
118 |
127 | {item.title}
128 |
129 |
137 | {item.publish_date}
138 |
139 |
140 | );
141 | }}
142 | keyExtractor={(item, index) => `${item.id}`}
143 | />
144 |
145 | );
146 | }
147 | }
148 |
--------------------------------------------------------------------------------
/locales/ru.js:
--------------------------------------------------------------------------------
1 | export default {
2 | login: "Логин",
3 | login_organization: "Выберите свою организацию",
4 | password: "Пароль",
5 | login_title: 'Корпоративный портал группы компаний АО "Самрук-Энерго"',
6 | login_enter: "Войти",
7 | organizations: "Организации",
8 | apply: "Применить",
9 | success_screen_title: "Заявка создана",
10 | ticket_screen_title: "Подать заявку",
11 | ticket_category: "Категория",
12 | ticket_list_screen_title_categories: "Категории",
13 | ticket_list_screen_title_subcategories: "Подкатегории",
14 | ticket_subcategory: "Подкатегория",
15 | ticket_title: "Заголовок",
16 | ticket_description: "Описание",
17 | ticket_select_subcategory_warning: "Выберите пожалуйста подкатегорию",
18 | ticket_select_category_warning: "Выберите пожалуйста категорию",
19 | ticket_enter_title_warning: "Введите заголовок заявки",
20 | ticket_enter_description_warning: "Введите описание заявки",
21 | ticket_select_category_first: "Сперва надо выбрать категорию",
22 | ticket_new_ticket_created_successfully: "Заявка создана упешно!",
23 | ticket_send: "Отправить заявку",
24 | send: "Отправить",
25 | ticket_created_successfully:
26 | "Ваша заявка №{:id} успешно отправлена в службу технической поддержки",
27 | ticket_sent: "Сохранено",
28 | exit_alert_title: "Выйти из аккаунта",
29 | exit_alert_description: "Вы действительно хотите выйти?",
30 | exit: "Выйти",
31 | cancel: "Отмена",
32 | close: "Закрыть",
33 | own_tasks: "Мои заявки",
34 | working_tasks: "Назначенные",
35 | video_tutorials: "Видеоинструкция",
36 | technical_support: "Техническая поддержка",
37 | corporate_governance: "Корпоративное управление",
38 | search: "Поиск",
39 | news: {
40 | title: "Новости",
41 | no_news: "Нет новостей"
42 | },
43 | task_status: {
44 | new: "Новая",
45 | assigned: "В работе (назначена)",
46 | planned: "В работе (запланирована)",
47 | waiting: "Ожидает решения",
48 | solved: "Решено",
49 | closed: "Закрыто",
50 | unsolved: "Нерешенные"
51 | },
52 | employee: {
53 | department: "Департамент",
54 | location: "Этаж / кабинет",
55 | internal_phone: "Внутренний рабочий телефон",
56 | external_phone: "Внешний рабочий телефон",
57 | mobile_phone: "Мобильный телефон",
58 | email: "Электронная почта",
59 | responsibilities: "Курируемые вопросы"
60 | },
61 | task: {
62 | status: "Статус",
63 | title: "Заголовок",
64 | description: "Описание",
65 | id: "ID",
66 | category: "Категория",
67 | open_time: "Время открытия",
68 | action_time: "Время реакции",
69 | close_time: "Время закрытия",
70 | creator: "Инициатор",
71 | department: "Департамент",
72 | creator_position: "Должность",
73 | creator_phone: "Телефон",
74 | creator_login: "Логин",
75 | assigned_worker: "Назначенный",
76 | take_it: "Взять в работу",
77 | new_comment: "Новый комментарий",
78 | it_is_solution: "Это решение",
79 | pass_on: "Отказаться от заявки",
80 | waiting_for_solution: "Заявка ожидает решения",
81 | task_details_title: "Детали заявки",
82 | action_comment_title: "Комментарий к действию",
83 | action_comment_send: "Отправить",
84 | cancel_task: "Отменить заявку",
85 | created_successfully:
86 | "Ваша заявка успешно отправлена в службу технической поддержки!",
87 | approve_solution: "Утвердить решение",
88 | reject_solution: "Отклонить решение",
89 | comments: "Комментарии",
90 | comment_placeholder: "Напишите комментарий",
91 | status_saving: "Статус сохраняется...",
92 | status_saved: "Статус сохранен",
93 | reject_task: "Отклонить заявку",
94 | rate_specialist: "Оцените пожалуйста работу исполнителя"
95 | },
96 | tasks: {
97 | no_owned_tasks: "У Вас нет созданных заявок.",
98 | no_videos: "Нет видео"
99 | },
100 | project: {
101 | no_projects: "Нет проектов",
102 | business_process_owner: "Владелец бизнес-процессов",
103 | no_process_owners: "Нет владельцев процессов"
104 | },
105 | menu: {
106 | settings: "Настройки",
107 | about_us: "О нас",
108 | employees: "Сотрудники",
109 | structural_divisions: "Структурные подразделения",
110 | organizational_structure_kc: "Оргструктура КЦ",
111 | news: "Новости",
112 | compliance_service: "Служба Комплаенс",
113 | training_materials: "Обучающие материалы",
114 | videos: "Видеоматериалы",
115 | faq: "Часто задаваемые вопросы",
116 | transformations: "Трансформация",
117 | projects: "Проекты",
118 | business_process_owners: "Владельцы бизнес-процессов",
119 | corporate_governance: "Корпоративное управление\n и устойчивое развитие",
120 | technical_support: "Техническая поддержка",
121 | exit: "Выход"
122 | },
123 | tasks_screen_title: "Техническая поддержка"
124 | };
125 |
--------------------------------------------------------------------------------
/screens/Project/ProjectsScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | View,
4 | TouchableOpacity,
5 | FlatList,
6 | Image,
7 | Text,
8 | RefreshControl
9 | } from "react-native";
10 | import Icon from "react-native-vector-icons/MaterialIcons";
11 | import i18n from "../../utils/i18n";
12 | import Loading from "../../shared/components/Loading";
13 | import axios from "../../plugins/axios";
14 | import urls from "../../shared/state/urls";
15 |
16 | export default class ProjectScreen extends Component {
17 | static navigationOptions = ({ navigation, navigationOptions }) => {
18 | return {
19 | title: i18n.t("menu.projects"),
20 | headerLeft: (
21 |
25 |
26 |
27 | )
28 | };
29 | };
30 | constructor(props) {
31 | super(props);
32 |
33 | this.state = {
34 | data: [],
35 | page: 1,
36 | loading: false
37 | };
38 | this.fetchData = this.fetchData.bind(this);
39 | }
40 | componentDidMount() {
41 | this.fetchData();
42 | }
43 | async fetchData() {
44 | this.setState({
45 | loading: true
46 | });
47 | try {
48 | let instance = await axios.instance();
49 | let response = await instance.get(urls.projects);
50 | this.setState({
51 | data: response.projects
52 | });
53 | } catch (error) {
54 | console.log(error);
55 | }
56 | this.setState({ loading: false });
57 | }
58 | listEmpty() {
59 | return (
60 |
68 | {i18n.t("project.no_projects")}
69 |
70 | );
71 | }
72 | render() {
73 | return (
74 |
80 | {this.state.loading && }
81 |
89 | }
90 | ListEmptyComponent={this.listEmpty}
91 | style={{
92 | width: "100%",
93 | height: "100%",
94 | paddingLeft: 20,
95 | paddingRight: 20,
96 | paddingTop: 15
97 | }}
98 | renderItem={({ item }) => {
99 | return (
100 | {
102 | this.props.navigation.push("Project", {
103 | id: item.id
104 | });
105 | }}
106 | style={{
107 | marginBottom: 15,
108 | borderRadius: 3,
109 | borderWidth: 1,
110 | borderColor: "#c4c4c4",
111 | borderStyle: "solid",
112 | padding: 16,
113 | display: "flex",
114 | flexDirection: "row"
115 | }}
116 | >
117 |
134 |
141 |
149 | {item.number}
150 |
151 |
158 | {item.title}
159 |
160 |
166 | {item.user ? item.user.fullname : ""}
167 |
168 |
169 |
170 | );
171 | }}
172 | keyExtractor={(item, index) => `${item.id}`}
173 | />
174 |
175 | );
176 | }
177 | }
178 |
--------------------------------------------------------------------------------
/screens/Task/TasksScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | View,
4 | FlatList,
5 | Image,
6 | TouchableOpacity,
7 | Text,
8 | RefreshControl
9 | } from "react-native";
10 | import colors from "../../shared/state/colors";
11 | import statuses from "../../shared/state/task_statuses";
12 | import axios from "../../plugins/axios";
13 | import Loading from "../../shared/components/Loading";
14 | import i18n from "../../utils/i18n";
15 |
16 | export default class TasksScreen extends Component {
17 | _isMounted = false;
18 | // static navigationOptions = ({ navigation, navigationOptions }) => {
19 | // return {
20 | // title: i18n.t("technical_support"),
21 | // headerLeft: (
22 | //
26 | //
30 | //
31 | // )
32 | // };
33 | // };
34 | constructor(props) {
35 | super(props);
36 | this.state = {
37 | refreshing: false,
38 | data: []
39 | };
40 |
41 | this.getData = this.getData.bind(this);
42 | }
43 | componentWillUnmount() {
44 | this._isMounted = false;
45 | }
46 | componentDidMount() {
47 | this._isMounted = true;
48 | this.getData();
49 | }
50 | async getData() {
51 | this._isMounted && this.setState({ refreshing: true });
52 | try {
53 | let instance = await axios.instance();
54 | let response = await instance.get(this.props.url);
55 | console.log(response.tickets);
56 | this._isMounted && this.setState({ data: response.tickets });
57 | } catch (error) {
58 | console.log(error);
59 | }
60 |
61 | this._isMounted && this.setState({ refreshing: false });
62 | }
63 | listEmpty() {
64 | return (
65 |
73 | {i18n.t("tasks.no_owned_tasks")}
74 |
75 | );
76 | }
77 | render() {
78 | return (
79 |
86 |
94 | }
95 | ListEmptyComponent={this.listEmpty}
96 | style={{
97 | width: "100%",
98 | paddingTop: 16,
99 | paddingLeft: 16,
100 | paddingRight: 16
101 | }}
102 | renderItem={({ item }) => {
103 | return (
104 | {
106 | this.props.navigation.push("Task", {
107 | taskId: item.id
108 | });
109 | }}
110 | style={{
111 | borderWidth: 1,
112 | borderColor: "#C4C4C4",
113 | borderRadius: 3,
114 | marginBottom: 10,
115 | paddingTop: 16,
116 | paddingBottom: 16,
117 | paddingRight: 20,
118 | paddingLeft: 20
119 | }}
120 | >
121 |
128 | {item.name}
129 |
130 |
137 | {item.date_creation}
138 |
139 |
145 |
157 | {statuses[item.status].name}
158 |
159 |
160 |
161 | );
162 | }}
163 | keyExtractor={(item, index) => `${item.id}`}
164 | />
165 | {this.props.canCreateNewTask && (
166 | {
168 | this.props.navigation.push("NewTask");
169 | }}
170 | style={{
171 | width: 56,
172 | height: 56,
173 | borderRadius: 28,
174 | backgroundColor: colors.blue,
175 | padding: 16,
176 | position: "absolute",
177 | right: 20,
178 | bottom: 23,
179 | boxShadow: "6px 0 6px rgba(0,0,0,.24)"
180 | }}
181 | >
182 |
189 |
190 | )}
191 |
192 | );
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/screens/About/DepartmentsScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Image,
4 | View,
5 | Text,
6 | TouchableOpacity,
7 | FlatList,
8 | RefreshControl
9 | } from "react-native";
10 | import Icon from "react-native-vector-icons/MaterialIcons";
11 | import UsersScreen from "../UsersScreen";
12 | import i18n from "../../utils/i18n";
13 | import axios from "../../plugins/axios";
14 | import urls from "../../shared/state/urls";
15 | import colors from "../../shared/state/colors";
16 | import Loading from "../../shared/components/Loading";
17 |
18 | export default class DepartmentsScreen extends Component {
19 | static navigationOptions = ({ navigation, navigationOptions }) => {
20 | return {
21 | title: i18n.t("menu.structural_divisions"),
22 | headerLeft: (
23 |
27 |
28 |
29 | )
30 | };
31 | };
32 | constructor(props) {
33 | super(props);
34 |
35 | this.state = {
36 | data: [],
37 | loading: false
38 | };
39 |
40 | this.fetchData = this.fetchData.bind(this);
41 | }
42 | componentDidMount() {
43 | this.fetchData();
44 | }
45 | async fetchData() {
46 | this.setState({ loading: true });
47 |
48 | try {
49 | let instance = await axios.instance();
50 | let response = await instance.get(urls.departments);
51 | console.log(response);
52 |
53 | // if (response.users.current_page === 1) {
54 | // this.setState({
55 | // nextPage: response.users.next_page_url,
56 | // data: response.users.data,
57 | // loading: false
58 | // });
59 | // } else {
60 | let data = this.state.data.concat(response.departments);
61 | this.setState({
62 | data: data,
63 | loading: false
64 | });
65 | // }
66 | } catch (error) {
67 | console.log(error);
68 | this.setState({
69 | loading: false
70 | });
71 | }
72 | }
73 | render() {
74 | return (
75 |
82 | {this.state.loading && }
83 |
101 | }
102 | onEndReached={this.state.nextPage && this.state.nextPage}
103 | onEndReachedThreshold={400}
104 | renderItem={({ item }) => {
105 | return (
106 | {
108 | this.props.navigation.push("Department", {
109 | id: item.id,
110 | title: item.name
111 | });
112 | }}
113 | style={{
114 | display: "flex",
115 | flexDirection: "row",
116 | borderWidth: 1,
117 | marginBottom: 10,
118 | borderColor: "#c4c4c4",
119 | borderRadius: 3,
120 | padding: 16,
121 | }}
122 | >
123 | {
134 | if (item.avatar)
135 | return {
136 | uri: item.avatar
137 | };
138 | return require("../../assets/img/male-avatar.png");
139 | })()}
140 | />
141 |
148 | {item.name}
155 |
162 | {item.fullname}
163 |
164 |
170 | {item.title}
171 |
172 | {/*
179 | {item.company_name}
180 | */}
181 |
182 |
183 | );
184 | }}
185 | keyExtractor={(item, index) => `${item.id}`}
186 | />
187 |
188 | );
189 | }
190 | }
191 |
--------------------------------------------------------------------------------
/screens/News/NewsScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | View,
4 | TouchableOpacity,
5 | Text,
6 | ScrollView,
7 | Animated,
8 | StyleSheet,
9 | Platform
10 | } from "react-native";
11 | import Icon from "react-native-vector-icons/MaterialIcons";
12 | import HTMLView from "react-native-htmlview";
13 | import i18n from "../../utils/i18n";
14 | import Loading from "../../shared/components/Loading";
15 | import colors from "../../shared/state/colors";
16 | import axios from "../../plugins/axios";
17 | import urls from "../../shared/state/urls";
18 |
19 | const Header_Maximum_Height = 231;
20 |
21 | const Header_Minimum_Height = 56;
22 | export default class NewsScreen extends Component {
23 | static navigationOptions = ({ navigation, navigationOptions }) => {
24 | return {
25 | header: null
26 | };
27 | };
28 | constructor(props) {
29 | super(props);
30 | this.AnimatedHeaderValue = new Animated.Value(0);
31 | this.state = {
32 | data: {}
33 | };
34 | this.getNews = this.getNews.bind(this);
35 | }
36 | componentDidMount() {
37 | this.getNews();
38 | }
39 | async getNews() {
40 | this.setState({ loading: true });
41 | try {
42 | let instance = await axios.instance();
43 | let response = await instance.get(
44 | `${urls.news}${this.props.navigation.getParam("id")}`
45 | );
46 | console.log(response.news.publication);
47 | this.setState({ data: response.news });
48 | } catch (error) {
49 | console.log(error);
50 | }
51 | this.setState({ loading: false });
52 | }
53 | render() {
54 | let range = Header_Maximum_Height - Header_Minimum_Height;
55 |
56 | const AnimateHeaderBackgroundOpacity = this.AnimatedHeaderValue.interpolate(
57 | {
58 | inputRange: [0, range],
59 |
60 | outputRange: [1.0, 0.0],
61 |
62 | extrapolate: "clamp"
63 | }
64 | );
65 | const BackgroundAnimation = this.AnimatedHeaderValue.interpolate({
66 | inputRange: [0, range],
67 | outputRange: ["rgba(255,255,255,1)", "rgba(255,255,255,0)"],
68 |
69 | extrapolate: "clamp"
70 | });
71 | const AnimateHeaderHeight = this.AnimatedHeaderValue.interpolate({
72 | inputRange: [0, range],
73 |
74 | outputRange: [Header_Maximum_Height, Header_Minimum_Height],
75 |
76 | extrapolate: "clamp"
77 | });
78 | return (
79 |
85 | {this.state.loading && }
86 |
99 |
107 | {this.state.data.publish_date}
108 |
109 |
117 | {this.state.data.title}
118 |
119 |
120 |
121 |
130 |
142 | {
154 | this.props.navigation.goBack();
155 | }}
156 | >
157 |
158 |
159 |
160 |
161 | );
162 | }
163 |
164 | styles = StyleSheet.create({
165 | title: {
166 | fontSize: 12,
167 | color: "#979797",
168 | marginBottom: 5
169 | },
170 | text: {
171 | fontSize: 14,
172 | color: "#000000",
173 | marginBottom: 19
174 | },
175 | MainContainer: {
176 | flex: 1,
177 | paddingTop: Platform.OS == "ios" ? 20 : 0
178 | },
179 |
180 | HeaderStyle: {
181 | justifyContent: "center",
182 | alignItems: "center",
183 | position: "absolute",
184 | overflow: "hidden",
185 | left: 0,
186 | right: 0,
187 | top: Platform.OS == "ios" ? 20 : 0
188 | },
189 |
190 | HeaderInsideTextStyle: {
191 | fontSize: 16,
192 | fontWeight: "500",
193 | lineHeight: 20,
194 | position: "absolute",
195 | bottom: 0,
196 | left: 20,
197 | right: 20,
198 | paddingTop: 18,
199 | paddingBottom: 18,
200 | paddingLeft: 22,
201 | paddingRight: 22,
202 | borderTopLeftRadius: 3,
203 | borderTopRightRadius: 3,
204 | overflow: "hidden",
205 | borderBottomWidth: 2,
206 | borderBottomColor: "#EBEBEB",
207 | textAlign: "center"
208 | }
209 | });
210 | }
211 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/screens/Project/ProcessOwnersScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | TouchableOpacity,
4 | View,
5 | Text,
6 | Image,
7 | FlatList,
8 | RefreshControl
9 | } from "react-native";
10 | import Icon from "react-native-vector-icons/MaterialIcons";
11 | import i18n from "../../utils/i18n";
12 | import axios from "../../plugins/axios";
13 | import colors from "../../shared/state/colors";
14 | import urls from "../../shared/state/urls";
15 | import Hr from "../../shared/components/Hr";
16 |
17 | export default class ProcessOwnersScreen extends Component {
18 | static navigationOptions = ({ navigation, navigationOptions }) => {
19 | return {
20 | title: i18n.t("menu.business_process_owners"),
21 | headerLeft: (
22 |
26 |
27 |
28 | )
29 | };
30 | };
31 | constructor(props) {
32 | super(props);
33 |
34 | this.state = {
35 | data: [],
36 | page: 1,
37 | loading: false
38 | };
39 | this.fetchData = this.fetchData.bind(this);
40 | }
41 | componentDidMount() {
42 | this.fetchData();
43 | }
44 | async fetchData() {
45 | this.setState({
46 | loading: true
47 | });
48 | try {
49 | let instance = await axios.instance();
50 | let response = await instance.get(urls.process_owners);
51 | this.setState({
52 | data: response.process
53 | });
54 | } catch (error) {
55 | console.log(error);
56 | }
57 | this.setState({ loading: false });
58 | }
59 | listEmpty() {
60 | return (
61 |
69 | {i18n.t("project.no_process_owners")}
70 |
71 | );
72 | }
73 | businessProccess(processes) {
74 | if (!Array.isArray(processes)) return null;
75 | let view = [];
76 | for (let i = 0; i < processes.length; i++) {
77 | view.push(
78 |
86 |
95 |
102 | {processes[i].name}
103 |
104 |
105 | );
106 | }
107 |
108 | return view;
109 | }
110 | render() {
111 | return (
112 |
118 |
126 | }
127 | ListEmptyComponent={this.listEmpty}
128 | style={{
129 | width: "100%",
130 | height: "100%",
131 | paddingLeft: 20,
132 | paddingRight: 20,
133 | paddingTop: 15
134 | }}
135 | renderItem={({ item }) => {
136 | return (
137 | {
139 | this.props.navigation.push("ProcessOwner", {
140 | id: item.id
141 | });
142 | }}
143 | style={{
144 | marginBottom: 15,
145 | borderRadius: 3,
146 | borderWidth: 1,
147 | padding: 16,
148 | borderColor: "#c4c4c4"
149 | }}
150 | >
151 |
159 |
172 |
179 |
187 | {item.fullname}
188 |
189 |
198 | {item.workposition}
199 |
200 |
201 |
202 |
207 |
215 | {i18n.t("project.business_process_owner")}
216 |
217 | {this.businessProccess(item.owner)}
218 |
219 | );
220 | }}
221 | keyExtractor={(item, index) => `${item.id}`}
222 | />
223 |
224 | );
225 | }
226 | }
227 |
--------------------------------------------------------------------------------