Skip to content

Commit

Permalink
feat: stores section
Browse files Browse the repository at this point in the history
  • Loading branch information
heydoyouknowme0 committed Jun 8, 2024
1 parent 757a17b commit fafd512
Show file tree
Hide file tree
Showing 4 changed files with 299 additions and 5 deletions.
182 changes: 180 additions & 2 deletions app/[locale]/institute/sections/store/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { WorkInProgressStatus } from '~/components/status';
import Link from 'next/link';
import { Suspense } from 'react';

import Heading from '~/components/heading';
import ImageHeader from '~/components/image-header';
import { getTranslations } from '~/i18n/translations';
import { db } from '~/server/db';

Expand All @@ -13,5 +17,179 @@ export default async function Store({
where: (section, { eq }) => eq(section.urlName, 'store'),
}))!;

return <WorkInProgressStatus locale={locale} />;
const purchaseLinks = [
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/STORES_AND_PURCHAS_RULES_2008.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/negotiations.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/PFC_5.4.2.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/PFC_5.4.2-1.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/DRStores_IcOfficeOrderandNotification.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/Institute_Furniture_Purchase_CommitteeIFPC.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/RO_system.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/Furniture.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/Furniture_Committee.pdf',
'https://nitkkr.ac.in/nitkkr/wp-content/uploads/2022/02/Work_Distribuitor.pdf',
];
const teqipLinks = [
'http://www.npiu.nic.in/',
'http://teqip2-pmss.com/pmssproduction',
'https://nitkkr.ac.in/wp-content/uploads/2022/03/PROCUREMENT-MANUAL.pdf',
'https://nitkkr.ac.in/wp-content/uploads/2022/03/PROPRIETARY_ARTICLE_CERTIFICATE_TEQIP.docx',
'https://nitkkr.ac.in/wp-content/uploads/2022/03/Procurement_requisition_TEQIP-II.pdf',
];

