Vitalik
9 months ago
44 changed files with 417 additions and 166 deletions
@ -1,12 +1,12 @@
@@ -1,12 +1,12 @@
|
||||
import React from 'react'; |
||||
import {SafeAreaView, Text} from 'react-native'; |
||||
import React from 'react' |
||||
import { SafeAreaView, Text } from 'react-native' |
||||
|
||||
function App(): JSX.Element { |
||||
return ( |
||||
<SafeAreaView> |
||||
<Text>test</Text> |
||||
</SafeAreaView> |
||||
); |
||||
return ( |
||||
<SafeAreaView> |
||||
<Text>test</Text> |
||||
</SafeAreaView> |
||||
) |
||||
} |
||||
|
||||
export default App; |
||||
export default App |
||||
|
Binary file not shown.
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?> |
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<files-path name="files" path="/" /> |
||||
<external-files-path name="external_files" path="" /> |
||||
<external-path name="external" path="." /> |
||||
<cache-path name="cache" path="/" /> |
||||
</paths> |
Binary file not shown.
@ -1,29 +1,29 @@
@@ -1,29 +1,29 @@
|
||||
import { IChatBackgroundData } from './../modules/settings/interfaces/chat-backgrounds.interfaces'; |
||||
import { ChatBgKeys } from "@/shared"; |
||||
import { IChatBackgroundData } from './../modules/settings/interfaces/chat-backgrounds.interfaces' |
||||
import { ChatBgKeys } from '@/shared' |
||||
|
||||
export const defaultChatBgConfig: IChatBackgroundData[] = [ |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_1, |
||||
img: require('@/assets/images/static-chat-bg/bg-6.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_2, |
||||
img: require('@/assets/images/static-chat-bg/bg-2.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_3, |
||||
img: require('@/assets/images/static-chat-bg/bg-3.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_4, |
||||
img: require('@/assets/images/static-chat-bg/bg-4.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_5, |
||||
img: require('@/assets/images/static-chat-bg/bg-5.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_6, |
||||
img: require('@/assets/images/static-chat-bg/bg-1.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_1, |
||||
img: require('@/assets/images/static-chat-bg/bg-6.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_2, |
||||
img: require('@/assets/images/static-chat-bg/bg-2.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_3, |
||||
img: require('@/assets/images/static-chat-bg/bg-3.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_4, |
||||
img: require('@/assets/images/static-chat-bg/bg-4.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_5, |
||||
img: require('@/assets/images/static-chat-bg/bg-5.jpg'), |
||||
}, |
||||
{ |
||||
id: ChatBgKeys.DEF_BG_6, |
||||
img: require('@/assets/images/static-chat-bg/bg-1.jpg'), |
||||
}, |
||||
] |
||||
|
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
export enum ContactFieldKeyEnum { |
||||
firstName = "Ім'я", |
||||
lastName = 'Фамілія', |
||||
fullName = "Повне ім'я", |
||||
position = 'Посада', |
||||
factoryName = 'Місце роботи', |
||||
avatarUrl = 'Фото профілю', |
||||
dateOfBirthday = 'День народження', |
||||
workPhoneNumber = 'Робочий номер телефону', |
||||
personalPhoneNumber = 'Персональний номер', |
||||
innerPhoneNumber = 'Внутрішній номер телефону', |
||||
email = 'Електрона пошта', |
||||
} |
@ -1 +1,2 @@
@@ -1 +1,2 @@
|
||||
export * from './contact-detail.enums' |
||||
export * from './contact-detail.enums' |
||||
export * from './contact-field-key.enum' |
||||
|
@ -1,2 +1,3 @@
@@ -1,2 +1,3 @@
|
||||
export * from './use-fetch-contacts.hook' |
||||
export * from './use-contact-detail.hook' |
||||
export * from './use-contact-copy.hook' |
||||
|
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
import { IContacForCopy, appEvents } from '@/shared' |
||||
import { CopyToBuffer } from '@/shared/helpers' |
||||
import * as _ from 'lodash' |
||||
import { ContactFieldKeyEnum } from '../enums' |
||||
|
||||
export const useContactCopy = (contact: IContacForCopy) => { |
||||
const formatContactForCopy = (contacData: IContacForCopy): string => { |
||||
const formatData = _.omit(contacData, [ |
||||
'userId', |
||||
'isSoonBirthday', |
||||
'chatId', |
||||
'status', |
||||
]) |
||||
|
||||
let resultString = '' |
||||
|
||||
for (const key in formatData) { |
||||
resultString += `${ContactFieldKeyEnum[key]}: ${formatData[key]}\n` |
||||
} |
||||
|
||||
return resultString |
||||
} |
||||
|
||||
const actionCopy = () => { |
||||
appEvents.emit('openActionSheet', { |
||||
items: [ |
||||
{ |
||||
name: "Скопіювати І'мя та Прізвище", |
||||
onPress: () => CopyToBuffer(`${contact.fullName}`), |
||||
}, |
||||
{ |
||||
name: 'Скопіювати Посаду', |
||||
onPress: () => |
||||
CopyToBuffer( |
||||
`${contact.factoryName}, ${contact.position}`, |
||||
), |
||||
}, |
||||
{ |
||||
name: 'Скопіювати всі данні користувача', |
||||
onPress: () => CopyToBuffer(formatContactForCopy(contact)), |
||||
}, |
||||
], |
||||
}) |
||||
} |
||||
|
||||
return { |
||||
actionCopy, |
||||
} |
||||
} |
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
export * from './confirm-modal.smart-component'; |
||||
export * from './info-modal.smart-component'; |
||||
export * from './confirm-modal.smart-component' |
||||
export * from './info-modal.smart-component' |
||||
export * from './date-picker.smart-component' |
||||
export * from './done-task.smart-component' |
||||
export * from './modal-picker-with-pagination.smart-component' |
||||
export * from './fancybox.smart-component' |
||||
export * from './fullscreen-video.smart-component' |
||||
export * from './fullscreen-video.smart-component' |
||||
|
@ -1,45 +1,38 @@
@@ -1,45 +1,38 @@
|
||||
import React from 'react'; |
||||
import { createIconSetFromFontello } from 'react-native-vector-icons'; |
||||
import { fontelloConfig } from '@/config/fontello.config'; |
||||
import { StyleSheet, TouchableOpacity, ViewStyle } from 'react-native'; |
||||
const Icon = createIconSetFromFontello(fontelloConfig); |
||||
import React from 'react' |
||||
import { createIconSetFromFontello } from 'react-native-vector-icons' |
||||
import { fontelloConfig } from '@/config/fontello.config' |
||||
import { TouchableOpacity, ViewStyle } from 'react-native' |
||||
const Icon = createIconSetFromFontello(fontelloConfig) |
||||
|
||||
interface IProps { |
||||
name: string |
||||
size: number |
||||
color?: string |
||||
style?: any |
||||
onPress?: () => void |
||||
btnStyle?: ViewStyle |
||||
name: string |
||||
size: number |
||||
color?: string |
||||
style?: any |
||||
onPress?: () => void |
||||
btnStyle?: ViewStyle |
||||
} |
||||
|
||||
export const IconComponent = ({ |
||||
onPress, |
||||
...props |
||||
}: IProps) => { |
||||
|
||||
if (onPress) { |
||||
return ( |
||||
<TouchableOpacity onPress={onPress} style={[ props.btnStyle]}> |
||||
<Icon |
||||
name={props.name} |
||||
size={props.size} |
||||
color={props.color} |
||||
style={props.style}
|
||||
/> |
||||
</TouchableOpacity> |
||||
) |
||||
} else { |
||||
return ( |
||||
<Icon |
||||
name={props.name} |
||||
size={props.size} |
||||
color={props.color} |
||||
style={props.style}
|
||||
/> |
||||
) |
||||
} |
||||
export const IconComponent = ({ onPress, ...props }: IProps) => { |
||||
if (onPress) { |
||||
return ( |
||||
<TouchableOpacity onPress={onPress} style={[props.btnStyle]}> |
||||
<Icon |
||||
name={props.name} |
||||
size={props.size} |
||||
color={props.color} |
||||
style={props.style} |
||||
/> |
||||
</TouchableOpacity> |
||||
) |
||||
} else { |
||||
return ( |
||||
<Icon |
||||
name={props.name} |
||||
size={props.size} |
||||
color={props.color} |
||||
style={props.style} |
||||
/> |
||||
) |
||||
} |
||||
} |
||||
|
||||
const styles = StyleSheet.create({ |
||||
}) |
@ -1,14 +1,15 @@
@@ -1,14 +1,15 @@
|
||||
export enum FileType { |
||||
DOC = "doc", |
||||
GIF = "gif", |
||||
JPEG = "jpeg", |
||||
JPG = "jpg", |
||||
MP3 = "mp3", |
||||
MP4 = "mp4", |
||||
PDF = "pdf", |
||||
PNG = "png", |
||||
SVG = "svg", |
||||
TXT = "txt", |
||||
XLS = "xls", |
||||
ZIP = "zip" |
||||
} |
||||
DOC = 'doc', |
||||
GIF = 'gif', |
||||
JPEG = 'jpeg', |
||||
JPG = 'jpg', |
||||
MP3 = 'mp3', |
||||
MP4 = 'mp4', |
||||
PDF = 'pdf', |
||||
PNG = 'png', |
||||
SVG = 'svg', |
||||
TXT = 'txt', |
||||
XLS = 'xls', |
||||
ZIP = 'zip', |
||||
DOCX = 'docx', |
||||
} |
||||
|
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
import Clipboard from '@react-native-community/clipboard' |
||||
import { appEvents } from '../events' |
||||
|
||||
export const CopyToBuffer = (value: string) => { |
||||
Clipboard.setString(value) |
||||
appEvents.emit('openInfoModal', { |
||||
title: '', |
||||
message: 'Данні скопійовано в буфер обміну', |
||||
pressButtonText: 'Продовжити', |
||||
}) |
||||
} |
Loading…
Reference in new issue