upd: redesign
Deskripsi: - pengumuman - list dan detail diskusi umum - list dan detail diskusi divisi NO Issues
This commit is contained in:
@@ -113,7 +113,7 @@ export default function Announcement() {
|
|||||||
bgColor="transparent"
|
bgColor="transparent"
|
||||||
icon={
|
icon={
|
||||||
// <View style={[Styles.iconContent]}>
|
// <View style={[Styles.iconContent]}>
|
||||||
<MaterialIcons name="campaign" size={25} color={'white'} />
|
<MaterialIcons name="campaign" size={25} color={colors.text} />
|
||||||
// </View>
|
// </View>
|
||||||
}
|
}
|
||||||
title={item.title}
|
title={item.title}
|
||||||
|
|||||||
@@ -259,7 +259,8 @@ export default function DetailDiscussionGeneral() {
|
|||||||
<BorderBottomItem2
|
<BorderBottomItem2
|
||||||
dataFile={fileDiscussion}
|
dataFile={fileDiscussion}
|
||||||
descEllipsize={false}
|
descEllipsize={false}
|
||||||
borderType="bottom"
|
borderType="all"
|
||||||
|
bgColor="white"
|
||||||
icon={
|
icon={
|
||||||
<View style={[Styles.iconContent]}>
|
<View style={[Styles.iconContent]}>
|
||||||
<MaterialIcons name="chat" size={25} color={'black'} />
|
<MaterialIcons name="chat" size={25} color={'black'} />
|
||||||
@@ -287,7 +288,7 @@ export default function DetailDiscussionGeneral() {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
<View style={[Styles.p15]}>
|
<View style={[Styles.mt10]}>
|
||||||
{
|
{
|
||||||
loadingKomentar ?
|
loadingKomentar ?
|
||||||
arrSkeleton.map((item: any, i: number) => {
|
arrSkeleton.map((item: any, i: number) => {
|
||||||
@@ -300,7 +301,7 @@ export default function DetailDiscussionGeneral() {
|
|||||||
return (
|
return (
|
||||||
<BorderBottomItem
|
<BorderBottomItem
|
||||||
key={i}
|
key={i}
|
||||||
borderType="bottom"
|
borderType="all"
|
||||||
colorPress
|
colorPress
|
||||||
icon={
|
icon={
|
||||||
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="xs" />
|
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="xs" />
|
||||||
@@ -310,7 +311,7 @@ export default function DetailDiscussionGeneral() {
|
|||||||
desc={item.comment}
|
desc={item.comment}
|
||||||
rightBottomInfo={item.isEdited ? "Edited" : ""}
|
rightBottomInfo={item.isEdited ? "Edited" : ""}
|
||||||
descEllipsize={detailMore.includes(item.id) ? false : true}
|
descEllipsize={detailMore.includes(item.id) ? false : true}
|
||||||
bgColor="transparent"
|
bgColor="white"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setDetailMore((prev: any) => {
|
setDetailMore((prev: any) => {
|
||||||
if (prev.includes(item.id)) {
|
if (prev.includes(item.id)) {
|
||||||
|
|||||||
@@ -153,9 +153,9 @@ export default function Discussion() {
|
|||||||
onPress={() => { router.push(`/discussion/${item.id}`) }}
|
onPress={() => { router.push(`/discussion/${item.id}`) }}
|
||||||
borderType="bottom"
|
borderType="bottom"
|
||||||
icon={
|
icon={
|
||||||
<View style={[Styles.iconContent]}>
|
// <View style={[Styles.iconContent]}>
|
||||||
<MaterialIcons name="chat" size={25} color={'black'} />
|
<MaterialIcons name="chat" size={25} color={colors.text} />
|
||||||
</View>
|
// </View>
|
||||||
}
|
}
|
||||||
title={item.title}
|
title={item.title}
|
||||||
subtitle={
|
subtitle={
|
||||||
|
|||||||
@@ -327,7 +327,8 @@ export default function DiscussionDetail() {
|
|||||||
<BorderBottomItem2
|
<BorderBottomItem2
|
||||||
dataFile={fileDiscussion}
|
dataFile={fileDiscussion}
|
||||||
descEllipsize={false}
|
descEllipsize={false}
|
||||||
borderType="bottom"
|
bgColor="white"
|
||||||
|
borderType="all"
|
||||||
icon={
|
icon={
|
||||||
<ImageUser
|
<ImageUser
|
||||||
src={`${ConstEnv.url_storage}/files/${data?.user_img}`}
|
src={`${ConstEnv.url_storage}/files/${data?.user_img}`}
|
||||||
@@ -364,7 +365,7 @@ export default function DiscussionDetail() {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<View style={[Styles.p15]}>
|
<View style={[Styles.mt10]}>
|
||||||
{
|
{
|
||||||
loadingKomentar ?
|
loadingKomentar ?
|
||||||
arrSkeleton.map((item, index) => (
|
arrSkeleton.map((item, index) => (
|
||||||
@@ -374,7 +375,7 @@ export default function DiscussionDetail() {
|
|||||||
dataComment.map((item, index) => (
|
dataComment.map((item, index) => (
|
||||||
<BorderBottomItem
|
<BorderBottomItem
|
||||||
key={index}
|
key={index}
|
||||||
borderType="bottom"
|
borderType="all"
|
||||||
colorPress
|
colorPress
|
||||||
icon={
|
icon={
|
||||||
<ImageUser
|
<ImageUser
|
||||||
@@ -387,7 +388,7 @@ export default function DiscussionDetail() {
|
|||||||
desc={item.comment}
|
desc={item.comment}
|
||||||
rightBottomInfo={item.isEdited ? "Edited" : ""}
|
rightBottomInfo={item.isEdited ? "Edited" : ""}
|
||||||
descEllipsize={detailMore.includes(item.id) ? false : true}
|
descEllipsize={detailMore.includes(item.id) ? false : true}
|
||||||
bgColor="transparent"
|
bgColor="white"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setDetailMore((prev: any) => {
|
setDetailMore((prev: any) => {
|
||||||
if (prev.includes(item.id)) {
|
if (prev.includes(item.id)) {
|
||||||
@@ -465,8 +466,8 @@ export default function DiscussionDetail() {
|
|||||||
size={25}
|
size={25}
|
||||||
style={
|
style={
|
||||||
[selectKomentar.comment == "" || regexOnlySpacesOrEnter.test(selectKomentar.comment) || loadingSend || ((entityUser.role == "user" || entityUser.role == "coadmin") && !isMemberDivision)
|
[selectKomentar.comment == "" || regexOnlySpacesOrEnter.test(selectKomentar.comment) || loadingSend || ((entityUser.role == "user" || entityUser.role == "coadmin") && !isMemberDivision)
|
||||||
? Styles.cGray
|
? { color: colors.dimmed }
|
||||||
: Styles.cDefault,
|
: { color: colors.tint },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@@ -479,7 +480,6 @@ export default function DiscussionDetail() {
|
|||||||
isMemberDivision)
|
isMemberDivision)
|
||||||
?
|
?
|
||||||
<InputForm
|
<InputForm
|
||||||
bg={colors.card}
|
|
||||||
type="default"
|
type="default"
|
||||||
round
|
round
|
||||||
multiline
|
multiline
|
||||||
@@ -512,8 +512,8 @@ export default function DiscussionDetail() {
|
|||||||
size={25}
|
size={25}
|
||||||
style={
|
style={
|
||||||
[komentar == "" || regexOnlySpacesOrEnter.test(komentar) || loadingSend || ((entityUser.role == "user" || entityUser.role == "coadmin") && !isMemberDivision)
|
[komentar == "" || regexOnlySpacesOrEnter.test(komentar) || loadingSend || ((entityUser.role == "user" || entityUser.role == "coadmin") && !isMemberDivision)
|
||||||
? Styles.cGray
|
? { color: colors.dimmed }
|
||||||
: Styles.cDefault,
|
: { color: colors.tint }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ export default function DiscussionDivision() {
|
|||||||
onPress={() => { router.push(`./discussion/${item.id}`) }}
|
onPress={() => { router.push(`./discussion/${item.id}`) }}
|
||||||
borderType="bottom"
|
borderType="bottom"
|
||||||
icon={
|
icon={
|
||||||
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="sm" />
|
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="xs" />
|
||||||
}
|
}
|
||||||
title={item.user_name}
|
title={item.user_name}
|
||||||
subtitle={
|
subtitle={
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { ColorsStatus } from "@/constants/ColorsStatus";
|
|
||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
import { useTheme } from "@/providers/ThemeProvider";
|
import { useTheme } from "@/providers/ThemeProvider";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Dimensions, Pressable, View } from "react-native";
|
import { Pressable, View } from "react-native";
|
||||||
import Text from "./Text";
|
import Text from "./Text";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -69,7 +68,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
|
|||||||
{
|
{
|
||||||
(leftBottomInfo || rightBottomInfo) &&
|
(leftBottomInfo || rightBottomInfo) &&
|
||||||
(
|
(
|
||||||
<View style={[rightBottomInfo && !leftBottomInfo ? Styles.rowSpaceBetweenReverse : Styles.rowSpaceBetween, Styles.mt05]}>
|
<View style={[rightBottomInfo && !leftBottomInfo ? Styles.rowSpaceBetweenReverse : Styles.rowSpaceBetween, Styles.mt02]}>
|
||||||
{
|
{
|
||||||
typeof leftBottomInfo == 'string' ?
|
typeof leftBottomInfo == 'string' ?
|
||||||
<Text style={[Styles.textInformation, { color: colors.dimmed }]}>{leftBottomInfo}</Text>
|
<Text style={[Styles.textInformation, { color: colors.dimmed }]}>{leftBottomInfo}</Text>
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ export default function BorderBottomItem2({ title, subtitle, icon, desc, onPress
|
|||||||
{desc && <Text style={[Styles.textDefault, Styles.mt05, { textAlign: 'left', color: textColorFix }]} numberOfLines={descEllipsize == false ? 0 : 2} ellipsizeMode='tail'>{desc}</Text>}
|
{desc && <Text style={[Styles.textDefault, Styles.mt05, { textAlign: 'left', color: textColorFix }]} numberOfLines={descEllipsize == false ? 0 : 2} ellipsizeMode='tail'>{desc}</Text>}
|
||||||
{
|
{
|
||||||
dataFile.length > 0 && (
|
dataFile.length > 0 && (
|
||||||
<ScrollView horizontal style={[Styles.mv05]} showsHorizontalScrollIndicator={false}>
|
<ScrollView horizontal style={[Styles.mv10]} showsHorizontalScrollIndicator={false}>
|
||||||
{dataFile.map((item, index) => (
|
{dataFile.map((item, index) => (
|
||||||
<Pressable
|
<Pressable
|
||||||
key={index}
|
key={index}
|
||||||
@@ -173,7 +173,7 @@ export default function BorderBottomItem2({ title, subtitle, icon, desc, onPress
|
|||||||
{
|
{
|
||||||
(leftBottomInfo || rightBottomInfo) &&
|
(leftBottomInfo || rightBottomInfo) &&
|
||||||
(
|
(
|
||||||
<View style={[rightBottomInfo && !leftBottomInfo ? Styles.rowSpaceBetweenReverse : Styles.rowSpaceBetween, Styles.mt05]}>
|
<View style={[rightBottomInfo && !leftBottomInfo ? Styles.rowSpaceBetweenReverse : Styles.rowSpaceBetween, Styles.mt10]}>
|
||||||
{
|
{
|
||||||
typeof leftBottomInfo == 'string' ?
|
typeof leftBottomInfo == 'string' ?
|
||||||
<Text style={[Styles.textInformation, { color: colors.dimmed }]}>{leftBottomInfo}</Text>
|
<Text style={[Styles.textInformation, { color: colors.dimmed }]}>{leftBottomInfo}</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user