forked from UKSOURCE/ipv6
fix 2 form
This commit is contained in:
@@ -9,7 +9,6 @@ type Question = {
|
||||
id: string;
|
||||
type: "rating" | "dropdown" | "scale" | "rating_labeled" | "checkbox_group" | "long_text";
|
||||
label: string;
|
||||
labelVi: string;
|
||||
min?: number;
|
||||
max?: number;
|
||||
placeholder?: string;
|
||||
@@ -127,7 +126,6 @@ export default function FeedbackForm({ data }: { data: FeedbackJson }) {
|
||||
<div key={q.id} className="space-y-4">
|
||||
<div className="space-y-1">
|
||||
<label className="block text-lg font-semibold text-on-surface">{q.label}</label>
|
||||
<p className="text-on-surface-variant/70 italic text-sm">{q.labelVi}</p>
|
||||
</div>
|
||||
|
||||
{q.type === "rating" && (
|
||||
@@ -239,7 +237,7 @@ export default function FeedbackForm({ data }: { data: FeedbackJson }) {
|
||||
{q.type === "long_text" && (
|
||||
<textarea
|
||||
className="w-full bg-surface-container-low border border-white/10 rounded-xl px-5 py-4 text-on-surface focus:outline-none focus:border-primary/50 transition-colors min-h-[120px] resize-none"
|
||||
placeholder="Your message / Ý kiến của bạn..."
|
||||
placeholder="Your message / suggestions..."
|
||||
rows={4}
|
||||
value={form[q.id] || ""}
|
||||
onChange={(e) => updateField(q.id, e.target.value)}
|
||||
@@ -262,17 +260,15 @@ export default function FeedbackForm({ data }: { data: FeedbackJson }) {
|
||||
|
||||
<SubmitToast
|
||||
state={submitState}
|
||||
successTitle="Feedback submitted"
|
||||
successMessage="Thank you for your valuable feedback! It has been successfully recorded."
|
||||
successTitle="Feedback Submitted"
|
||||
successMessage={data.submit.disclaimer}
|
||||
onDismiss={() => {
|
||||
setSubmitState("idle");
|
||||
setForm({});
|
||||
}}
|
||||
/>
|
||||
|
||||
<p className="text-on-surface-variant font-medium text-sm text-center max-w-xl leading-relaxed opacity-80 uppercase tracking-wide">
|
||||
{data.submit.disclaimer}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
|
||||
@@ -171,9 +171,9 @@ export default function RegistrationForm({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="pt-[16px]">
|
||||
<div className="pt-10 border-t border-white/5 flex flex-col items-center gap-6">
|
||||
<button
|
||||
className="w-full gold-gradient-bg py-5 rounded-lg text-on-primary font-[var(--font-display-lg)] text-[18px] font-bold shadow-[0_10px_30px_rgba(197,160,89,0.15)] hover:shadow-[0_15px_40px_rgba(197,160,89,0.25)] hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98] transition-all disabled:opacity-60 disabled:pointer-events-none"
|
||||
className="gold-gradient-bg text-on-primary w-full md:w-auto px-16 py-5 rounded-xl font-[var(--font-display-lg)] text-xl uppercase tracking-wider hover:shadow-[0_0_30px_rgba(197,160,89,0.4)] transition-all duration-300 active:scale-[0.98] disabled:opacity-60 disabled:pointer-events-none"
|
||||
type="submit"
|
||||
disabled={submitState === "sending"}
|
||||
>
|
||||
|
||||
+14
-29
@@ -5,13 +5,12 @@
|
||||
{
|
||||
"id": "overall",
|
||||
"title": "1. OVERALL EVENT EXPERIENCE",
|
||||
"subtitle": "Tổng Quan Trải Nghiệm Sự Kiện",
|
||||
"subtitle": "Overview of your summit experience",
|
||||
"questions": [
|
||||
{
|
||||
"id": "overallExperience",
|
||||
"type": "rating",
|
||||
"label": "How would you rate your overall experience at IPv6 Summit 2026?",
|
||||
"labelVi": "Đánh giá tổng thể của bạn về IPv6 Summit 2026?",
|
||||
"min": 1,
|
||||
"max": 5
|
||||
},
|
||||
@@ -19,7 +18,6 @@
|
||||
"id": "venueFacilities",
|
||||
"type": "rating",
|
||||
"label": "How satisfied were you with the venue, facilities, and catering services?",
|
||||
"labelVi": "Mức độ hài lòng của bạn về địa điểm, cơ sở vật chất và dịch vụ tiệc?",
|
||||
"min": 1,
|
||||
"max": 5
|
||||
},
|
||||
@@ -27,7 +25,6 @@
|
||||
"id": "organisationProcess",
|
||||
"type": "rating",
|
||||
"label": "How would you rate the event organisation and registration process?",
|
||||
"labelVi": "Đánh giá của bạn về công tác tổ chức và quy trình đăng ký?",
|
||||
"min": 1,
|
||||
"max": 5
|
||||
}
|
||||
@@ -36,27 +33,25 @@
|
||||
{
|
||||
"id": "content",
|
||||
"title": "2. CONTENT & PROGRAMME EVALUATION",
|
||||
"subtitle": "Đánh Giá Nội Dung & Chương Trình",
|
||||
"subtitle": "Evaluation of program content and sessions",
|
||||
"questions": [
|
||||
{
|
||||
"id": "mostValuableSession",
|
||||
"type": "dropdown",
|
||||
"label": "Which session did you find most valuable?",
|
||||
"labelVi": "Phiên thảo luận nào mang lại giá trị nhất cho bạn?",
|
||||
"placeholder": "Select a session / Danh sách lựa chọn",
|
||||
"placeholder": "Select a session",
|
||||
"options": [
|
||||
{ "value": "opening", "label": "Opening Session / Phiên Khai mạc" },
|
||||
{ "value": "keynote1", "label": "Keynote 1 / Diễn văn chính 1" },
|
||||
{ "value": "panel1", "label": "Panel Discussion 1 / Tọa đàm 1" },
|
||||
{ "value": "technical", "label": "Technical Track / Phiên Kỹ thuật" },
|
||||
{ "value": "policy", "label": "Policy Track / Phiên Chính sách" }
|
||||
{ "value": "opening", "label": "Opening Session" },
|
||||
{ "value": "keynote1", "label": "Keynote 1" },
|
||||
{ "value": "panel1", "label": "Panel Discussion 1" },
|
||||
{ "value": "technical", "label": "Technical Track" },
|
||||
{ "value": "policy", "label": "Policy Track" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "relevance",
|
||||
"type": "scale",
|
||||
"label": "How relevant was the conference content to your professional interests?",
|
||||
"labelVi": "Nội dung hội thảo có phù hợp với lĩnh vực/chuyên môn của bạn không?",
|
||||
"options": [
|
||||
{ "value": "1", "label": "Not Relevant" },
|
||||
{ "value": "2", "label": "Slightly Relevant" },
|
||||
@@ -69,7 +64,6 @@
|
||||
"id": "speakerRating",
|
||||
"type": "rating_labeled",
|
||||
"label": "How would you rate the keynote speakers and panel discussions?",
|
||||
"labelVi": "Đánh giá của bạn về diễn giả chính và các phiên tọa đàm?",
|
||||
"options": [
|
||||
{ "value": "1", "label": "1 – Needs Improvement" },
|
||||
{ "value": "2", "label": "2 – Fair" },
|
||||
@@ -82,7 +76,6 @@
|
||||
"id": "networkingUtility",
|
||||
"type": "scale",
|
||||
"label": "How useful were the networking opportunities provided during the Summit?",
|
||||
"labelVi": "Các cơ hội networking tại sự kiện có hữu ích không?",
|
||||
"options": [
|
||||
{ "value": "1", "label": "Not Useful" },
|
||||
{ "value": "2", "label": "Slightly Useful" },
|
||||
@@ -95,7 +88,6 @@
|
||||
"id": "futureTopics",
|
||||
"type": "checkbox_group",
|
||||
"label": "Which topics would you like to see more of in future editions?",
|
||||
"labelVi": "Bạn muốn thấy thêm chủ đề nào trong các kỳ Summit tiếp theo?",
|
||||
"hasOther": true,
|
||||
"options": [
|
||||
{ "value": "deployment", "label": "IPv6 Deployment Strategies" },
|
||||
@@ -112,13 +104,12 @@
|
||||
{
|
||||
"id": "future",
|
||||
"title": "4. FUTURE PARTICIPATION",
|
||||
"subtitle": "Khả Năng Tham Dự Trong Tương Lai",
|
||||
"subtitle": "Your likelihood of attending future events",
|
||||
"questions": [
|
||||
{
|
||||
"id": "attendAgain",
|
||||
"type": "scale",
|
||||
"label": "Would you attend IPv6 Summit again in 2027?",
|
||||
"labelVi": "Bạn có mong muốn tham dự IPv6 Summit 2027 không?",
|
||||
"options": [
|
||||
{ "value": "definitely-yes", "label": "Definitely Yes" },
|
||||
{ "value": "probably-yes", "label": "Probably Yes" },
|
||||
@@ -131,7 +122,6 @@
|
||||
"id": "recommend",
|
||||
"type": "scale",
|
||||
"label": "Would you recommend IPv6 Summit to colleagues or partners?",
|
||||
"labelVi": "Bạn có sẵn sàng giới thiệu IPv6 Summit cho đồng nghiệp hoặc đối tác không?",
|
||||
"options": [
|
||||
{ "value": "yes", "label": "Yes" },
|
||||
{ "value": "maybe", "label": "Maybe" },
|
||||
@@ -143,38 +133,34 @@
|
||||
{
|
||||
"id": "qualitative",
|
||||
"title": "5. QUALITATIVE FEEDBACK",
|
||||
"subtitle": "Ý Kiến & Đề Xuất",
|
||||
"subtitle": "General opinions and suggestions",
|
||||
"questions": [
|
||||
{
|
||||
"id": "enjoyedMost",
|
||||
"type": "long_text",
|
||||
"label": "What did you enjoy most about the Summit?",
|
||||
"labelVi": "Điều bạn thích nhất tại IPv6 Summit là gì?"
|
||||
"label": "What did you enjoy most about the Summit?"
|
||||
},
|
||||
{
|
||||
"id": "improvementAreas",
|
||||
"type": "long_text",
|
||||
"label": "What areas should we improve for future events?",
|
||||
"labelVi": "Bạn đề xuất cải thiện điều gì cho các sự kiện tiếp theo?"
|
||||
"label": "What areas should we improve for future events?"
|
||||
},
|
||||
{
|
||||
"id": "additionalComments",
|
||||
"type": "long_text",
|
||||
"label": "Any additional comments, suggestions, or partnership interests?",
|
||||
"labelVi": "Các góp ý hoặc đề xuất hợp tác khác?"
|
||||
"label": "Any additional comments, suggestions, or partnership interests?"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "profile",
|
||||
"title": "ATTENDEE PROFILE (OPTIONAL)",
|
||||
"subtitle": "Thông Tin Người Tham Dự (Không bắt buộc)",
|
||||
"subtitle": "Information about your professional background",
|
||||
"questions": [
|
||||
{
|
||||
"id": "industry",
|
||||
"type": "checkbox_group",
|
||||
"label": "Industry / Sector",
|
||||
"labelVi": "Lĩnh vực hoạt động",
|
||||
"hasOther": true,
|
||||
"options": [
|
||||
{ "value": "government", "label": "Government" },
|
||||
@@ -189,7 +175,6 @@
|
||||
"id": "role",
|
||||
"type": "checkbox_group",
|
||||
"label": "Your role",
|
||||
"labelVi": "Vai trò của bạn",
|
||||
"hasOther": true,
|
||||
"options": [
|
||||
{ "value": "executive", "label": "Executive / Leadership" },
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
export const imageUrl = (path?: string) => {
|
||||
// Không có ảnh → ảnh mặc định
|
||||
// No image → default image
|
||||
if (!path) return "/_images/default.jpg";
|
||||
|
||||
// Đã là full URL
|
||||
// Already a full URL
|
||||
if (path.startsWith("http")) return path;
|
||||
|
||||
const base = (
|
||||
|
||||
Reference in New Issue
Block a user