Skip to content

Commit

Permalink
avniproject/avni-product#1561 | import _ from "lodash" where missing
Browse files Browse the repository at this point in the history
  • Loading branch information
1t5j0y committed Mar 28, 2024
1 parent c1940da commit ef87fd1
Show file tree
Hide file tree
Showing 34 changed files with 41 additions and 13 deletions.
14 changes: 7 additions & 7 deletions packages/openchs-android/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/openchs-android/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"lodash": "4.17.21",
"moment": "2.29.4",
"native-base": "3.4.9",
"openchs-models": "1.31.56",
"openchs-models": "1.31.60",
"prop-types": "15.8.1",
"react": "18.2.0",
"react-native": "0.72.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import {Form, ValidationResult} from 'avni-models';
import {Action} from "../util";
import IndividualService from "../../service/IndividualService";
import _ from "lodash";

export default class BeneficiaryDashboardActions {
static getInitialState(context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ObservationsHolderActions from "../common/ObservationsHolderActions";
import BeneficiaryIdentificationState from "../../state/BeneficiaryIdentificationState";
import IndividualService from "../../service/IndividualService";
import {Action} from "../util";
import _ from "lodash";

export default class BeneficiaryIdentificationActions {
static getInitialState(context) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import _ from "lodash";

class CompletedVisitsFilterAction {
static getInitialState() {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Observation, Point,
SubjectType
} from "openchs-models";
import _ from "lodash";

const dummyDate = new Date();
const dummyText = "dummy";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BaseService from "./BaseService";
import Service from "../framework/bean/Service";
import {BeneficiaryModePin} from 'avni-models';
import _ from "lodash";

@Service("beneficiaryModePinService")
class BeneficiaryModePinService extends BaseService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { postUrlFormEncoded, putJSON } from "../framework/http/requests";
import General from "../utility/General";
import AuthenticationError, { NO_USER } from "./AuthenticationError";
import BaseAuthProviderService from "./BaseAuthProviderService";

import _ from "lodash";

@Service("keycloakAuthService")
class KeycloakAuthService extends BaseAuthProviderService {
Expand Down
1 change: 1 addition & 0 deletions packages/openchs-android/src/service/MediaService.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import General from "../utility/General";
import {get} from "../framework/http/requests";
import FileSystem from "../model/FileSystem";
import fs from 'react-native-fs';
import _ from "lodash";

@Service("mediaService")
class MediaService extends BaseService {
Expand Down
1 change: 1 addition & 0 deletions packages/openchs-android/src/service/ServerError.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ErrorUtil from "../framework/errorHandling/ErrorUtil";
import AvniError from "../framework/errorHandling/AvniError";
import _ from "lodash";

function ServerError(response) {
const instance = new Error(response);
Expand Down
1 change: 1 addition & 0 deletions packages/openchs-android/src/service/UserInfoService.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import BaseService from "./BaseService";
import Service from "../framework/bean/Service";
import {UserInfo} from 'avni-models';
import UserSettings from "../model/UserSettings";
import _ from "lodash";

@Service("userInfoService")
class UserInfoService extends BaseService {
Expand Down
1 change: 1 addition & 0 deletions packages/openchs-android/src/service/VideoService.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BaseService from "./BaseService.js";
import Service from "../framework/bean/Service";
import {Video} from 'avni-models';
import _ from "lodash";

@Service("videoService")
class VideoService extends BaseService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import General from "../../utility/General";
import {IndividualRelative} from 'avni-models';
import EntityService from "../EntityService";
import {Individual} from 'avni-models';
import _ from "lodash";

@Service("individualRelationshipService")
class IndividualRelationshipService extends BaseService {
Expand Down
1 change: 1 addition & 0 deletions packages/openchs-android/src/task/PruneMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import BaseTask from "./BaseTask";
import ErrorHandler from "../utility/ErrorHandler";
import GlobalContext from "../GlobalContext";
import {MetaDataService} from "openchs-models";
import _ from "lodash";

export const imageObservationDoesNotExist = (db) => (media) => {
return MetaDataService.everyObservationField((observationField, schemaName) => {
Expand Down
1 change: 1 addition & 0 deletions packages/openchs-android/src/utility/Analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import analytics from '@react-native-firebase/analytics';
import {defaultTo} from 'lodash';
import Config from '../framework/Config';
import EnvironmentConfig from "../framework/EnvironmentConfig";
import _ from "lodash";

let db;
const firebaseAnalytics = analytics();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import get from 'lodash/get';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import Colors from "../primitives/Colors";
import AbstractComponent from "../../framework/view/AbstractComponent";
import _ from "lodash";

if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import FormElementGroup from "./form/FormElementGroup";
import WizardButtons from "./common/WizardButtons";
import CHSContainer from "./common/CHSContainer";
import {ObservationsHolder, Point, ProgramEnrolment, StaticFormElementGroup} from "avni-models";
import _ from "lodash";

@Path('/BeneficiaryIdentificationPage')
class BeneficiaryIdentificationPage extends AbstractComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import PreviousEncounters from "../common/PreviousEncounters";
import {Form} from 'avni-models';
import CHSNavigator from "../../utility/CHSNavigator";
import SystemRecommendationView from "../conclusion/SystemRecommendationView";
import _ from "lodash";

export default class BeneficiaryDashboard extends AbstractComponent {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Colors from "../primitives/Colors";
import ExpandableAudio from "./ExpandableAudio";
import ExpandableFile from "./ExpandableFile";
import AvniIcon from './AvniIcon';
import _ from "lodash";

export default class ExpandableMedia extends AbstractFormElement {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Colors from "../primitives/Colors";
import Styles from "../primitives/Styles";
import Separator from "../primitives/Separator";
import moment from "moment";
import _ from "lodash";

class NextScheduledVisits extends AbstractComponent {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import Colors from "../primitives/Colors";
import Styles from "../primitives/Styles";
import {CountResult} from "./CountResult";
import {get} from 'lodash';
import _, {get} from 'lodash';

export const CardListView = ({reportCard, I18n, onCardPress, countResult}) => {
const {name, colour, itemKey} = reportCard;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Geo from "../../../framework/geo";
import UserInfoService from "../../../service/UserInfoService";
import AvniIcon from '../../common/AvniIcon';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import _ from "lodash";

class GeolocationFormElement extends AbstractComponent {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {Button, Text} from "native-base";
import Fonts from "../../primitives/Fonts";
import Styles from "../../primitives/Styles";
import FormElementLabelWithDocumentation from "../../common/FormElementLabelWithDocumentation";
import _ from "lodash";

class MultiSelectFileFormElement extends FileFormElement {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {Button, Icon, Text} from "native-base";
import Fonts from "../../primitives/Fonts";
import Styles from "../../primitives/Styles";
import FormElementLabelWithDocumentation from "../../common/FormElementLabelWithDocumentation";
import _ from "lodash";

export default class MultiSelectMediaFormElement extends MediaFormElement {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Colors from "../../primitives/Colors";
import {QuestionGroup as QuestionGroupModel, RepeatableQuestionGroup} from 'avni-models';
import QuestionGroup from "./QuestionGroup";
import FormElementLabelWithDocumentation from "../../common/FormElementLabelWithDocumentation";

import _ from "lodash";

class RepeatableFormElement extends AbstractFormElement {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Colors from "../../primitives/Colors";
import ValidationErrorMessage from "../ValidationErrorMessage";
import FileFormElement from "./FileFormElement";
import FormElementLabelWithDocumentation from "../../common/FormElementLabelWithDocumentation";
import _ from "lodash";

class SingleSelectFileFormElement extends FileFormElement {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from "react";
import ValidationErrorMessage from "../../form/ValidationErrorMessage";
import MediaFormElement from "./MediaFormElement";
import FormElementLabelWithDocumentation from "../../common/FormElementLabelWithDocumentation";
import _ from "lodash";

export default class SingleSelectMediaFormElement extends MediaFormElement {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Fonts from '../primitives/Fonts';
import GlificMessagesTab from './GlificMessagesTab';
import GlificService from '../../service/GlificService';
import {Spinner} from 'native-base';
import _ from "lodash";

@Path('/GlificScheduledAndSentMsgsView')
class GlificScheduledAndSentMsgsView extends AbstractComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import ZeroResults from "../common/ZeroResults";
import FloatingButton from "../primitives/FloatingButton";
import TypedTransition from "../../framework/routing/TypedTransition";
import SubjectRegisterFromTaskView from "./SubjectRegisterFromTaskView";
import _ from "lodash";

@Path('/individualSearchResultPaginatedView')
class IndividualSearchResultPaginatedView extends AbstractComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import EntitySyncStatusView from "../entitysyncstatus/EntitySyncStatusView";
import DevSettingsView from "../settings/DevSettingsView";
import CustomDashboardView from "../customDashboard/CustomDashboardView";
import OrganisationConfigService from "../../service/OrganisationConfigService";
import _ from "lodash";

const FunctionalityMenus = [
new StaticMenuItem("dashboard", "view-dashboard", "dashboards", StaticMenuItem.InternalNavigationMenuType, CustomDashboardView),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Reducers from "../../reducer";
import Colors from "../primitives/Colors";
import CHSNavigator from "../../utility/CHSNavigator";
import GrowthChartView from "./GrowthChartView";
import * as _ from "lodash";
import _ from "lodash";
import Fonts from "../primitives/Fonts";
import Styles from "../primitives/Styles";
import {Privilege, EncounterType} from "avni-models";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Fonts from "../primitives/Fonts";
import {Names as Actions} from "../../action/program/SubjectDashboardViewActions";
import MCIcon from "react-native-vector-icons/MaterialCommunityIcons";
import OIcon from "react-native-vector-icons/Octicons";
import _ from "lodash";

class SubjectDashboardView extends AbstractComponent {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Styles from "../primitives/Styles";
import Colors from "../primitives/Colors";
import SelectableItemGroup from "../primitives/SelectableItemGroup";
import UserInfoService from "../../service/UserInfoService";

import _ from "lodash";

@Path('/settingsView')
class SettingsView extends AbstractComponent {
Expand Down
1 change: 1 addition & 0 deletions packages/openchs-android/src/views/task/TaskFormView.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {AvniAlert} from "../common/AvniAlert";
import {ObservationsHolder} from 'avni-models';
import FormMappingService from "../../service/FormMappingService";
import TypedTransition from "../../framework/routing/TypedTransition";
import _ from "lodash";


@Path('/taskFormView')
Expand Down

0 comments on commit ef87fd1

Please sign in to comment.