Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f8e4128
CU-868cu9311 clearing out for rn
ucswift Feb 26, 2025
24a790f
CU-868cu9311 init rn commit
ucswift Feb 27, 2025
f94e93f
CU-868cu9311 Working on the call detail screen.
ucswift Feb 27, 2025
bebfe29
CU-868cu9311 Working on the call detail view
ucswift Feb 28, 2025
9e028be
CU-868cu9311 Working on ui
ucswift Feb 28, 2025
fa11500
CU-868cu9311 trying to fix theme
ucswift Feb 28, 2025
2cc752e
CU-868cu9311 trying to fix build
ucswift Feb 28, 2025
31cd046
CU-868cu9311 Cleaning folders up
ucswift Mar 1, 2025
cfb3eae
CU-868cu9311 added image picker
ucswift Mar 1, 2025
b37a8c5
CU-868cu9311 working on call detail view.
ucswift Mar 4, 2025
5cd5c34
CU-868cu9311 Starting work on the map
ucswift Mar 5, 2025
7014bbe
CU-868cu9311 Working on the map.
ucswift Mar 6, 2025
5aa425d
CU-868cu9311 Working on styling
ucswift Mar 8, 2025
24c4ea1
CU-868cu9311 Working on the view call screen and fixing styling issues
ucswift Mar 8, 2025
ce95e47
CU-868cu9311 working on call detail view added route option.
ucswift Mar 8, 2025
ae9f1e9
CU-868cu9311 First pass at new call screen
ucswift Mar 8, 2025
db72702
CU-868cu9311 working on notification sidebar.
ucswift Mar 12, 2025
f6acba1
CU-868cu9311 Working on push notifications
ucswift Mar 12, 2025
6e6fdd0
CU-868cu9311 Added sentry working on push.
ucswift Mar 13, 2025
46c5465
CU-868cu9311 Working on push notifications and inbox
ucswift Mar 18, 2025
f883693
CU-868cu9311 Working on push notifications and notes view.
ucswift Mar 18, 2025
2828edc
CU-868cu9311 Added protocols view.
ucswift Mar 19, 2025
b9cdc7e
CU-868cu9311 Added contacts view and protocols view.
ucswift Mar 19, 2025
bc268d8
CU-868cu9311 Fixed bug with status in side bad, contact work, settings.
ucswift Apr 5, 2025
613d052
CU-868cu9311 Fixed unit role assignment api url issue
ucswift Apr 5, 2025
42a50e7
CU-868cu9311 Added es translations fixed map icon issue. Added posthog.
ucswift Apr 17, 2025
8abdd1e
CU-868cu9311 Getting LiveKit added, bug fixes.
ucswift May 10, 2025
5dd1221
CU-868cu9311 Fixing case file issue.
ucswift May 12, 2025
2d0aeb9
CU-868cu9311 Working on build
ucswift May 13, 2025
573f9c0
CU-868cu9311 Bugfixes
ucswift May 16, 2025
701528a
CU-868cu9311 removing mapping files temp!
ucswift May 30, 2025
0007d8b
CU-868cu9311 Re adding mapping files with correct case.
ucswift May 30, 2025
d6803d5
CU-868cu9311 Updated sentry to fix build
ucswift Jun 3, 2025
1f485ec
CU-868cu9311 Working on the build
ucswift Jun 3, 2025
ad9d536
Changing build for prod
ucswift Jun 4, 2025
c7c6e4a
Updated ios config
ucswift Jun 4, 2025
07f9622
Merge branch 'rn-main' of https://github.com/Resgrid/Unit into rn-main
ucswift Jun 4, 2025
af3e5a6
CU-868cu9311 Minor updates
ucswift Jun 5, 2025
d0ec4fe
CU-868cu9311 Logo styling fixes, fixed error with sidebar queryprov
ucswift Jun 7, 2025
86f895e
CU-868cu9311 working on github actions and minor fix.
ucswift Jun 8, 2025
30b5924
CU-868cu9311 removing ai supplied token lmao
ucswift Jun 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
59 changes: 59 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
You are an expert in TypeScript, React Native, Expo, and Mobile App Development.

Code Style and Structure:

- Write concise, type-safe TypeScript code.
- Use functional components and hooks over class components.
- Ensure components are modular, reusable, and maintainable.
- Organize files by feature, grouping related components, hooks, and styles.

Naming Conventions:

- Use camelCase for variable and function names (e.g., `isFetchingData`, `handleUserInput`).
- Use PascalCase for component names (e.g., `UserProfile`, `ChatScreen`).
- Directory names should be lowercase and hyphenated (e.g., `user-profile`, `chat-screen`).

TypeScript Usage:

- Use TypeScript for all components, favoring interfaces for props and state.
- Enable strict typing in `tsconfig.json`.
- Avoid using `any`; strive for precise types.
- Utilize `React.FC` for defining functional components with props.

Performance Optimization:

- Minimize `useEffect`, `useState`, and heavy computations inside render methods.
- Use `React.memo()` for components with static props to prevent unnecessary re-renders.
- Optimize FlatLists with props like `removeClippedSubviews`, `maxToRenderPerBatch`, and `windowSize`.
- Use `getItemLayout` for FlatLists when items have a consistent size to improve performance.
- Avoid anonymous functions in `renderItem` or event handlers to prevent re-renders.