const getHeadDetails = async () => {
await new Promise((resolve) => setTimeout(resolve, 3000));
const head = await db.query.staff.findFirst({
columns: { id: true },
where: (staff, { eq }) => eq(staff.id, section?.headFacultyId),
with: {
person: { columns: { name: true, email: true, telephone: true } },
},
});
return (
<p className="whitespace-pre-line">
{head?.person.name}
<br />
{text.incharge.post}
<br />
{text.incharge.telephone}: {head?.person.telephone}
<br />
{text.incharge.email}:<a href={`mailto:${text.incharge.email}`}>{}</a>
</p>
);
};
return (
<>
<ImageHeader
title={text.title}
headings={[
{ label: text.about, href: '#about' },
{ label: text.tender, href: '#tenders' },
{ label: text.purchaseRulesTitle, href: '#purchase-rules' },
{ label: text.availableItems, href: '#available-items' },
{ label: text.teqip, href: '#teqip' },
{ label: text.forms, href: '#store-forms' },
]}
src="assets/stores"
/>
<section className="container" id="about">
<Heading
heading="h2"
glyphDirection="dual"
href="#about"
text={text.about}
/>
<p>{text.functions}</p>
<ul className="mb-2 list-inside list-decimal">
{text.functionList.map((func, i) => (
<li key={i}>{func}</li>
))}
</ul>
<Suspense fallback={<p>Loading...</p>}>{getHeadDetails()}</Suspense>
</section>
<section className="container" id="tenders">
<Heading
heading="h2"
glyphDirection="ltr"
href="#tenders"
text={text.tender}
/>
<p>
<Link
href={`https://nitkkr.ac.in/${locale === 'en' ? 'archived-tenders' : 'language/hi/संग्रहीत-निविदाएं/'}/`}
className="text-primary-700"
>
{text.archivedTenders}
</Link>
</p>
</section>
<section className="container" id="purchase-rules">
<Heading
heading="h2"
glyphDirection="rtl"
href="#purchase-rules"
text={text.purchaseRulesTitle}
/>
<ul className="list-inside list-disc">
{text.purchaseRules.map((rule, i) => (
<li key={i}>
<Link href={purchaseLinks[i]}>{rule}</Link>
</li>
))}
</ul>
</section>
<section className="container" id="available-items">
<Heading
heading="h3"
glyphDirection="ltr"
href="#available-items"
text={text.availableItems}
/>
<p>
<Link
href="https://nitkkr.ac.in/wp-content/uploads/2024/03/List-of-items-with-price-details.pdf"
className="text-primary-700"
>
{text.listItemsInStore}
</Link>
</p>
<p>
<Link
href="https://nitkkr.ac.in/wp-content/uploads/2023/06/List_Items_Available_Store-.pdf"
className="text-primary-700"
>
{text.listItemsPrice}
</Link>
</p>
</section>
<section className="container" id="teqip">
<Heading
heading="h3"
glyphDirection="rtl"
href="#teqip"
text={text.teqip}
/>
<h5>{text.teqipSub}</h5>
<ul className="list-inside list-decimal">
{text.teqipList.map((item, i) => (
<li key={i}>
<Link href={teqipLinks[i]}>{item}</Link>
</li>
))}
</ul>
</section>
<section className="container" id="store-forms">
<Heading
heading="h3"
glyphDirection="ltr"
href="#store-forms"
text={text.forms}
/>
<p>
<Link
href="https://nitkkr.ac.in/wp-content/uploads/2022/12/Flow-Chart-1.pdf"
className="text-primary-700"
>
{text.procurement}
</Link>
</p>
<p>
<Link
href="https://nitkkr.ac.in/wp-content/uploads/2023/08/Forms-and-Formats-for-Procurement-1.pdf"
className="text-primary-700"
>
{text.subForms}
</Link>
</p>
<p>
<Link
href="https://nitkkr.ac.in/wp-content/uploads/2023/08/Urgency-certificate.pdf"
className="text-primary-700"
>
{text.urgencyCertificate}
</Link>
</p>
</section>
</>
);
}
48 changes: 47 additions & 1 deletion i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,53 @@ const text: Translations = {
HealthCentre: {},
Security: {},
Sports: {},
Store: {},
Store: {
title: 'Stores',
about: 'About Us',
functions: 'Major functions of Store Section are as follows:',
functionList: [
'Basic Purchase through Stores Section.',
'Attending major Purchase meetings.',
'Stock verification of the entire Institute.',
'Import of items.',
'Writing off the unserviceable inventory items.',
],
incharge: {
post: 'Prof.in-Charge, Stores\nNational Institute of Technology\nKurukshetra, Haryana-136119, INDIA',
telephone: 'Tel',
email: 'Email Id',
},
tender: 'Tenders & Inquiry',
archivedTenders: 'For Archived tenders click here',
purchaseRulesTitle: 'Purchase Rules & Notifications',
purchaseRules: [
'Comprehensive Stores and Purchase Rules 2008',
'Negotiation Committee( Propritery Items)',
'Purchase Finalization Committee Constitution and Members',
'Purchase Finalization Committee(PFC) Proforma',
'Office Order and Notification of DR(Stores I/c)',
'Institute Furniture Procurement Committee(Faculty)',
'Installation and maintenance of RO System/water Coolers(Policy Decision applicable from 03.09.16)',
'Institute Furniture Purchase Notification(Purchase by Estate Section/ Repair & Maintenance by Workshop)-25.10.16 / Partial Modification fo this Notification Dated 18.01.2017',
'Work Distribution office order of Stores Section w.e.f 14.09.2016',
],
availableItems: 'List of Items',
listItemsInStore: 'List of Items available in Store',
listItemsPrice: 'List of Items with price details',
teqip: 'TEQIP Update',
teqipSub: 'TEQIP AND OTHER GOVT PROJECT PURCHASES',
teqipList: [
'National Project Implementation Unit(NPIU) Website',
'TEQIP-II Procurement Login URL',
'TEQIP Purchase Mannual',
'TEQIP Propritary Article Certificate ',
'Goods Procurement Requisition TEQIP-II',
],
forms: 'Forms and Formats',
procurement: 'Procurement Flow Chart',
subForms: 'More Forms',
urgencyCertificate: 'Urgency Certificate',
},
},
Status: {
NoResult: {
Expand Down
48 changes: 47 additions & 1 deletion i18n/hi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,53 @@ const text: Translations = {
HealthCentre: {},
Security: {},
Sports: {},
Store: {},
Store: {
title: 'स्टोर',
about: '',
functions: 'स्टोर खंड के प्रमुख कार्यों में इस प्रकार हैं:',
functionList: [
'स्टोर अनुभाग के माध्यम से बेसिक खरीद।.',
'बड़ी खरीद बैठकों में भाग लिया ।.',
'पूरे संस्थान के स्टॉक सत्यापन ।.',
'वस्तुओं के आयात ।.',
'अनुपयोगी सूची आइटम बंद लेखन ।',
],
incharge: {
post: 'प्रोफेसर इन-चार्ज, स्टोर्स\nराष्ट्रीय प्रौद्योगिकी संस्थान\nकुरुक्षेत्र, हरियाणा-136119, भारत',
telephone: 'टेलीफोन :',
email: 'ईमेल आईडी :–',
},
tender: 'निविदाएं और जांच',
archivedTenders: 'संग्रहीत निविदाओं के लिए यहां क्लिक करें',
purchaseRulesTitle: 'क्रय नियम और अधिसूचनाएं',
purchaseRules: [
'व्यापक स्टोर और खरीद नियम 2008',
'निगोसिएशन कमेटी (Propritery आइटम)',
'खरीद को अंतिम रूप देने समिति संविधान और सदस्यों',
'खरीद को अंतिम रूप देने समिति (पीएफसी) प्रोफार्मा',
'कार्यालय आदेश और डॉ की अधिसूचना (स्टोर आई / सी)',
'संस्थान फर्नीचर खरीद समिति (संकाय)',
'स्थापना और आरओ सिस्टम के रखरखाव / वाटर कूलर (नीतिगत निर्णय 03.09.16 से लागू हो)',
'संस्थान फर्नीचर खरीद अधिसूचना (एस्टेट अनुभाग / मरम्मत एवं कार्यशाला द्वारा रखरखाव) इस अधिसूचना / दिनांक 2017/01/18 के लिए -25.10.16 / आंशिक संशोधन द्वारा खरीद',
'स्टोर धारा 2016/09/14 w.e.f का काम वितरण कार्यालय आदेश',
],
availableItems: 'फार्म और प्रारूप',
listItemsInStore: 'स्टोर में उपलब्ध आइटमों की सूची',
listItemsPrice: 'मूल्य विवरण के साथ आइटमों की सूची',
teqip: 'टीईक्यूआईपी अपडेट',
teqipSub: 'टीईक्यूआईपी और अन्य सरकारी परियोजना खरीद',
teqipList: [
'राष्ट्रीय परियोजना कार्यान्वयन इकाई (NPIU) वेबसाइट',
'टीईक्यूआईपी-द्वितीय अधिप्राप्ति प्रवेश URL',
'टीईक्यूआईपी खरीद mannual',
'टीईक्यूआईपी Propritary अनुच्छेद प्रमाणपत्र',
'माल खरीद माँग टीईक्यूआईपी-द्वितीय',
],
forms: 'फार्म और प्रारूप',
procurement: 'खरीद फ्लो चार्ट',
subForms: 'अधिक फार्म',
urgencyCertificate: 'तत्कालता प्रमाणपत्र',
},
},
Status: {
NoResult: {
Expand Down
26 changes: 25 additions & 1 deletion i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,31 @@ export interface Translations {
HealthCentre: {};
Security: {};
Sports: {};
Store: {};
Store: {
title: string;
about: string;
functions: string;
functionList: string[];
incharge: {
post: string;
telephone: string;
email: string;
};
tender: string;
archivedTenders: string;
purchaseRulesTitle: string;
purchaseRules: string[];
availableItems: string;
listItemsInStore: string;
listItemsPrice: string;
teqip: string;
teqipSub: string;
teqipList: string[];
forms: string;
procurement: string;
subForms: string;
urgencyCertificate: string;
};
};
Status: {
NoResult: { title: string; description: string };
Expand Down

0 comments on commit fafd512

Please sign in to comment.