diff --git a/messages/en.json b/messages/en.json
index 6b876b4..c2e08fb 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -260,7 +260,15 @@
"loadMore": "Load more",
"loading": "Loading...",
"disclaimerLabel": "Disclaimer:",
- "disclaimerText": "This job post is community-submitted and has not been fully verified. Please visit the company's official website and verify the provided information before applying."
+ "disclaimerText": "This job post is community-submitted and has not been fully verified. Please visit the company's official website and verify the provided information before applying.",
+ "tagOptions": {
+ "fullTime": "Full-time",
+ "partTime": "Part-time",
+ "remote": "Remote",
+ "contract": "Contract",
+ "freelance": "Freelance",
+ "internship": "Internship"
+ }
},
"auth": {
"signIn": "Sign In",
diff --git a/messages/mm.json b/messages/mm.json
index 21ff094..38040fd 100644
--- a/messages/mm.json
+++ b/messages/mm.json
@@ -260,7 +260,15 @@
"loadMore": "ထပ်ကြည့်ရန်",
"loading": "ဖွင့်နေသည်...",
"disclaimerLabel": "သတိပေးချက်:",
- "disclaimerText": "ဤအလုပ်ခေါ်စာသည် Community မှ တင်သွင်းထားခြင်းဖြစ်ပြီး အပြည့်အဝ စစ်ဆေးအတည်ပြုထားခြင်း မရှိသေးပါ။ လျှောက်ထားမည်ဆိုပါက ကုမ္ပဏီ၏ တရားဝင် website နှင့် ပေးထားသော အချက်အလက်များကို ကိုယ်တိုင် စစ်ဆေးအတည်ပြုပါ။"
+ "disclaimerText": "ဤအလုပ်ခေါ်စာသည် Community မှ တင်သွင်းထားခြင်းဖြစ်ပြီး အပြည့်အဝ စစ်ဆေးအတည်ပြုထားခြင်း မရှိသေးပါ။ လျှောက်ထားမည်ဆိုပါက ကုမ္ပဏီ၏ တရားဝင် website နှင့် ပေးထားသော အချက်အလက်များကို ကိုယ်တိုင် စစ်ဆေးအတည်ပြုပါ။",
+ "tagOptions": {
+ "fullTime": "အချိန်ပြည့်",
+ "partTime": "အချိန်ပိုင်း",
+ "remote": "အဝေးမှ",
+ "contract": "စာချုပ်",
+ "freelance": "လွတ်လပ်",
+ "internship": "အလုပ်သင်"
+ }
},
"auth": {
"signIn": "ဝင်ရောက်ရန်",
diff --git a/src/app/jobs/edit/JobEditClient.tsx b/src/app/jobs/edit/JobEditClient.tsx
index 046bc56..affb60e 100644
--- a/src/app/jobs/edit/JobEditClient.tsx
+++ b/src/app/jobs/edit/JobEditClient.tsx
@@ -16,6 +16,7 @@ import { publishJobPost, unpublishJobPost } from "@/lib/firebase/firestore-jobs"
import { useTranslations } from "next-intl";
import { useLanguage } from "@/hooks/useLanguage";
import { khitHaungg } from "@/fonts/fonts";
+import JobTypeSelect from "@/components/Ui/JobTypeSelect/JobTypeSelect";
const INPUT_CLASS = cn(
"w-full px-4 py-3 rounded-xl text-sm",
@@ -223,13 +224,7 @@ function JobEditForm({ postId }: { postId: string }) {
{t("formTag")}
- setTag(e.target.value)}
- placeholder={t("formTagPlaceholder")}
- className={INPUT_CLASS}
- />
+
{/* Skills */}
diff --git a/src/app/jobs/write/JobWriteClient.tsx b/src/app/jobs/write/JobWriteClient.tsx
index a04adb4..f59af17 100644
--- a/src/app/jobs/write/JobWriteClient.tsx
+++ b/src/app/jobs/write/JobWriteClient.tsx
@@ -13,13 +13,14 @@ import { useJobEditor } from "@/hooks/jobs/useJobEditor";
import { useTranslations } from "next-intl";
import { useLanguage } from "@/hooks/useLanguage";
import { khitHaungg } from "@/fonts/fonts";
+import JobTypeSelect from "@/components/Ui/JobTypeSelect/JobTypeSelect";
const INPUT_CLASS = cn(
"w-full px-4 py-3 rounded-xl text-sm",
"bg-white/[0.04] border border-white/[0.08]",
"text-zinc-200 placeholder:text-zinc-600",
"focus:outline-none focus:border-prism-cyan/40 focus:ring-1 focus:ring-prism-cyan/20",
- "transition-all duration-200"
+ "transition-all duration-200",
);
function TagInput({
@@ -103,7 +104,7 @@ function JobWriteForm() {
(state: SerializedEditorState) => {
setDescription(state);
},
- [setDescription]
+ [setDescription],
);
const handleSave = async () => {
@@ -138,7 +139,12 @@ function JobWriteForm() {
-
+
{t("postNewJob")}
@@ -153,7 +159,12 @@ function JobWriteForm() {
>
{/* Position */}
-
{/* Skills */}
-
+
{t("formSkills")}
-
+
{t("formEmail")}
@@ -210,7 +230,12 @@ function JobWriteForm() {
{/* Expiration Date */}
-
+
{t("formExpiredAt")}
@@ -219,14 +244,24 @@ function JobWriteForm() {
onChange={setExpiredAt}
placeholder={t("formExpiredAtPlaceholder")}
/>
-
+
{t("formExpiredAtHint")}
{/* Description (Rich Text) */}
-
+
{t("formDescription")}
{/* Error */}
- {error && (
- {error}
- )}
+ {error && {error}
}
{/* Actions */}
@@ -251,11 +284,13 @@ function JobWriteForm() {
"flex items-center gap-2 px-6 py-3 rounded-xl text-sm font-medium",
"bg-prism-cyan text-white",
"hover:bg-prism-cyan/90 transition-colors duration-200",
- "disabled:opacity-40 disabled:cursor-not-allowed"
+ "disabled:opacity-40 disabled:cursor-not-allowed",
)}
>
- {saving ? t("saving") : t("saveDraft")}
+
+ {saving ? t("saving") : t("saveDraft")}
+
diff --git a/src/components/Ui/JobTypeSelect/JobTypeSelect.tsx b/src/components/Ui/JobTypeSelect/JobTypeSelect.tsx
new file mode 100644
index 0000000..450de4d
--- /dev/null
+++ b/src/components/Ui/JobTypeSelect/JobTypeSelect.tsx
@@ -0,0 +1,149 @@
+"use client";
+
+import { useState, useRef, useEffect } from "react";
+import { cn } from "@/utils";
+import { ChevronDown, X } from "lucide-react";
+import { motion, AnimatePresence } from "motion/react";
+import { useTranslations } from "next-intl";
+
+const JOB_TYPE_KEYS = [
+ "fullTime",
+ "partTime",
+ "remote",
+ "contract",
+ "freelance",
+ "internship",
+] as const;
+
+interface JobTypeSelectProps {
+ value: string;
+ onChange: (value: string) => void;
+ placeholder?: string;
+ className?: string;
+}
+
+export default function JobTypeSelect({
+ value,
+ onChange,
+ placeholder,
+ className,
+}: JobTypeSelectProps) {
+ const t = useTranslations("jobs");
+ const [open, setOpen] = useState(false);
+ const containerRef = useRef(null);
+
+ const options = JOB_TYPE_KEYS.map((key) => ({
+ key,
+ label: t(`tagOptions.${key}`),
+ }));
+
+ const filteredOptions = options.filter((opt) =>
+ opt.label.toLowerCase().includes(value.toLowerCase()),
+ );
+
+ // Close dropdown when clicking outside
+ useEffect(() => {
+ const handleClickOutside = (e: MouseEvent) => {
+ if (
+ containerRef.current &&
+ !containerRef.current.contains(e.target as Node)
+ ) {
+ setOpen(false);
+ }
+ };
+ document.addEventListener("mousedown", handleClickOutside);
+ return () => document.removeEventListener("mousedown", handleClickOutside);
+ }, []);
+
+ const handleSelect = (label: string) => {
+ onChange(label);
+ setOpen(false);
+ };
+
+ const handleInputChange = (newValue: string) => {
+ onChange(newValue);
+ setOpen(true);
+ };
+
+ const handleClear = (e: React.MouseEvent) => {
+ e.stopPropagation();
+ onChange("");
+ setOpen(false);
+ };
+
+ return (
+
+
+ handleInputChange(e.target.value)}
+ onFocus={() => setOpen(true)}
+ placeholder={placeholder || t("formTagPlaceholder")}
+ className="flex-1 bg-transparent text-zinc-200 placeholder:text-zinc-600 focus:outline-none"
+ />
+ {value && (
+
+ )}
+
+
+
+
+ {open && filteredOptions.length > 0 && (
+
+
+
+ {filteredOptions.map((option) => (
+
+ ))}
+
+
+ )}
+
+
+ );
+}