UI and Styling:

- Use consistent styling, either through `StyleSheet.create()` or Styled Components.
- Ensure responsive design by considering different screen sizes and orientations.
- Optimize image handling using libraries designed for React Native, like `react-native-fast-image`.

Best Practices:

- Follow React Native's threading model to ensure smooth UI performance.
- Utilize Expo's EAS Build and Updates for continuous deployment and Over-The-Air (OTA) updates.
- Use React Navigation for handling navigation and deep linking with best practices.
- Create and use Jest to test to validate all generated components
- Write unit tests for all generated logic

Additional Rules:

- Use `pnpm` as the package manager.
- Use Expo's secure store for sensitive data
- Implement proper offline support
- Use `zustand` for state management
- Use `react-hook-form` for form handling
- Use `react-query` for data fetching
- Use `react-i18next` for internationalization
- Use `react-native-mmkv` for local storage
- Use `axios` for API requests
- Use `gluestack-ui` for UI
- Use `@rnmapbox/maps` for maps, mapping or vehicle navigation
- Use `lucide-react-native` for icons and use those components directly in the markup and don't use the gluestack-ui icon component
- Use ? : for conditional rendering and not &&
29 changes: 29 additions & 0 deletions .easignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
node_modules/
.expo/
dist/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
yarn-error.log
/coverage
# macOS
.DS_Store
/android
/ios
/web
/apps

# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli

# Include a file not in source control
!google-services.json
!credentials.json
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.eslintignorenode_modules
__tests__/
.vscode/
android/
coverage/
ios/
.expo
.expo-shared
docs/
cli/
97 changes: 97 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
const path = require('path');

module.exports = {
extends: ['expo', 'plugin:tailwindcss/recommended', 'prettier'],
plugins: [
'prettier',
'unicorn',
'@typescript-eslint',
'unused-imports',
'tailwindcss',
'simple-import-sort',
'eslint-plugin-react-compiler',
],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'prettier/prettier': 'warn',
'max-params': ['error', 10], // Limit the number of parameters in a function to use object instead
'max-lines-per-function': ['error', 1000],
'react/display-name': 'off',
'react/no-inline-styles': 'off',
'react/destructuring-assignment': 'off', // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
'react/require-default-props': 'off', // Allow non-defined react props as undefined
'@typescript-eslint/comma-dangle': 'off', // Avoid conflict rule between Eslint and Prettier
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
disallowTypeAnnotations: true,
},
], // Ensure `import type` is used when it's necessary
'import/prefer-default-export': 'off', // Named export is easier to refactor automatically
'import/no-cycle': ['error', { maxDepth: '∞' }],
'tailwindcss/classnames-order': [
'warn',
{
officialSorting: true,
},
], // Follow the same ordering as the official plugin `prettier-plugin-tailwindcss`
'simple-import-sort/imports': 'error', // Import configuration for `eslint-plugin-simple-import-sort`
'simple-import-sort/exports': 'error', // Export configuration for `eslint-plugin-simple-import-sort`
'@typescript-eslint/no-unused-vars': 'off',
'tailwindcss/no-custom-classname': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
overrides: [
// Configuration for translations files (i18next)
{
files: ['src/translations/*.json'],
extends: ['plugin:i18n-json/recommended'],
rules: {
'i18n-json/valid-message-syntax': [
2,
{
syntax: path.resolve('./scripts/i18next-syntax-validation.js'),
},
],
'i18n-json/valid-json': 2,
'i18n-json/sorted-keys': [
2,
{
order: 'asc',
indentSpaces: 2,
},
],
'i18n-json/identical-keys': [
2,
{
filePath: path.resolve('./src/translations/en.json'),
},
],
'prettier/prettier': [
0,
{
singleQuote: true,
endOfLine: 'auto',
},
],
},
},
{
// Configuration for testing files
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
],
};
67 changes: 0 additions & 67 deletions .eslintrc.json

This file was deleted.

