QC: Inno dan Pak Jun
Fix: - app/(application)/(user)/collaboration/create.tsx - app/(application)/(user)/event/[id]/edit.tsx - app/(application)/(user)/event/create.tsx - app/(application)/(user)/profile/[id]/blocked-list.tsx - app/(application)/(user)/profile/[id]/index.tsx - app/(application)/(user)/voting/[id]/[status]/detail.tsx - components/Button/FloatingButton.tsx - components/TextArea/TextAreaCustom.tsx - components/TextInput/TextInputCustom.tsx - constants/color-palet.ts - screens/Authentication/LoginView.tsx - screens/Home/topFeatureSection.tsx - screens/Portofolio/SocialMediaSection.tsx - screens/Voting/BoxDetailHasilVotingSection.tsx - styles/global-styles.ts ### No Issue
This commit is contained in:
@@ -155,7 +155,7 @@ export default function CollaborationCreate() {
|
|||||||
<TextAreaCustom
|
<TextAreaCustom
|
||||||
required
|
required
|
||||||
label="Keuntungan Proyek"
|
label="Keuntungan Proyek"
|
||||||
placeholder="Masukan keuntungan proyek"
|
placeholder="Masukan keuntungan proyek, contoh: Meningkatkan relasi bisnis , menjamin kualitas produk, meningkatkan kinerja dan lain lain"
|
||||||
showCount
|
showCount
|
||||||
maxLength={1000}
|
maxLength={1000}
|
||||||
value={data?.benefit}
|
value={data?.benefit}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {
|
|||||||
import { apiMasterEventType } from "@/service/api-client/api-master";
|
import { apiMasterEventType } from "@/service/api-client/api-master";
|
||||||
import { DateTimePickerEvent } from "@react-native-community/datetimepicker";
|
import { DateTimePickerEvent } from "@react-native-community/datetimepicker";
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
import React, { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function EventEdit() {
|
export default function EventEdit() {
|
||||||
@@ -55,6 +55,7 @@ export default function EventEdit() {
|
|||||||
try {
|
try {
|
||||||
setIsLoadData(true);
|
setIsLoadData(true);
|
||||||
const response = await apiEventGetOne({ id: id as string });
|
const response = await apiEventGetOne({ id: id as string });
|
||||||
|
console.log("[DATA BY ID]", JSON.stringify(response, null, 2));
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
setSelectedDate(new Date(response.data.tanggal));
|
setSelectedDate(new Date(response.data.tanggal));
|
||||||
@@ -209,7 +210,7 @@ export default function EventEdit() {
|
|||||||
minimumDate={new Date(Date.now())}
|
minimumDate={new Date(Date.now())}
|
||||||
label="Tanggal & Waktu Mulai"
|
label="Tanggal & Waktu Mulai"
|
||||||
required
|
required
|
||||||
value={selectedDate as any}
|
value={selectedDate}
|
||||||
onChange={(date: any) => {
|
onChange={(date: any) => {
|
||||||
setSelectedDate(date as any);
|
setSelectedDate(date as any);
|
||||||
}}
|
}}
|
||||||
@@ -254,7 +255,6 @@ export default function EventEdit() {
|
|||||||
placeholder="Masukkan deskripsi event"
|
placeholder="Masukkan deskripsi event"
|
||||||
required
|
required
|
||||||
showCount
|
showCount
|
||||||
maxLength={100}
|
|
||||||
value={data?.deskripsi}
|
value={data?.deskripsi}
|
||||||
onChangeText={(value) => setData({ ...data, deskripsi: value })}
|
onChangeText={(value) => setData({ ...data, deskripsi: value })}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default function EventCreate() {
|
|||||||
const response = await apiEventCreate(newData);
|
const response = await apiEventCreate(newData);
|
||||||
console.log("Response", JSON.stringify(response, null, 2));
|
console.log("Response", JSON.stringify(response, null, 2));
|
||||||
|
|
||||||
router.navigate("/event/status");
|
router.replace("/event/status");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -118,6 +118,7 @@ export default function EventCreate() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const buttonSubmit = (
|
const buttonSubmit = (
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
@@ -191,7 +192,7 @@ export default function EventCreate() {
|
|||||||
placeholder="Masukkan deskripsi event"
|
placeholder="Masukkan deskripsi event"
|
||||||
required
|
required
|
||||||
showCount
|
showCount
|
||||||
maxLength={1000}
|
value={data?.deskripsi || ""}
|
||||||
onChangeText={(value: any) =>
|
onChangeText={(value: any) =>
|
||||||
setData({ ...data, deskripsi: value })
|
setData({ ...data, deskripsi: value })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default function ProfileBlockedList() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<NewWrapper
|
<NewWrapper
|
||||||
headerComponent={renderHeader()}
|
// headerComponent={renderHeader()}
|
||||||
listData={listData}
|
listData={listData}
|
||||||
renderItem={renderItem}
|
renderItem={renderItem}
|
||||||
onEndReached={loadMore}
|
onEndReached={loadMore}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ export default function Profile() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onLoadPortofolio = async (id: string) => {
|
const onLoadPortofolio = async (id: string) => {
|
||||||
|
try {
|
||||||
const response = await apiGetPortofolio({ id: id });
|
const response = await apiGetPortofolio({ id: id });
|
||||||
const lastTwoByDate = response.data
|
const lastTwoByDate = response.data
|
||||||
.sort(
|
.sort(
|
||||||
@@ -72,6 +73,9 @@ export default function Profile() {
|
|||||||
) // urut desc
|
) // urut desc
|
||||||
.slice(0, 2);
|
.slice(0, 2);
|
||||||
setListPortofolio(lastTwoByDate);
|
setListPortofolio(lastTwoByDate);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export default function VotingDetailStatus() {
|
|||||||
|
|
||||||
{data &&
|
{data &&
|
||||||
data?.catatan &&
|
data?.catatan &&
|
||||||
(status === "draft" || status === "rejected") && (
|
(status === "draft" || status === "reject") && (
|
||||||
<ReportBox text={data?.catatan} />
|
<ReportBox text={data?.catatan} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,10 @@ const FloatingButton: React.FC<FloatingButtonProps> = ({
|
|||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
fab: {
|
fab: {
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
margin: 16,
|
margin: "auto",
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 0,
|
// bottom: 10,
|
||||||
|
top: -20,
|
||||||
backgroundColor: AccentColor.softblue, // Warna Twitter biru
|
backgroundColor: AccentColor.softblue, // Warna Twitter biru
|
||||||
borderRadius: 50,
|
borderRadius: 50,
|
||||||
borderColor: AccentColor.blue,
|
borderColor: AccentColor.blue,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
import { GStyles } from "@/styles/global-styles";
|
import { GStyles } from "@/styles/global-styles";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import {
|
import {
|
||||||
@@ -6,7 +7,9 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
ViewStyle,
|
ViewStyle,
|
||||||
|
useColorScheme,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
|
import { PlaceholderColor } from "@/constants/color-palet";
|
||||||
|
|
||||||
type IconType = React.ReactNode | string;
|
type IconType = React.ReactNode | string;
|
||||||
|
|
||||||
@@ -48,7 +51,7 @@ const TextAreaCustom: React.FC<TextAreaCustomProps> = ({
|
|||||||
minRows = 4,
|
minRows = 4,
|
||||||
maxRows = 6,
|
maxRows = 6,
|
||||||
showCount = false,
|
showCount = false,
|
||||||
maxLength,
|
maxLength = 1000,
|
||||||
value,
|
value,
|
||||||
onChangeText,
|
onChangeText,
|
||||||
height = 100,
|
height = 100,
|
||||||
@@ -78,6 +81,9 @@ const TextAreaCustom: React.FC<TextAreaCustomProps> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const colorScheme = useColorScheme();
|
||||||
|
const theme = PlaceholderColor[colorScheme || "light"];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[GStyles.inputContainerArea]}>
|
<View style={[GStyles.inputContainerArea]}>
|
||||||
{label && (
|
{label && (
|
||||||
@@ -109,6 +115,7 @@ const TextAreaCustom: React.FC<TextAreaCustomProps> = ({
|
|||||||
GStyles.textAreaInput,
|
GStyles.textAreaInput,
|
||||||
{ color: fontColor },
|
{ color: fontColor },
|
||||||
]}
|
]}
|
||||||
|
placeholderTextColor={theme.placeholder}
|
||||||
editable={!disabled}
|
editable={!disabled}
|
||||||
value={value as string}
|
value={value as string}
|
||||||
onChangeText={onChangeText}
|
onChangeText={onChangeText}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { PlaceholderColor } from "@/constants/color-palet";
|
||||||
import { GStyles } from "@/styles/global-styles";
|
import { GStyles } from "@/styles/global-styles";
|
||||||
import Ionicons from "@expo/vector-icons/Ionicons";
|
import Ionicons from "@expo/vector-icons/Ionicons";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
@@ -8,8 +9,10 @@ import {
|
|||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View,
|
View,
|
||||||
ViewStyle,
|
ViewStyle,
|
||||||
|
useColorScheme
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
|
|
||||||
|
|
||||||
type IconType = React.ReactNode | string;
|
type IconType = React.ReactNode | string;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -74,6 +77,9 @@ const TextInputCustom = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const colorScheme = useColorScheme();
|
||||||
|
const theme = PlaceholderColor[colorScheme || "light"];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[GStyles.inputContainerArea, containerStyle]}>
|
<View style={[GStyles.inputContainerArea, containerStyle]}>
|
||||||
{label && (
|
{label && (
|
||||||
@@ -100,12 +106,14 @@ const TextInputCustom = ({
|
|||||||
{ color: fontColor },
|
{ color: fontColor },
|
||||||
disabled && GStyles.inputPlaceholderDisabled, // <-- placeholder saat disabled
|
disabled && GStyles.inputPlaceholderDisabled, // <-- placeholder saat disabled
|
||||||
]}
|
]}
|
||||||
|
placeholderTextColor={theme.placeholder}
|
||||||
editable={!disabled}
|
editable={!disabled}
|
||||||
secureTextEntry={secureTextEntry && !isPasswordVisible}
|
secureTextEntry={secureTextEntry && !isPasswordVisible}
|
||||||
keyboardType={keyboardType}
|
keyboardType={keyboardType}
|
||||||
onChangeText={handleTextChange}
|
onChangeText={handleTextChange}
|
||||||
maxLength={maxLength}
|
maxLength={maxLength}
|
||||||
{...rest}
|
{...rest}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{secureTextEntry && (
|
{secureTextEntry && (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
|
|||||||
@@ -45,3 +45,23 @@ export const AdminColor = {
|
|||||||
// Warna Asli: #002e59
|
// Warna Asli: #002e59
|
||||||
// Warna Lebih Gelap: #001f3b
|
// Warna Lebih Gelap: #001f3b
|
||||||
// Warna Tergelap: #001323
|
// Warna Tergelap: #001323
|
||||||
|
|
||||||
|
|
||||||
|
export const PlaceholderColor = {
|
||||||
|
light: {
|
||||||
|
text: "#000",
|
||||||
|
placeholder: "#666",
|
||||||
|
border: "#ccc",
|
||||||
|
background: "#fff",
|
||||||
|
error: "#d00",
|
||||||
|
icon: "#555",
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
text: "#fff",
|
||||||
|
placeholder: "#aaa",
|
||||||
|
border: "#444",
|
||||||
|
background: "#1a1a1a",
|
||||||
|
error: "#ff4d4d",
|
||||||
|
icon: "#ccc",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|||||||
@@ -65,10 +65,15 @@ export default function LoginView() {
|
|||||||
const isValid = await validateData();
|
const isValid = await validateData();
|
||||||
if (!isValid) return;
|
if (!isValid) return;
|
||||||
|
|
||||||
|
// const callingCode = selectedCountry?.callingCode.replace(/^\+/, "") || "";
|
||||||
|
// const fixNumber = inputValue.replace(/\s+/g, "");
|
||||||
const callingCode = selectedCountry?.callingCode.replace(/^\+/, "") || "";
|
const callingCode = selectedCountry?.callingCode.replace(/^\+/, "") || "";
|
||||||
const fixNumber = inputValue.replace(/\s+/g, "");
|
let fixNumber = inputValue.replace(/\s+/g, "").replace(/^0+/, "");
|
||||||
|
|
||||||
const realNumber = callingCode + fixNumber;
|
const realNumber = callingCode + fixNumber;
|
||||||
|
|
||||||
|
console.log("[REALNUMBER]", realNumber);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
// const response = await apiLogin({ nomor: realNumber });
|
// const response = await apiLogin({ nomor: realNumber });
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default function Home_FeatureSection() {
|
|||||||
name: "Collaboration",
|
name: "Collaboration",
|
||||||
icon: <Ionicons name="share" size={48} color="gray" />,
|
icon: <Ionicons name="share" size={48} color="gray" />,
|
||||||
onPress: () => router.push("/(application)/(user)/collaboration/(tabs)"),
|
onPress: () => router.push("/(application)/(user)/collaboration/(tabs)"),
|
||||||
status: "inactive",
|
status: "active",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Voting",
|
name: "Voting",
|
||||||
|
|||||||
@@ -5,16 +5,6 @@ import { Ionicons } from "@expo/vector-icons";
|
|||||||
|
|
||||||
export default function Portofolio_SocialMediaSection({ data }: { data: any }) {
|
export default function Portofolio_SocialMediaSection({ data }: { data: any }) {
|
||||||
const listData = [
|
const listData = [
|
||||||
{
|
|
||||||
label: data && data?.facebook ? data.facebook : "-",
|
|
||||||
icon: (
|
|
||||||
<Ionicons
|
|
||||||
name="logo-facebook"
|
|
||||||
size={ICON_SIZE_SMALL}
|
|
||||||
color={MainColor.white}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: data && data?.tiktok ? data.tiktok : "-",
|
label: data && data?.tiktok ? data.tiktok : "-",
|
||||||
icon: (
|
icon: (
|
||||||
@@ -35,6 +25,16 @@ export default function Portofolio_SocialMediaSection({ data }: { data: any }) {
|
|||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: data && data?.facebook ? data.facebook : "-",
|
||||||
|
icon: (
|
||||||
|
<Ionicons
|
||||||
|
name="logo-facebook"
|
||||||
|
size={ICON_SIZE_SMALL}
|
||||||
|
color={MainColor.white}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: data && data?.twitter ? data.twitter : "-",
|
label: data && data?.twitter ? data.twitter : "-",
|
||||||
icon: (
|
icon: (
|
||||||
|
|||||||
@@ -22,9 +22,11 @@ export default function Voting_BoxDetailHasilVotingSection({
|
|||||||
<Grid>
|
<Grid>
|
||||||
{listData?.map((item: any, i: number) => (
|
{listData?.map((item: any, i: number) => (
|
||||||
<Grid.Col span={12 / listData?.length} style={{ alignItems: "center" }} key={i}>
|
<Grid.Col span={12 / listData?.length} style={{ alignItems: "center" }} key={i}>
|
||||||
<StackCustom>
|
<StackCustom style={{
|
||||||
|
alignItems: "center",
|
||||||
|
}}>
|
||||||
<CircleContainer value={item?.jumlah} />
|
<CircleContainer value={item?.jumlah} />
|
||||||
<TextCustom align="center" size="small">{item?.value}</TextCustom>
|
<TextCustom truncate={2} align="center" size="small">{item?.value}</TextCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user