Published on 03/30/2023
Published by Pratik Takle
Sample code for Awesome manage screen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
[module.set_array args] [after_submit raw] [query] //** [atts debug_dataset=yes /] **// [pagesize]50[/pagesize] [with] [sql] SELECT coll_id as data_id, object_id FROM job_postings where coll_type='job' and meta_key='job_id' [/sql] [add_field new table=job_postings aw2_meta_key='created_datetime' id_field='coll_id' /] [filter new not_empty={form_data.exact}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and (job_postings.meta_key in ('title','description','candidate_profile','relevant_experience','ug_qualifications','pg_qualifications') and meta_value = '[env.form_data.exact /]') [/sql] [/filter] [filter new not_empty={form_data.generic}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id join company_meta on [module.previous_query_no /].object_id = company_meta.object_id where job_postings.coll_type='job' and ((company_meta.meta_key='name' and company_meta.meta_value like '%[env.form_data.generic /]%') or ((job_postings.meta_key in ('company_id','title','description','candidate_profile','relevant_experience','ug_qualifications','pg_qualifications') and job_postings.meta_value like '%[env.form_data.generic /]%'))) group by data_id [/sql] [/filter] [filter new not_empty={form_data.key_skills}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='key_skills' and ( [loop.@skill form_data.key_skills.comma] [if.false @skill.first] OR [/if.false] meta_value like '%[aw2.get @skill.item /]%' [/loop.@skill] ) [/sql] [/filter] [filter new not_empty={form_data.industry}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='industry' and ( [loop.@skill form_data.industry.comma] [if.false @skill.first] OR [/if.false] meta_value = '[aw2.get @skill.item /]' [/loop.@skill] ) [/sql] [/filter] [filter new not_empty={form_data.location}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='location' and ( [loop.@skill form_data.location.comma] [if.false @skill.first] OR [/if.false] meta_value like '%[aw2.get @skill.item /]%' [/loop.@skill] ) [/sql] [/filter] [filter new not_empty={form_data.functional_area}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='functional_area' and ( [loop.@skill form_data.functional_area.comma] [if.false @skill.first] OR [/if.false] meta_value = '[aw2.get @skill.item /]' [/loop.@skill] ) [/sql] [/filter] [filter new not_empty={form_data.job_type}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='job_type' and( [loop.@skill form_data.job_type.comma] [if.false @skill.first] OR [/if.false] meta_value = '[aw2.get @skill.item /]' [/loop.@skill] ) [/sql] [/filter] [filter new not_empty={form_data.position_type}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='position_type' and ( [loop.@skill form_data.position_type.comma] [if.false @skill.first] OR [/if.false] meta_value = '[aw2.get @skill.item /]' [/loop.@skill] ) [/sql] [/filter] [filter new not_empty={form_data.job_status}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='status' and ( [loop.@skill form_data.job_status.comma] [if.false @skill.first] OR [/if.false] meta_value = '[aw2.get @skill.item /]' [/loop.@skill] ) [/sql] [/filter] [filter new not_empty={form_data.job_category}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='job_category' and meta_value = '[aw2.get form_data.job_category /]' [/sql] [/filter] [filter new not_empty={form_data.company_name}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='company_id' and meta_value in( [loop.@skill form_data.company_name.comma] '[aw2.get @skill.item /]' [if.true @skill.between],[/if.true] [/loop.@skill] ) [/sql] [/filter] [filter new not_empty={form_data.recruiter}] [sql raw] select [module.previous_query_no /].* from job_postings join [module.previous_query_no /] on [module.previous_query_no /].data_id=job_postings.coll_id where job_postings.coll_type='job' and job_postings.meta_key ='recruiter' and meta_value = '[aw2.get form_data.recruiter /]' [/sql] [/filter] [filter new field='created_datetime' before_date='{form_data.before_date}' not_empty="{form_data.before_date}" /] [filter new field='created_datetime' after_date='{form_data.after_date}' not_empty="{form_data.after_date}" /] [filter new field='created_datetime' period='{form_data.select_period}' not_empty="{form_data.select_period}"/] [/with] [transform ref_id=data_id /] [meta new] [table]job_postings[/table] [meta_keys]job_id,company_id,title,no_of_openings,status_label,reference_code,created_datetime,close_by_date[/meta_keys] [coll_type]job[/coll_type] [id_field]coll_id[/id_field] [/meta] [meta new] [table]company_meta[/table] [aw2_collection_keys]name[/aw2_collection_keys] [coll_id]company[/coll_id] [ref_id]object_id[/ref_id] [/meta] [order] created_datetime DESC [/order] [/query] [table] [column new label='Job Title'] [calc raw] <a href='[app.path]/job/[aw2.get row.job_id /]' target='_blank' class='brand-primary' rel="noopener noreferrer">[aw2.get row.title /]</a> [/calc] [/column] [column new label='Company' meta_key='name' /] [column new label='Reference code' meta_key='reference_code' /] [column new label='Application Received(count)' ] [calc raw] [query.get_var] SELECT COUNT(meta_value) as app_count FROM `applications` WHERE meta_key='application_id' and object_id='[aw2.get row.job_id /]' [/query.get_var] [/calc] [/column] [column new label='View Applications' ] [calc raw] <a href='[php.site_url /]/applications?job_id=[aw2.get row.job_id /]' target='_blank' class='brand-primary' rel="noopener noreferrer">View Application</a> [/calc] [/column] [column new label='Status' ] [calc raw] [aw2.get token set='template.token' /] <div> [aw2.get row.status_label /]<i class="icon icon-edit cursor brand-primary edit-job-status pad-x-2" id='[template.token /]' onclick="edit_status('[aw2.get row.job_id /]','[aw2.get row.company_id /]','[aw2.get row.title /]','[template.token /]')"></i> </div> [/calc] [/column] [column new label='No. of openings' meta_key='no_of_openings' /] [column new label='Created Date'] [calc raw] [aw2.get row.created_datetime date_format="d M Y" /] [/calc] [/column] [column new label='Scheduled close on'] [calc raw] [aw2.get row.close_by_date date_format="d M Y" /] [/calc] [/column] [/table] [/after_submit] [handlers] [fasttable label='Search'][/fasttable] //**[csv filename='Jobs-Report.csv'][/csv]**// [/handlers] [filters] [section filter keys='company_name,key_skills,position_type,job_type,functional_area,industry,job_status,location,job_category,recruiter' /] [section search keys='exact,generic' open='no' /] [section period keys="select_period,after_date,before_date" open='no' /] [/filters] [/module.set_array] [common.search_filters.main args="{module.args}" title="Jobs" auto_handler="fasttable" /] |