8 changes: 8 additions & 0 deletions .expo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
> Why do I have a folder named ".expo" in my project?
The ".expo" folder is created when an Expo project is started using "expo start" command.
> What do the files contain?
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
- "settings.json": contains the server configuration that is used to serve the application manifest.
> Should I commit the ".expo" folder?
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
Binary file added .expo/app-icon-badge/foregroundImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .expo/app-icon-badge/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions .expo/devices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"devices": [
{
"installationId": "4af035d0-07a6-423e-b6bc-17e75e219cfe",
"lastUsed": 1749391119998
},
{
"installationId": "aa1e01fe-0cc5-418d-93e4-df49f96c1e43",
"lastUsed": 1749388195311
},
{
"installationId": "2964cc85-ebf5-4eb5-8de9-b46a30fa64bc",
"lastUsed": 1749385761171
},
{
"installationId": "6142ad22-0704-42f4-9826-1999a4b19d0a",
"lastUsed": 1749385369955
},
{
"installationId": "ccb3c274-d545-46a7-8b80-3d3d181c8464",
"lastUsed": 1749302782562
},
{
"installationId": "b63e4dc1-263c-47f2-afe6-99e9c06d5b90",
"lastUsed": 1749265905063
},
{
"installationId": "ef2f0ec1-1637-48ae-a465-b6044dbaf625",
"lastUsed": 1749262351089
},
{
"installationId": "121adcd6-201e-4de8-adbe-deceab35ee92",
"lastUsed": 1749252228522
},
{
"installationId": "76ef4b68-8251-4057-b4b5-e6af6a5a7bec",
"lastUsed": 1749252043224
},
{
"installationId": "a66b5af2-bed7-4b5d-aff0-94e99e751b90",
"lastUsed": 1749220817812
}
]
}
4 changes: 4 additions & 0 deletions .expo/prebuild/cached-packages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dependencies": "d95d2be82e7d04cbc28f2ebeb88eefdb0f26b224",
"devDependencies": "d317c6777efc0d756da584b230069efaf556633b"
}
14 changes: 14 additions & 0 deletions .expo/types/router.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable */
import * as Router from 'expo-router';

export * from 'expo-router';

declare module 'expo-router' {
export namespace ExpoRouter {
export interface __routes<T extends string | object = string> {
hrefInputParams: { pathname: Router.RelativePathString, params?: Router.UnknownInputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownInputParams } | { pathname: `/onboarding`; params?: Router.UnknownInputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/calls` | `/calls`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/contacts` | `/contacts`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}` | `/`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/notes` | `/notes`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/protocols` | `/protocols`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/settings` | `/settings`; params?: Router.UnknownInputParams; } | { pathname: `/call/new`; params?: Router.UnknownInputParams; } | { pathname: `/login`; params?: Router.UnknownInputParams; } | { pathname: `/login/login-form`; params?: Router.UnknownInputParams; } | { pathname: `/[...messing]`, params: Router.UnknownInputParams & { messing: (string | number)[]; } } | { pathname: `/call/[id]`, params: Router.UnknownInputParams & { id: string | number; } };
hrefOutputParams: { pathname: Router.RelativePathString, params?: Router.UnknownOutputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownOutputParams } | { pathname: `/onboarding`; params?: Router.UnknownOutputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(app)'}/calls` | `/calls`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(app)'}/contacts` | `/contacts`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(app)'}` | `/`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(app)'}/notes` | `/notes`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(app)'}/protocols` | `/protocols`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(app)'}/settings` | `/settings`; params?: Router.UnknownOutputParams; } | { pathname: `/call/new`; params?: Router.UnknownOutputParams; } | { pathname: `/login`; params?: Router.UnknownOutputParams; } | { pathname: `/login/login-form`; params?: Router.UnknownOutputParams; } | { pathname: `/[...messing]`, params: Router.UnknownOutputParams & { messing: string[]; } } | { pathname: `/call/[id]`, params: Router.UnknownOutputParams & { id: string; } };
href: Router.RelativePathString | Router.ExternalPathString | `/onboarding${`?${string}` | `#${string}` | ''}` | `/_sitemap${`?${string}` | `#${string}` | ''}` | `${'/(app)'}/calls${`?${string}` | `#${string}` | ''}` | `/calls${`?${string}` | `#${string}` | ''}` | `${'/(app)'}/contacts${`?${string}` | `#${string}` | ''}` | `/contacts${`?${string}` | `#${string}` | ''}` | `${'/(app)'}${`?${string}` | `#${string}` | ''}` | `/${`?${string}` | `#${string}` | ''}` | `${'/(app)'}/notes${`?${string}` | `#${string}` | ''}` | `/notes${`?${string}` | `#${string}` | ''}` | `${'/(app)'}/protocols${`?${string}` | `#${string}` | ''}` | `/protocols${`?${string}` | `#${string}` | ''}` | `${'/(app)'}/settings${`?${string}` | `#${string}` | ''}` | `/settings${`?${string}` | `#${string}` | ''}` | `/call/new${`?${string}` | `#${string}` | ''}` | `/login${`?${string}` | `#${string}` | ''}` | `/login/login-form${`?${string}` | `#${string}` | ''}` | { pathname: Router.RelativePathString, params?: Router.UnknownInputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownInputParams } | { pathname: `/onboarding`; params?: Router.UnknownInputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/calls` | `/calls`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/contacts` | `/contacts`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}` | `/`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/notes` | `/notes`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/protocols` | `/protocols`; params?: Router.UnknownInputParams; } | { pathname: `${'/(app)'}/settings` | `/settings`; params?: Router.UnknownInputParams; } | { pathname: `/call/new`; params?: Router.UnknownInputParams; } | { pathname: `/login`; params?: Router.UnknownInputParams; } | { pathname: `/login/login-form`; params?: Router.UnknownInputParams; } | `/${string}` | `/call/${Router.SingleRoutePart<T>}` | { pathname: `/[...messing]`, params: Router.UnknownInputParams & { messing: (string | number)[]; } } | { pathname: `/call/[id]`, params: Router.UnknownInputParams & { id: string | number; } };
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading